[U-Boot] Wenn Sie unsere Dienstleistungen nutzen, dann konnen sich einen wurdigen Arbeitsplatz finden!
Hallo, Lieber Leser, entschuldigen Sie uns Bitte, aber moglich ist folgende Information fur Sie wichtig. Wir sind ein Unternehmen aus Emden Stadt (Deutschland), und wir sind seit langerer Zeit auf dem Personalkoordinierungsmarkt erfolgreich tatig. Bis Heute haben wir nach dem Auftrag unserer Kunden an die fuhrenden Gesellschaften der Europaischer Union Personal vermittelt. In dem vergangenem Monat hat die Arbeitslosigkeitsquote ca 8.5 Prozent betragen. Dem zur Folge sind im Deutschland uber 3.5 Millionen Menschen ohne Arbeit. Von der Anzahl der Arbeitslosen befindet sich die Mehrheit mit uber 2.42 Millionen in den Alten Bundeslander. Der Prozentsatz der Arbeitslosen in den Neun Bundeslander ist aber mit 13.5 Prozent fast um das Zweifache hoher. Seit uber einem Jahrzehnt bluht in Deutschland das Geschaft der Unternehmen die mit der Personalverleihung sich eine Zukunft aufbauen. Wir sind keine Leihfirma, wir koordinieren das Personal. Wenn ein Unternehmen einem Fachman sucht, dann treten wir ins Spiel. Unsere Gesellschaft verhilft Jedem bei der Suche einer Arbeitsstelle, der Bewerbung bei den richtigen Unternehmen und der Einschulung in die neue Tatigkeit. Ab Sofort sind unsere Dienste fur Jede Privatperson kostenlos. Bis zu dem Zeitpunkt an dem Sie von unserer Gesellschaft an ein Unternehmen ubergeben werden konnen Sie sich fur die Teilnahme an den Forschungstudien des Dienstleistungsmarktes melden. Die Teilnahme wird Immer entlohnt. Wenn Sie diesem Weg zu neuer Arbeitsstelle gehen mochten, oder einfach an den Forschungstudien teilnehmen mochten, dann melden Sie sich bei uns mit einer Mail. In dieser Mail bitten wir Sie hoflichst uns folgende Informationen zu ubermitteln: Vor- und Nachname, Geburtsdatum, Wohnort wie auch ihre Handy- und Festnetznummer. Bitte teilen Sie uns auch mit zu welcher Tageszeit unserer Manager Sie telefonisch erreichen kann. Wenn Sie interessiert an einer Arbeitsstelle sind, oder einfach an den Studien teilnehmen mochten, dann schreiben Sie uns Bitte eine Mail mit dem obenerlauterten Inhalt an folgende E-Mail-Adresse: i...@mail-pdl-es.com In der Hoffnung Ihnen mit unserem Projekt helfen zu konnen, PDL-SOLUTIONS ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH-V2 2/4] omap3: Consolidate SDRC related operations
-Original Message- From: Wolfgang Denk [mailto:w...@denx.de] Sent: Thursday, May 06, 2010 1:38 AM To: Hiremath, Vaibhav Cc: u-boot@lists.denx.de Subject: Re: [U-Boot] [PATCH-V2 2/4] omap3: Consolidate SDRC related operations Dear hvaib...@ti.com, [Hiremath, Vaibhav] Thanks Denk for your comments, see my response below - In message 1272034546-26041-4-git-send-email-hvaib...@ti.com you wrote: From: Vaibhav Hiremath hvaib...@ti.com Consolidated SDRC related functions into one file - sdrc.c And also replaced sdrc_init with generic memory init function (mem_init), this generalization of omap memory setup is necessary to support the new emif4 interface introduced in AM3517. Signed-off-by: Vaibhav Hiremath hvaib...@ti.com Signed-off-by: Sanjeev Premi pr...@ti.com diff --git a/arch/arm/cpu/arm_cortexa8/omap3/Makefile b/arch/arm/cpu/arm_cortexa8/omap3/Makefile index 136b163..8cc7802 100644 --- a/arch/arm/cpu/arm_cortexa8/omap3/Makefile +++ b/arch/arm/cpu/arm_cortexa8/omap3/Makefile @@ -33,6 +33,9 @@ COBJS += board.o COBJS += clock.o COBJS += gpio.o COBJS += mem.o +ifdef CONFIG_SDRC +COBJS += sdrc.o +endif Please don't use 'ifdef here; instead, use `COBJS-$(CONFIG_SDRC)' [Hiremath, Vaibhav] ok, will incorporate in next version. diff --git a/arch/arm/include/asm/arch-omap3/cpu.h b/arch/arm/include/asm/arch-omap3/cpu.h index aa8de32..a49af10 100644 --- a/arch/arm/include/asm/arch-omap3/cpu.h +++ b/arch/arm/include/asm/arch-omap3/cpu.h @@ -183,6 +183,7 @@ struct sms { /* SDRC */ #ifndef __KERNEL_STRICT_NAMES #ifndef __ASSEMBLY__ +#if defined(CONFIG_SDRC) struct sdrc_cs { u32 mcfg; /* 0x80 || 0xB0 */ u32 mr; /* 0x84 || 0xB4 */ @@ -215,6 +216,8 @@ struct sdrc { u8 res4[0xC]; struct sdrc_cs cs[2]; /* 0x80 || 0xB0 */ }; + +#endif /* CONFIG_SDRC */ I don't like such a #ifdef here - it is absolutely necessary? Why? [Hiremath, Vaibhav] Denk, This is common file being used for all OMAP series of devices (OMAP2, OMAP3 and AM35x family) and OMAP2/3 family supports SDRC controller and AM35x family support EMIF4. And due to this difference we need to add this #ifdef. diff --git a/arch/arm/include/asm/arch-omap3/sys_proto.h b/arch/arm/include/asm/arch-omap3/sys_proto.h index 34bd515..34e4e0d 100644 --- a/arch/arm/include/asm/arch-omap3/sys_proto.h +++ b/arch/arm/include/asm/arch-omap3/sys_proto.h @@ -31,8 +31,10 @@ void prcm_init(void); void per_clocks_enable(void); void memif_init(void); +#if defined(CONFIG_SDRC) void sdrc_init(void); void do_sdrc_init(u32, u32); +#endif Ditto - please drop this #ifdef. [Hiremath, Vaibhav] Same as above. Thanks, Vaibhav 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 People seldom know what they want until you give them what they ask for. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH-V2 3/4] AM35x: Add support for AM3517EVM
-Original Message- From: Wolfgang Denk [mailto:w...@denx.de] Sent: Thursday, May 06, 2010 1:42 AM To: Hiremath, Vaibhav Cc: u-boot@lists.denx.de Subject: Re: [U-Boot] [PATCH-V2 3/4] AM35x: Add support for AM3517EVM Dear hvaib...@ti.com, In message 1272034546-26041-5-git-send-email-hvaib...@ti.com you wrote: From: Vaibhav Hiremath hvaib...@ti.com This patch adds basic support for the AM3517EVM. It includes: - Board int file (.c and .h) - Default configuration file - Updates for Makefile Signed-off-by: Vaibhav Hiremath hvaib...@ti.com Signed-off-by: Sanjeev Premi pr...@ti.com --- Makefile |3 + arch/arm/include/asm/arch-omap3/mux.h | 36 +++ board/logicpd/am3517evm/Makefile | 47 board/logicpd/am3517evm/am3517evm.c | 76 ++ board/logicpd/am3517evm/am3517evm.h | 405 + board/logicpd/am3517evm/config.mk | 30 +++ include/configs/am3517_evm.h | 297 7 files changed, 894 insertions(+), 0 deletions(-) create mode 100644 board/logicpd/am3517evm/Makefile create mode 100644 board/logicpd/am3517evm/am3517evm.c create mode 100644 board/logicpd/am3517evm/am3517evm.h create mode 100644 board/logicpd/am3517evm/config.mk create mode 100644 include/configs/am3517_evm.h Entries to MAKEALL and MAINTAINERS missing. [Hiremath, Vaibhav] Ok, will add this in next version. diff --git a/Makefile b/Makefile index 34f10ce..487ae73 100644 --- a/Makefile +++ b/Makefile @@ -3169,6 +3169,9 @@ omap3_zoom1_config : unconfig omap3_zoom2_config : unconfig @$(MKCONFIG) $(@:_config=) arm arm_cortexa8 zoom2 logicpd omap3 +am3517_evm_config :unconfig + @$(MKCONFIG) $(@:_config=) arm arm_cortexa8 am3517evm logicpd omap3 + smdkc100_config: unconfig @$(MKCONFIG) $(@:_config=) arm arm_cortexa8 smdkc100 samsung s5pc1xx Please keep list sorted. [Hiremath, Vaibhav] ok, will move up. diff --git a/arch/arm/include/asm/arch-omap3/mux.h b/arch/arm/include/asm/arch-omap3/mux.h index 0c01c73..8ea47b6 100644 --- a/arch/arm/include/asm/arch-omap3/mux.h +++ b/arch/arm/include/asm/arch-omap3/mux.h @@ -283,6 +283,7 @@ /*Control and debug */ #define CONTROL_PADCONF_SYS_32K0x0A04 #define CONTROL_PADCONF_SYS_CLKREQ 0x0A06 +#define CONTROL_PADCONF_SYS_NRESWARM 0x0A08 #define CONTROL_PADCONF_SYS_NIRQ 0x01E0 #define CONTROL_PADCONF_SYS_BOOT0 0x0A0A #define CONTROL_PADCONF_SYS_BOOT1 0x0A0C CONTROL_PADCONF_SYS_NIRQ looks out of place here. [Hiremath, Vaibhav] ok I will place it appropriately. And all this asks to be converted into a proper C struct. [Hiremath, Vaibhav] This is following up the existing way of configuration like all other OMAP devices. I do agree that we need to clean this up. Can it be done in sub-sequent series of patches on top of this? Let AM3517EVm support goes in. What's your opinion on this? diff --git a/board/logicpd/am3517evm/Makefile b/board/logicpd/am3517evm/Makefile new file mode 100644 index 000..3c71fef --- /dev/null +++ b/board/logicpd/am3517evm/Makefile ... +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + Don't add trailing empty lines. [Please check fix globally.] [Hiremath, Vaibhav] Ok, I will cross-check and will fix in next version. Thanks, Vaibhav 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 Any sufficiently advanced technology is indistinguishable from magic. Clarke's Third Law - _Profiles of the Future_ (1962; rev. 1973) ``Hazards of Prophecy: The Failure of Imagination'' ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH-V2 4/4] AM35x: Add support for EMIF4
-Original Message- From: Wolfgang Denk [mailto:w...@denx.de] Sent: Thursday, May 06, 2010 1:44 AM To: Hiremath, Vaibhav Cc: u-boot@lists.denx.de Subject: Re: [U-Boot] [PATCH-V2 4/4] AM35x: Add support for EMIF4 Dear hvaib...@ti.com, In message 1272034546-26041-6-git-send-email-hvaib...@ti.com you wrote: From: Vaibhav Hiremath hvaib...@ti.com This patch adds support for the EMIF4 interface available in the AM35x processors. Signed-off-by: Vaibhav Hiremath hvaib...@ti.com Signed-off-by: Sanjeev Premi pr...@ti.com --- arch/arm/cpu/arm_cortexa8/omap3/Makefile|3 + arch/arm/cpu/arm_cortexa8/omap3/emif4.c | 168 +++ arch/arm/include/asm/arch-omap3/cpu.h | 24 arch/arm/include/asm/arch-omap3/emif4.h | 79 + arch/arm/include/asm/arch-omap3/sys_proto.h |3 + 5 files changed, 277 insertions(+), 0 deletions(-) create mode 100644 arch/arm/cpu/arm_cortexa8/omap3/emif4.c create mode 100644 arch/arm/include/asm/arch-omap3/emif4.h diff --git a/arch/arm/cpu/arm_cortexa8/omap3/Makefile b/arch/arm/cpu/arm_cortexa8/omap3/Makefile index 8cc7802..0a23fa5 100644 --- a/arch/arm/cpu/arm_cortexa8/omap3/Makefile +++ b/arch/arm/cpu/arm_cortexa8/omap3/Makefile @@ -36,6 +36,9 @@ COBJS += mem.o ifdef CONFIG_SDRC COBJS += sdrc.o endif +ifdef CONFIG_EMIF4 +COBJS += emif4.o +endif Don't use ifdef, use COBJS-$(CONFIG_EMIF4) instead. diff --git a/arch/arm/include/asm/arch-omap3/sys_proto.h b/arch/arm/include/asm/arch-omap3/sys_proto.h index 34e4e0d..7b425be 100644 --- a/arch/arm/include/asm/arch-omap3/sys_proto.h +++ b/arch/arm/include/asm/arch-omap3/sys_proto.h @@ -35,6 +35,9 @@ void memif_init(void); void sdrc_init(void); void do_sdrc_init(u32, u32); #endif +#if defined(CONFIG_EMIF4) +void emif4_init(void); +#endif I guess you can omit the #ifdef here, right? [Hiremath, Vaibhav] Denk, We have OMAP families supporting both SDRC and EMIF4 (obviously mutually exclusive), so we need to add this #ifdef. Thanks, Vaibhav 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 A failure will not appear until a unit has passed final inspection. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 01/17] SPARC: added unaligned definitions, patch supplied by Magnus Sjalander.
Dear Wolfgang, I had some minor remarks on patch 1 and 2 as I recall, and a minor change on another patch I discovered myself. Unfortunately I have been very busy, I am really sorry for that. I will try to pull my self together and finish them in the weekend. Do I have to repost the patches, now that they are so delayed? Thank you for your interest, that really helps, Daniel Hellstrom Wolfgang Denk wrote: Dear Daniel Hellstrom, In message 1264680996-13804-1-git-send-email-dan...@gaisler.com you wrote: Signed-off-by: Daniel Hellstrom dan...@gaisler.com --- include/asm-sparc/unaligned.h | 17 + 1 files changed, 17 insertions(+), 0 deletions(-) create mode 100644 include/asm-sparc/unaligned.h This whole patch series has been out there for many months, but I'm still waiting for a pull request from you. Do you have any such plans? Best regards, Wolfgang Denk ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Help me on finding board similar to NIC card in U-bootloader
Dear Hari Babu, In message q2re05b45b91005052125p8b8538eehd8d07687081ad...@mail.gmail.com you wrote: I am having a new NIC card and i have to develop U-boot Loader for that.Can any one help me which board name in U-Boot source code having similar kind of features( PHY, MAC ) for cloning that to my new NIC target card.This NIC card is communicating through PCIe to host,my NIC card is having the following H/W details. 1.CN63xx processor(Cavium network) 2.NAND Flash device : MT29F16G08ABABA 3.NOR Flash device : JS28F320J3D75 4.EEPROM : AT24C256B, AT25F1024 5.PSRAM : MT45W1MW16PD 6.DDR3SDRAM :MT41J128M16 7.*BCM8727* dual 10 GbE SFI-to-XAUI PHY I think U-bootloader dont have Cavium support processors.so can u consider other H/W details for finding board name. Thank u. Cavium has ported U-Boot to their boards, but never contributed any of their work back into the mainline tree. It is probably most efficient to get the source code for their ports and use this as a base. Since you use Cavium processors, it should be no problem for you to get their sources. 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 When a man sits with a pretty girl for an hour, it seems like a minute. But let him sit on a hot stove for a minute -- and it's lon- ger than any hour. That's relativity. -- Albert Einstein ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] change root password
Dear Nuno Cardoso, In message x2j3cf2debb1005060055w943eecd4t9a87659b0bad...@mail.gmail.com you wrote: When I change the root password I'm using the command that you specify passwd root and enter a new password. After that, I execute the exec init command in U-Boot shell to boot all the linux system. At login, I put the new password, but I cannot log! After a restart, I stop the u-boot process to start shell (init=/bin/sh) and cat the /etc/shadow file, and the root password doesn't change (is the old). What I'm doing wrong? Probably you are missing a step to write the changes to the password data back to some persistent storage; when re-booting, you are re-loading the old, unmodified data. We don't know your system and it's file system layout. We don't know if it provides any form of persistent, changable storage for these data, and where. When booting with init=/bin/sh the whole system is at your hands - explore it and find out. Eventually the data is in a read-only file system and cannot be changed at all - then you can try to upload the file system image, undpack it, modify it, repack it and install it on your target. Of course there is a chance that you brick the system that way, so you better know exactly what you are doing. We do not know your systeme. We CANNOT help you. And all this is off topic here. 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 There was no difference between the behavior of a god and the operations of pure chance... - Thomas Pynchon, _Gravity's Rainbow_ ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] Support for devices with FAT32 PBR
This patch adds support for devices that have a FAT32 PBR. Signed-off-by: Igor Luri il...@aotek.es --- disk/part_dos.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/disk/part_dos.c b/disk/part_dos.c index 887b75e..d91f773 100644 --- a/disk/part_dos.c +++ b/disk/part_dos.c @@ -77,7 +77,8 @@ static int test_block_type(unsigned char *buffer) (buffer[DOS_PART_MAGIC_OFFSET + 1] != 0xaa) ) { return (-1); } /* no DOS Signature at all */ - if(strncmp((char *)buffer[DOS_PBR_FSTYPE_OFFSET],FAT,3)==0) + if((strncmp((char *)buffer[DOS_PBR_FSTYPE_OFFSET],FAT,3)==0) || + (strncmp((char *)buffer[DOS_PBR_FAT32_FSTYPE_OFFSET],FAT32,5)==0) ) return DOS_PBR; /* is PBR */ return DOS_MBR; /* Is MBR */ } -- 1.5.4.3 --- disk/part_dos.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/disk/part_dos.h b/disk/part_dos.h index ac93f20..6383c58 100644 --- a/disk/part_dos.h +++ b/disk/part_dos.h @@ -35,6 +35,7 @@ #define DOS_PART_TBL_OFFSET0x1be #define DOS_PART_MAGIC_OFFSET 0x1fe #define DOS_PBR_FSTYPE_OFFSET 0x36 +#define DOS_PBR_FAT32_FSTYPE_OFFSET0x52 #define DOS_PBR_MEDIA_TYPE_OFFSET 0x15 #define DOS_MBR0 #define DOS_PBR1 -- 1.5.4.3 --- fs/fat/fat.c |7 +-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/fs/fat/fat.c b/fs/fat/fat.c index 2445f1e..4da4351 100644 --- a/fs/fat/fat.c +++ b/fs/fat/fat.c @@ -50,6 +50,7 @@ static int cur_part = 1; #define DOS_PART_TBL_OFFSET0x1be #define DOS_PART_MAGIC_OFFSET 0x1fe #define DOS_FS_TYPE_OFFSET 0x36 +#define DOS_FS_FAT32_TYPE_OFFSET 0x52 int disk_read (__u32 startblock, __u32 getsize, __u8 * bufptr) { @@ -94,7 +95,8 @@ fat_register_device(block_dev_desc_t *dev_desc, int part_no) if (!get_partition_info (dev_desc, part_no, info)) { part_offset = info.start; cur_part = part_no; - } else if (!strncmp((char *)buffer[DOS_FS_TYPE_OFFSET], FAT, 3)) { + } else if (!strncmp((char *)buffer[DOS_FS_TYPE_OFFSET], FAT, 3) || + !strncmp((char *)buffer[DOS_FS_FAT32_TYPE_OFFSET], FAT32, 5)) { /* ok, we assume we are on a PBR only */ cur_part = 1; part_offset = 0; @@ -105,7 +107,8 @@ fat_register_device(block_dev_desc_t *dev_desc, int part_no) } #else - if (!strncmp((char *)buffer[DOS_FS_TYPE_OFFSET],FAT,3)) { + if (!strncmp((char *)buffer[DOS_FS_TYPE_OFFSET],FAT,3) || + !strncmp((char *)buffer[DOS_FS_FAT32_TYPE_OFFSET], FAT32, 5) ) { /* ok, we assume we are on a PBR only */ cur_part = 1; part_offset = 0; -- 1.5.4.3 -- Igor Luri RD Software Department Fagor Aotek S. Coop. P. O. Box 144 E-20500 Mondragón-Arrasate Tel.++34 943 71 92 00 ++34 943 71 92 01 (Ext. 44268) Fax.++34 943 79 92 03 www.aotek.es ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] NAND flash parameters.
Hi List How do I modify SLC NAND flash parameters for u-boot ? When I say nand parameters, I meant things like how many pages in a block, how many blocks and how big is each page, not timing. Is it per NAND controller implementation specific or is it more generic across u-boot? As always thanks in advance. Ayewin ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Same U-Boot for smdk6400 and smdk6410...?
Hi everyone, Can anyone please tell me if the smdk6400_config / smdk_noUSB_config is suitable for using on the smdk6410 (i.e. for the S3C6410, Samsung's heavily updated version of the S3C6400)? While I can see patches related to the S3C6410 going in, I can only see the S3C6400 target in the u-boot-samsung git, wondered if I was missing something obvious. :-) Thanks, Nick Pelling // Surbiton, Surrey, UK ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] A little bug in macro __arch_ioremap.
Signed-off-by: Terry Lv r65...@freescale.com --- arch/arm/include/asm/io.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h index 0a4b5be..5122210 100644 --- a/arch/arm/include/asm/io.h +++ b/arch/arm/include/asm/io.h @@ -253,7 +253,7 @@ extern void __iounmap(void *addr); unsigned long _off = (off), _size = (sz); \ void *_ret = (void *)0; \ if (iomem_valid_addr(_off, _size)) \ - _ret = __ioremap(iomem_to_phys(_off),_size,0); \ + _ret = __ioremap(iomem_to_phys(_off),_size,nocache);\ _ret; \ }) -- 1.6.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Same U-Boot for smdk6400 and smdk6410...?
Dear Nick Pelling, On 6 May 2010 19:08, Nick Pelling nickpell...@nanodome.com wrote: Hi everyone, Can anyone please tell me if the smdk6400_config / smdk_noUSB_config is suitable for using on the smdk6410 (i.e. for the S3C6410, Samsung's heavily updated version of the S3C6400)? No, smdk6410 is different board. But, they are very similar.. so it can be possible to work with smdk6400_config. (or little modifications) While I can see patches related to the S3C6410 going in, I can only see the S3C6400 target in the u-boot-samsung git, wondered if I was missing something obvious. :-) Yes, some peoples post patches related to the S3C6410, but hadn't send the patch for smdk6410. Thanks Minkyu Kang. -- from. prom. www.promsoft.net ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RESEND:PATCH-V4] OMAP3EVM: Added NAND support
On Thu, May 6, 2010 at 12:36 AM, Hiremath, Vaibhav hvaib...@ti.com wrote: -Original Message- From: Wolfgang Denk [mailto:w...@denx.de] Sent: Thursday, May 06, 2010 1:31 AM To: Hiremath, Vaibhav Cc: u-boot@lists.denx.de Subject: Re: [U-Boot] [RESEND:PATCH-V4] OMAP3EVM: Added NAND support Dear hvaib...@ti.com, In message 1272034546-26041-2-git-send-email-hvaib...@ti.com you wrote: diff --git a/include/configs/omap3_evm.h b/include/configs/omap3_evm.h index 0d99f7d..1d31731 100644 --- a/include/configs/omap3_evm.h +++ b/include/configs/omap3_evm.h @@ -151,7 +151,8 @@ #define CONFIG_CMD_I2C /* I2C serial bus support */ #define CONFIG_CMD_MMC /* MMC support */ -#define CONFIG_CMD_ONENAND /* ONENAND support */ +#undef CONFIG_CMD_ONENAND /* ONENAND support */ Please do not #undef what is not #define'd anyway. [Hiremath, Vaibhav] This was the initial comment received from Nishanth Menon on very first path, and that's where I added undef line. The initial patch was something - -#define CONFIG_CMD_ONENAND /* ONENAND support */ +/*#define CONFIG_CMD_ONENAND*/ /* ONENAND support */ +#define CONFIG_CMD_NAND /* NAND support */ I do agree that we don't have to undef here, but agreed to Nishant's comment only because from user point of view, if user would like to enable ONENAND support then for him it's easy he just have to comment NAND line and make change this #define. He doesn't have to dig inside code to find out whether ONENAND is supported or not. my 2cents as a background: platforms such as SDP platforms have three flash devices - nand, onenand and nor - these are development platforms and are meant to bootup from any of these devices based on which ever dip switch is set. having a #undef is more elegant than /* */ and easier to use from a developer perspective. Regards, Nishanth Menon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Same U-Boot for smdk6400 and smdk6410...?
Hi Nick, On 6 May 2010 15:38, Nick Pelling nickpell...@nanodome.com wrote: Hi everyone, Can anyone please tell me if the smdk6400_config / smdk_noUSB_config is suitable for using on the smdk6410 (i.e. for the S3C6410, Samsung's heavily updated version of the S3C6400)? IP wise there is no much changes, But 6400 defconfigs would not work straight away. So, We got to put some efforts. While I can see patches related to the S3C6410 going in, I can only see the S3C6400 target in the u-boot-samsung git, wondered if I was missing something obvious. :-) Samsung has released some S5P Series versions latter on so, S3C6410 support is given less priority, i guess. Thanks, Nick Pelling // Surbiton, Surrey, UK ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot -- Shine bright, (: Naveen Krishna Ch :) ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RESEND:PATCH-V4] OMAP3EVM: Added NAND support
Dear Nishanth Menon, In message u2h782515bb1005060340o3b366389mfdb71c240cbc7...@mail.gmail.com you wrote: On Thu, May 6, 2010 at 12:36 AM, Hiremath, Vaibhav hvaib...@ti.com wrote: ... I do agree that we don't have to undef here, but agreed to Nishant's comment only because from user point of view, if user would like to enable ONENAND support then for him it's easy he just have to comment NAND line and make change this #define. He doesn't have to dig inside code to find out whether ONENAND is supported or not. Well, of course the user _has_ to dig into the code and check if the feature is supported, because there is no information what the #undef or the comment means - it can mean anything: - disabled here and left in so you can easily re-add it if you like - disabled because known to be unsupported or broken - disabled because untested - ... platforms such as SDP platforms have three flash devices - nand, onenand and nor - these are development platforms and are meant to bootup from any of these devices based on which ever dip switch is set. having a #undef is more elegant than /* */ and easier to use from a developer perspective. Please provide one working configuration, or several config options, but don't try to add kind of configuration menues using #define / #undef lists. These are useless and confusing at best. 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 Motto of the Electrical Engineer: Working computer hardware is a lot like an erect penis: it stays up as long as you don't fuck with it. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH-V2 3/4] AM35x: Add support for AM3517EVM
Dear Hiremath, Vaibhav, In message 19f8576c6e063c45be387c64729e7394044e351...@dbde02.ent.ti.com you wrote: ... --- a/arch/arm/include/asm/arch-omap3/mux.h +++ b/arch/arm/include/asm/arch-omap3/mux.h ... And all this asks to be converted into a proper C struct. [Hiremath, Vaibhav] This is following up the existing way of configuration like all other OMAP devices. I do agree that we need to clean this up. Can it be done in sub-sequent series of patches on top of this? Let AM3517E Vm support goes in. What's your opinion on this? Agreed. 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 would seem that evil retreats when forcibly confronted -- Yarnek of Excalbia, The Savage Curtain, stardate 5906.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH-V2 2/4] omap3: Consolidate SDRC related operations
Dear Hiremath, Vaibhav, In message 19f8576c6e063c45be387c64729e7394044e351...@dbde02.ent.ti.com you wrote: diff --git a/arch/arm/include/asm/arch-omap3/cpu.h b/arch/arm/include/asm/arch-omap3/cpu.h index aa8de32..a49af10 100644 --- a/arch/arm/include/asm/arch-omap3/cpu.h +++ b/arch/arm/include/asm/arch-omap3/cpu.h @@ -183,6 +183,7 @@ struct sms { /* SDRC */ #ifndef __KERNEL_STRICT_NAMES #ifndef __ASSEMBLY__ +#if defined(CONFIG_SDRC) struct sdrc_cs { u32 mcfg; /* 0x80 || 0xB0 */ u32 mr; /* 0x84 || 0xB4 */ @@ -215,6 +216,8 @@ struct sdrc { u8 res4[0xC]; struct sdrc_cs cs[2]; /* 0x80 || 0xB0 */ }; + +#endif /* CONFIG_SDRC */ I don't like such a #ifdef here - it is absolutely necessary? Why? [Hiremath, Vaibhav] Denk, This is common file being used for all OMAP series of devices (OMAP2, OMAP3 and AM35x family) and OMAP2/3 family supports SDRC controller and AM35x fa mily support EMIF4. And due to this difference we need to add this #ifdef. No. If different CPU fmilies need different versions of this struct then they should use separate header files for these. diff --git a/arch/arm/include/asm/arch-omap3/sys_proto.h b/arch/arm/include/asm/arch-omap3/sys_proto.h index 34bd515..34e4e0d 100644 --- a/arch/arm/include/asm/arch-omap3/sys_proto.h +++ b/arch/arm/include/asm/arch-omap3/sys_proto.h @@ -31,8 +31,10 @@ void prcm_init(void); void per_clocks_enable(void); void memif_init(void); +#if defined(CONFIG_SDRC) void sdrc_init(void); void do_sdrc_init(u32, u32); +#endif Ditto - please drop this #ifdef. [Hiremath, Vaibhav] Same as above. Even less so here. The prototypes should not do any harm - just remove the #if/#endif 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 Ahead warp factor 1 - Captain Kirk ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH-V2 4/4] AM35x: Add support for EMIF4
Dear Hiremath, Vaibhav, In message 19f8576c6e063c45be387c64729e7394044e351...@dbde02.ent.ti.com you wrote: void sdrc_init(void); void do_sdrc_init(u32, u32); #endif +#if defined(CONFIG_EMIF4) +void emif4_init(void); +#endif I guess you can omit the #ifdef here, right? [Hiremath, Vaibhav] Denk, We have OMAP families supporting both SDRC and EMIF4 (obviously mutually ex clusive), so we need to add this #ifdef. What makes you think you need it? Did you try what happens when you just remove the #if/#endif ? 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 Given a choice between two theories, take the one which is funnier. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 01/17] SPARC: added unaligned definitions, patch supplied by Magnus Sjalander.
Dear Daniel Hellstrom, In message 4be263ad.7020...@gaisler.com you wrote: I had some minor remarks on patch 1 and 2 as I recall, and a minor change on another patch I discovered myself. Unfortunately I have been very busy, I am really sorry for that. I will try to pull my self together and finish them in the weekend. Do I have to repost the patches, now that they are so delayed? You will probably have to rebase these anyway, so please also repost. 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 A fractal is by definition a set for which the Hausdorff Besicovitch dimension strictly exceeds the topological dimension. - Mandelbrot, _The Fractal Geometry of Nature_ ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RESEND:PATCH-V4] OMAP3EVM: Added NAND support
Dear Hiremath, Vaibhav, In message 19f8576c6e063c45be387c64729e7394044e351...@dbde02.ent.ti.com you wrote: I do agree that we don't have to undef here, but agreed to Nishant's comment only because from user point of view, if user would like to enable ONENAND support then for him it's easy he just have to comment NAND line and make change this #define. He doesn't have to dig inside code to find out whether ONENAND is supported or not. Hm... what makes you think we could assume that commented out code is actually working and can be enabled as we like? This is a highly speculative assumption, and probably more often wrong than right. 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 Why can you only have two doors on a chicken coop? If it had four it would be a chicken sedan. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RESEND:PATCH-V4] OMAP3EVM: Added NAND support
On Thu, May 6, 2010 at 5:50 AM, Wolfgang Denk w...@denx.de wrote: Dear Nishanth Menon, In message u2h782515bb1005060340o3b366389mfdb71c240cbc7...@mail.gmail.com you wrote: On Thu, May 6, 2010 at 12:36 AM, Hiremath, Vaibhav hvaib...@ti.com wrote: ... I do agree that we don't have to undef here, but agreed to Nishant's comment only because from user point of view, if user would like to enable ONENAND support then for him it's easy he just have to comment NAND line and make change this #define. He doesn't have to dig inside code to find out whether ONENAND is supported or not. Well, of course the user _has_ to dig into the code and check if the feature is supported, because there is no information what the #undef or the comment means - it can mean anything: - disabled here and left in so you can easily re-add it if you like - disabled because known to be unsupported or broken - disabled because untested - ... platforms such as SDP platforms have three flash devices - nand, onenand and nor - these are development platforms and are meant to bootup from any of these devices based on which ever dip switch is set. having a #undef is more elegant than /* */ and easier to use from a developer perspective. Please provide one working configuration, or several config options, but don't try to add kind of configuration menues using #define / #undef lists. These are useless and confusing at best. your points are valid, two options as I see here: a) build configurations - nand_boot, nor_boot etc.. b) IMHO, the better solution would be to allow the same u-boot to boot from all devices (nand, nor, onenand, mmc) without needing a rebuild. but the neccessity for that is to have environment variable which can be moved around.. TI has an implementation based on an ancient u-boot which actually does this, it will be interesting to know if there are others who may be interested in a similar feature in mainline u-boot. Regards, Nishanth Menon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RESEND:PATCH-V4] OMAP3EVM: Added NAND support
Dear Nishanth Menon, In message j2h782515bb1005060354tc4574d80wb4a1aa3a2b40b...@mail.gmail.com you wrote: your points are valid, two options as I see here: a) build configurations - nand_boot, nor_boot etc.. b) IMHO, the better solution would be to allow the same u-boot to boot from all devices (nand, nor, onenand, mmc) without needing a rebuild. b) is clearly the better and more user-friendly solution. but the neccessity for that is to have environment variable which can be moved around.. ... Hm... really? Assuming that all the storage devices are always present, you can decide to use one standard location for the environment independent of where the U-Boot image gets loaded from (that may actually be considered an advantage by some). ... TI has an implementation based on an ancient u-boot which actually does this, it will be interesting to know if there are others who may be interested in a similar feature in mainline u-boot. Sure - please post a patch (as RFC) so we can see what you have in mind. 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 Always leave room to add an explanation if it doesn't work out. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RESEND:PATCH-V4] OMAP3EVM: Added NAND support
-Original Message- From: Wolfgang Denk [mailto:w...@denx.de] Sent: Thursday, May 06, 2010 4:20 PM To: Nishanth Menon Cc: Hiremath, Vaibhav; u-boot@lists.denx.de Subject: Re: [U-Boot] [RESEND:PATCH-V4] OMAP3EVM: Added NAND support Dear Nishanth Menon, In message u2h782515bb1005060340o3b366389mfdb71c240cbc7...@mail.gmail.com you wrote: On Thu, May 6, 2010 at 12:36 AM, Hiremath, Vaibhav hvaib...@ti.com wrote: ... I do agree that we don't have to undef here, but agreed to Nishant's comment only because from user point of view, if user would like to enable ONENAND support then for him it's easy he just have to comment NAND line and make change this #define. He doesn't have to dig inside code to find out whether ONENAND is supported or not. Well, of course the user _has_ to dig into the code and check if the feature is supported, because there is no information what the #undef or the comment means - it can mean anything: - disabled here and left in so you can easily re-add it if you like - disabled because known to be unsupported or broken - disabled because untested - ... [Hiremath, Vaibhav] Ok. Agreed. I will remove undef line and submit the patch. Thanks, Vaibhav platforms such as SDP platforms have three flash devices - nand, onenand and nor - these are development platforms and are meant to bootup from any of these devices based on which ever dip switch is set. having a #undef is more elegant than /* */ and easier to use from a developer perspective. Please provide one working configuration, or several config options, but don't try to add kind of configuration menues using #define / #undef lists. These are useless and confusing at best. 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 Motto of the Electrical Engineer: Working computer hardware is a lot like an erect penis: it stays up as long as you don't fuck with it. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RESEND:PATCH-V4] OMAP3EVM: Added NAND support
On Thu, May 6, 2010 at 6:03 AM, Wolfgang Denk w...@denx.de wrote: Dear Nishanth Menon, In message j2h782515bb1005060354tc4574d80wb4a1aa3a2b40b...@mail.gmail.com you wrote: your points are valid, two options as I see here: a) build configurations - nand_boot, nor_boot etc.. b) IMHO, the better solution would be to allow the same u-boot to boot from all devices (nand, nor, onenand, mmc) without needing a rebuild. b) is clearly the better and more user-friendly solution. but the neccessity for that is to have environment variable which can be moved around.. ... Hm... really? Assuming that all the storage devices are always present, you can decide to use one standard location for the environment independent of where the U-Boot image gets loaded from (that may actually be considered an advantage by some). it is like http://dev.omapzoom.org/?p=bootloader/u-boot.git;a=blob;f=board/omap3430sdp/mem.c;h=a3dad962390b35501c83f8cde1dd2fd1f6d779d6;hb=HEAD#l107 Infact in some of the settings, one of the chips might even not be mapped :(.. yes, one option could have been to use a single flash for all env (in fact some platforms like (if i recollect beagle booting off MMC uses NAND for env) - but is not a nice idea if the usecase is to use that entire flash for filesystem.. so the safe option in general has been to expect the environment to stick to the memory u-boot booted off from.. ... TI has an implementation based on an ancient u-boot which actually does this, it will be interesting to know if there are others who may be interested in a similar feature in mainline u-boot. Sure - please post a patch (as RFC) so we can see what you have in mind. Yep.. waiting for my next free cycle ;) i would have pointed as an RFC to the git repo history, unfortunately the transition from clearcase to git was done as a single blob :( Regards, Nishanth Menon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] (Reply only to this email : mr_liuya...@hotmail.com)
Dear friend, I have a project I want you to run with us. It involves exportation of 35,000 barrels of oil daily from Kirkuk, Iraq. If you are interested, email me via: mr_liuya...@hotmail.com mailto:mr_liuya...@live.com Mr. Yan ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3 00/19] SPEAr : Network support for spear platforms and SPEAr1300
Hello Tom, The following patch-set contains all the accepted feedbacks on patch-set v2. Please consider this for submission into mainline Below changes are introduced other than the recieved review comments 1. Introduced a CONFIG_DW_SEARCH_PHY definition, which if defined searches the ethernet phy address. Searching was always enabled in earlier patch 2. Introduced a new function dw_write_hwaddr in ethernet driver and registered it as a callback via dev-write_hwaddr. This is a new feature recently implemented by Ben. Thanks in advance Regards Vipin Vipin Kumar (19): u-boot.img file not created when srctree and objtree are different change_bit routine defined SPEAr : SMI erase and write timeouts increased SPEAr : Placing ethaddr write and read within CONFIG_CMD_NET SPEAr : Reducing the max RAM size to 128MB SPEAr : Basic arch related support added for SPEAr SoCs SPEAr : Network driver support added SPEAr : Network support configured for spear SoCs SPEAr : macb driver support added for spear310 and spear320 SPEAr : FSMC driver support added SPEAr : Configuring FSMC driver for NAND interface SPEAr : i2c driver moved completely into drivers/i2c SPEAr : smi driver moved completely into drivers/mtd SPEAr : USB Device Controller driver support added SPEAr : Supporting various configurations for spear3xx and spear6xx boards SPEAr : Basic spear1300 architecture support added SPEAr : spear1300 SoC support added SPEAr : Removing extraneous code SPEAr : USB device controller bugfixes MAINTAINERS|1 + MAKEALL|1 + Makefile | 30 +- arch/arm/cpu/arm926ejs/spear/Makefile |3 +- arch/arm/cpu/arm926ejs/spear/cpu.c | 78 +++ arch/arm/cpu/arm_cortexa8/spear13xx/Makefile | 52 ++ arch/arm/cpu/arm_cortexa8/spear13xx/cache.S| 114 + arch/arm/cpu/arm_cortexa8/spear13xx/cpu.c | 96 .../arm_cortexa8/spear13xx/reset.c}| 52 +-- arch/arm/cpu/arm_cortexa8/spear13xx/timer.c| 138 + .../arm/include/asm/arch-spear/clk.h | 26 +- arch/arm/include/asm/arch-spear/hardware.h | 16 +- arch/arm/include/asm/arch-spear/spr_misc.h |5 + .../arm/include/asm/arch-spear13xx/hardware.h | 33 +- arch/arm/include/asm/arch-spear13xx/spr_gpt.h | 85 arch/arm/include/asm/arch-spear13xx/spr_misc.h | 317 .../arm/include/asm/arch-spear13xx/sys_proto.h | 29 +- arch/arm/include/asm/bitops.h | 11 +- board/spear/common/Makefile| 10 +- board/spear/common/spr_misc.c | 28 +- board/spear/spear1300/Makefile | 51 ++ board/spear/spear1300/config.mk| 28 + board/spear/spear1300/spear1300.c | 88 .../spear/spear1300/spr_lowlevel_init.S| 35 +- board/spear/spear300/config.mk | 11 - board/spear/spear300/spear300.c| 15 +- board/spear/spear310/config.mk | 11 - board/spear/spear310/spear310.c| 36 ++- board/spear/spear320/config.mk | 11 - board/spear/spear320/spear320.c| 23 +- board/spear/spear600/config.mk | 11 - board/spear/spear600/spear600.c| 15 +- doc/README.designware_eth | 25 + doc/README.spear | 46 ++- drivers/i2c/Makefile |2 +- drivers/i2c/{spr_i2c.c = designware_i2c.c}|4 +- .../spr_i2c.h = drivers/i2c/designware_i2c.h |6 +- drivers/mtd/Makefile |2 +- drivers/mtd/nand/Makefile |2 +- drivers/mtd/nand/fsmc_nand.c | 366 ++ drivers/mtd/nand/spr_nand.c| 124 - drivers/mtd/{spr_smi.c = st_smi.c}| 59 ++- .../arch-spear/spr_smi.h = drivers/mtd/st_smi.h |8 +- drivers/net/Makefile |1 + drivers/net/designware.c | 531 drivers/net/designware.h | 264 ++ drivers/serial/usbtty.h|4 +- drivers/usb/gadget/Makefile|2 +- drivers/usb/gadget/{spr_udc.c = designware_udc.c} | 116 +++-- include/configs/spear-common.h | 33 +- include/configs/spear13xx_evb.h| 202 include/configs/{spear3xx.h = spear3xx_evb.h} | 30 ++ include/configs/{spear6xx.h = spear6xx_evb.h} | 13 + include/linux/mtd/fsmc_nand.h | 104 include/netdev.h
[U-Boot] [PATCH v3 03/19] SPEAr : SMI erase and write timeouts increased
SMI driver fails because of low timeout values. Increasing the write mode timeout and transfer timeouts to 15 ms Signed-off-by: Vipin Kumar vipin.ku...@st.com --- arch/arm/include/asm/arch-spear/spr_smi.h |4 +- drivers/mtd/spr_smi.c | 57 ++--- 2 files changed, 38 insertions(+), 23 deletions(-) diff --git a/arch/arm/include/asm/arch-spear/spr_smi.h b/arch/arm/include/asm/arch-spear/spr_smi.h index 06df745..0cca000 100644 --- a/arch/arm/include/asm/arch-spear/spr_smi.h +++ b/arch/arm/include/asm/arch-spear/spr_smi.h @@ -109,7 +109,7 @@ struct flash_dev { }; #define SFLASH_PAGE_SIZE 0x100 /* flash page size */ -#define XFER_FINISH_TOUT 2 /* xfer finish timeout */ -#define WMODE_TOUT 2 /* write enable timeout */ +#define XFER_FINISH_TOUT 15 /* xfer finish timeout(in ms) */ +#define WMODE_TOUT 15 /* write enable timeout(in ms) */ #endif diff --git a/drivers/mtd/spr_smi.c b/drivers/mtd/spr_smi.c index 9a70a19..c6ba951 100644 --- a/drivers/mtd/spr_smi.c +++ b/drivers/mtd/spr_smi.c @@ -58,13 +58,15 @@ static struct flash_dev flash_ids[] = { * * Wait until TFF is set in status register */ -static void smi_wait_xfer_finish(int timeout) +static int smi_wait_xfer_finish(int timeout) { - while (timeout--) { + do { if (readl(smicntl-smi_sr) TFF) - break; + return 0; udelay(1000); - } + } while (timeout--); + + return -1; } /* @@ -82,7 +84,9 @@ static unsigned int smi_read_id(flash_info_t *info, int banknum) writel(READ_ID, smicntl-smi_tr); writel((banknum BANKSEL_SHIFT) | SEND | TX_LEN_1 | RX_LEN_3, smicntl-smi_cr2); - smi_wait_xfer_finish(XFER_FINISH_TOUT); + + if (smi_wait_xfer_finish(XFER_FINISH_TOUT)) + return -EIO; value = (readl(smicntl-smi_rr) 0x00FF); @@ -104,11 +108,17 @@ static ulong flash_get_size(ulong base, int banknum) { flash_info_t *info = flash_info[banknum]; struct flash_dev *dev; - unsigned int value; + int value; unsigned int density; int i; value = smi_read_id(info, banknum); + + if (value 0) { + printf(Flash id could not be read\n); + return 0; + } + density = (value 16) 0xff; for (i = 0, dev = flash_ids[0]; dev-density != 0x0; @@ -136,7 +146,7 @@ static ulong flash_get_size(ulong base, int banknum) * This routine will get the status register of the flash chip present at the * given bank */ -static unsigned int smi_read_sr(int bank) +static int smi_read_sr(int bank) { u32 ctrlreg1; @@ -150,7 +160,8 @@ static unsigned int smi_read_sr(int bank) /* Performing a RSR instruction in HW mode */ writel((bank BANKSEL_SHIFT) | RD_STATUS_REG, smicntl-smi_cr2); - smi_wait_xfer_finish(XFER_FINISH_TOUT); + if (smi_wait_xfer_finish(XFER_FINISH_TOUT)) + return -1; /* Restore the CTRL REG1 state */ writel(ctrlreg1, smicntl-smi_cr1); @@ -169,13 +180,11 @@ static unsigned int smi_read_sr(int bank) */ static int smi_wait_till_ready(int bank, int timeout) { - int count; - unsigned int sr; + int sr; /* One chip guarantees max 5 msec wait here after page writes, but potentially three seconds (!) after page erase. */ - for (count = 0; count timeout; count++) { - + do { sr = smi_read_sr(bank); if (sr 0) break; @@ -184,7 +193,8 @@ static int smi_wait_till_ready(int bank, int timeout) /* Try again after 1m-sec */ udelay(1000); - } + } while (timeout--); + printf(SMI controller is still in wait, timeout=%d\n, timeout); return -EIO; } @@ -200,6 +210,7 @@ static int smi_write_enable(int bank) { u32 ctrlreg1; int timeout = WMODE_TOUT; + int sr; /* Store the CTRL REG1 state */ ctrlreg1 = readl(smicntl-smi_cr1); @@ -210,19 +221,22 @@ static int smi_write_enable(int bank) /* Give the Flash, Write Enable command */ writel((bank BANKSEL_SHIFT) | WE, smicntl-smi_cr2); - smi_wait_xfer_finish(XFER_FINISH_TOUT); + if (smi_wait_xfer_finish(XFER_FINISH_TOUT)) + return -1; /* Restore the CTRL REG1 state */ writel(ctrlreg1, smicntl-smi_cr1); - while (timeout--) { - if (smi_read_sr(bank) (1 (bank + WM_SHIFT))) + do { + sr = smi_read_sr(bank); + if (sr 0) break; - udelay(1000); - } + else if (sr (1 (bank + WM_SHIFT))) + return 0; - if (timeout) - return 0; + /* Try again after 1m-sec
[U-Boot] [PATCH v3 02/19] change_bit routine defined
change_bit routine is left implementation dependent until now. This routine is now defined for arm platforms in asm-arm/bitops.h The Flexible Static memory controller driver, placed in mtd/nand/fsmc_nand.c needs this routine. FSMC is a memory controller peripheral from ST. The new driver implements the NAND interface part of the peripheral. Signed-off-by: Vipin Kumar vipin.ku...@st.com --- arch/arm/include/asm/bitops.h | 11 +-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/arch/arm/include/asm/bitops.h b/arch/arm/include/asm/bitops.h index 270f163..435857b 100644 --- a/arch/arm/include/asm/bitops.h +++ b/arch/arm/include/asm/bitops.h @@ -29,8 +29,6 @@ extern void set_bit(int nr, volatile void * addr); extern void clear_bit(int nr, volatile void * addr); -extern void change_bit(int nr, volatile void * addr); - static inline void __change_bit(int nr, volatile void *addr) { unsigned long mask = BIT_MASK(nr); @@ -39,6 +37,15 @@ static inline void __change_bit(int nr, volatile void *addr) *p ^= mask; } +static inline void change_bit(int nr, volatile void *addr) +{ + unsigned long flags; + + local_irq_save(flags); + __change_bit(nr, addr); + local_irq_restore(flags); +} + static inline int __test_and_set_bit(int nr, volatile void *addr) { unsigned long mask = BIT_MASK(nr); -- 1.6.0.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3 04/19] SPEAr : Placing ethaddr write and read within CONFIG_CMD_NET
ethaddr can be optionally read from i2c memory. So, chip_config command supports reading/writing hw mac id into i2c memory. Placing this code within CONFIG_CMD_NET as this would only be needed when network interface is configured Signed-off-by: Vipin Kumar vipin.ku...@st.com --- board/spear/common/spr_misc.c | 28 +--- doc/README.spear |8 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/board/spear/common/spr_misc.c b/board/spear/common/spr_misc.c index e356912..74409d3 100644 --- a/board/spear/common/spr_misc.c +++ b/board/spear/common/spr_misc.c @@ -38,6 +38,10 @@ DECLARE_GLOBAL_DATA_PTR; static struct chip_data chip_data; +#if defined(CONFIG_CMD_NET) +static int i2c_read_mac(uchar *buffer); +#endif + int dram_init(void) { struct xloader_table *xloader_tb = @@ -166,6 +170,7 @@ int spear_board_init(ulong mach_type) return 0; } +#if defined(CONFIG_CMD_NET) static int i2c_read_mac(uchar *buffer) { u8 buf[2]; @@ -205,15 +210,17 @@ static int write_mac(uchar *mac) puts(I2C EEPROM writing failed \n); return -1; } +#endif int do_chip_config(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { void (*sram_setfreq) (unsigned int, unsigned int); struct chip_data *chip = chip_data; + unsigned int frequency; + +#if defined(CONFIG_CMD_NET) unsigned char mac[6]; - unsigned int reg, frequency; - char *s, *e; - char i2c_mac[20]; +#endif if ((argc 3) || (argc 2)) { cmd_usage(cmdtp); @@ -244,9 +251,12 @@ int do_chip_config(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) } return 0; + +#if defined(CONFIG_CMD_NET) } else if (!strcmp(argv[1], ethaddr)) { - s = argv[2]; + u32 reg; + char *e, *s = argv[2]; for (reg = 0; reg 6; ++reg) { mac[reg] = s ? simple_strtoul(s, e, 16) : 0; if (s) @@ -255,6 +265,7 @@ int do_chip_config(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) write_mac(mac); return 0; +#endif } else if (!strcmp(argv[1], print)) { if (chip-cpufreq == -1) @@ -274,13 +285,13 @@ int do_chip_config(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) else printf(DDR Type= Not Known\n); +#if defined(CONFIG_CMD_NET) if (!i2c_read_mac(mac)) { - sprintf(i2c_mac, %pM, mac); - printf(Ethaddr (from i2c mem) = %s\n, i2c_mac); + printf(Ethaddr (from i2c mem) = %pM\n, mac); } else { printf(Ethaddr (from i2c mem) = Not set\n); } - +#endif printf(Xloader Rev = %s\n, chip-version); return 0; @@ -293,4 +304,7 @@ int do_chip_config(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) U_BOOT_CMD(chip_config, 3, 1, do_chip_config, configure chip, chip_config cpufreq/ddrfreq frequency\n +#if defined(CONFIG_CMD_NET) + chip_config ethaddr XX:XX:XX:XX:XX:XX\n +#endif chip_config print); diff --git a/doc/README.spear b/doc/README.spear index a8b1052..a6ff7fd 100644 --- a/doc/README.spear +++ b/doc/README.spear @@ -46,3 +46,11 @@ Further options make FLASH=PNOR (supported by SPEAr310 and SPEAr320) - This option generates a uboot image that supports emi controller for CFI compliant parallel NOR flash + +Mac id storage and retrieval in spear platforms + +Please read doc/README.enetaddr for the implementation guidelines for mac id +usage. Basically, environment has precedence over board specific storage. The +ethaddr beeing used for the network interface is always taken only from +environment variables. Although, we can check the mac id programmed in i2c +memory by using chip_config command -- 1.6.0.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3 06/19] SPEAr : Basic arch related support added for SPEAr SoCs
Adding CONFIG_DISPLAY_CPUINFO and CONFIG_ARCH_CPU_INIT support for SPEAr3xx and SPEAr6xx SoCs CONFIG_DISPLAY_CPUINFO includes the built CPU related information Earlier, architecture specific init code was mixed with board initialization code in board/spear/... CONFIG_ARCH_CPU_INIT includes the architecture specific initialisation code with in arch/arm/spear/cpu.c Signed-off-by: Vipin Kumar vipin.ku...@st.com --- arch/arm/cpu/arm926ejs/spear/Makefile |3 +- arch/arm/cpu/arm926ejs/spear/cpu.c | 78 arch/arm/include/asm/arch-spear/spr_misc.h |5 ++ include/configs/spear-common.h |2 + 4 files changed, 87 insertions(+), 1 deletions(-) create mode 100644 arch/arm/cpu/arm926ejs/spear/cpu.c diff --git a/arch/arm/cpu/arm926ejs/spear/Makefile b/arch/arm/cpu/arm926ejs/spear/Makefile index bf8dfa8..6ca8c6e 100644 --- a/arch/arm/cpu/arm926ejs/spear/Makefile +++ b/arch/arm/cpu/arm926ejs/spear/Makefile @@ -25,7 +25,8 @@ include $(TOPDIR)/config.mk LIB= $(obj)lib$(SOC).a -COBJS := reset.o \ +COBJS := cpu.o \ + reset.o \ timer.o SOBJS := diff --git a/arch/arm/cpu/arm926ejs/spear/cpu.c b/arch/arm/cpu/arm926ejs/spear/cpu.c new file mode 100644 index 000..0f66e05 --- /dev/null +++ b/arch/arm/cpu/arm926ejs/spear/cpu.c @@ -0,0 +1,78 @@ +/* + * (C) Copyright 2010 + * Vipin Kumar, ST Micoelectronics, vipin.ku...@st.com. + * + * 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 common.h +#include asm/io.h +#include asm/arch/hardware.h +#include asm/arch/spr_misc.h + +#ifdef CONFIG_ARCH_CPU_INIT +int arch_cpu_init(void) +{ + struct misc_regs *const misc_p = + (struct misc_regs *)CONFIG_SPEAR_MISCBASE; + u32 periph1_clken; + + periph1_clken = readl(misc_p-periph1_clken); + +#if defined(CONFIG_PL011_SERIAL) + periph1_clken |= MISC_UART0ENB; +#endif +#if defined(CONFIG_DESIGNWARE_ETH) + periph1_clken |= MISC_ETHENB; +#endif +#if defined(CONFIG_DW_UDC) + periph1_clken |= MISC_USBDENB; +#endif +#if defined(CONFIG_DW_I2C) + periph1_clken |= MISC_I2CENB; +#endif +#if defined(CONFIG_ST_SMI) + periph1_clken |= MISC_SMIENB; +#endif +#if defined(CONFIG_NAND_FSMC) + periph1_clken |= MISC_FSMCENB; +#endif + + writel(periph1_clken, misc_p-periph1_clken); + return 0; +} +#endif + +#ifdef CONFIG_DISPLAY_CPUINFO +int print_cpuinfo(void) +{ +#ifdef CONFIG_SPEAR300 + printf(CPU: SPEAr300\n); +#elif defined(CONFIG_SPEAR310) + printf(CPU: SPEAr310\n); +#elif defined(CONFIG_SPEAR320) + printf(CPU: SPEAr320\n); +#elif defined(CONFIG_SPEAR600) + printf(CPU: SPEAr600\n); +#else +#error CPU not supported in spear platform +#endif + return 0; +} +#endif diff --git a/arch/arm/include/asm/arch-spear/spr_misc.h b/arch/arm/include/asm/arch-spear/spr_misc.h index 8b96d9b..045d2bb 100644 --- a/arch/arm/include/asm/arch-spear/spr_misc.h +++ b/arch/arm/include/asm/arch-spear/spr_misc.h @@ -126,5 +126,10 @@ struct misc_regs { /* PERIPH1_CLKEN, PERIPH1_RST value */ #define MISC_USBDENB 0x0100 +#define MISC_ETHENB0x0080 +#define MISC_SMIENB0x0020 +#define MISC_FSMCENB 0x0200 +#define MISC_I2CENB0x0080 +#define MISC_UART0ENB 0x0008 #endif diff --git a/include/configs/spear-common.h b/include/configs/spear-common.h index b526558..10beef7 100644 --- a/include/configs/spear-common.h +++ b/include/configs/spear-common.h @@ -168,6 +168,8 @@ #define CONFIG_ENV_SIZE0x02000 /* Miscellaneous configurable options */ +#define CONFIG_ARCH_CPU_INIT 1 +#define CONFIG_DISPLAY_CPUINFO 1 #define CONFIG_BOOT_PARAMS_ADDR0x0100 #define CONFIG_CMDLINE_TAG 1 #define CONFIG_SETUP_MEMORY_TAGS 1 -- 1.6.0.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3 08/19] SPEAr : Network support configured for spear SoCs
Signed-off-by: Vipin Kumar vipin.ku...@st.com --- arch/arm/include/asm/arch-spear/hardware.h |1 + board/spear/spear300/spear300.c| 10 ++ board/spear/spear310/spear310.c| 10 ++ board/spear/spear320/spear320.c| 10 ++ board/spear/spear600/spear600.c| 10 ++ include/configs/spear-common.h | 14 -- include/configs/spear3xx.h |3 +++ 7 files changed, 56 insertions(+), 2 deletions(-) diff --git a/arch/arm/include/asm/arch-spear/hardware.h b/arch/arm/include/asm/arch-spear/hardware.h index 818f36c..39d64b6 100644 --- a/arch/arm/include/asm/arch-spear/hardware.h +++ b/arch/arm/include/asm/arch-spear/hardware.h @@ -31,6 +31,7 @@ #define CONFIG_SPEAR_SYSCNTLBASE (0xFCA0) #define CONFIG_SPEAR_TIMERBASE (0xFC80) #define CONFIG_SPEAR_MISCBASE (0xFCA8) +#define CONFIG_SPEAR_ETHBASE (0xE080) #define CONFIG_SYS_NAND_CLE(1 16) #define CONFIG_SYS_NAND_ALE(1 17) diff --git a/board/spear/spear300/spear300.c b/board/spear/spear300/spear300.c index 60ee544..774f466 100644 --- a/board/spear/spear300/spear300.c +++ b/board/spear/spear300/spear300.c @@ -22,6 +22,7 @@ */ #include common.h +#include netdev.h #include nand.h #include asm/io.h #include asm/arch/hardware.h @@ -56,3 +57,12 @@ int board_nand_init(struct nand_chip *nand) return -1; } + +int board_eth_init(bd_t *bis) +{ +#if defined(CONFIG_DESIGNWARE_ETH) + return designware_initialize(0, CONFIG_SPEAR_ETHBASE, CONFIG_DW0_PHY); +#else + return -1; +#endif +} diff --git a/board/spear/spear310/spear310.c b/board/spear/spear310/spear310.c index 03dfe16..f25eedf 100644 --- a/board/spear/spear310/spear310.c +++ b/board/spear/spear310/spear310.c @@ -23,6 +23,7 @@ */ #include common.h +#include netdev.h #include nand.h #include asm/io.h #include asm/arch/hardware.h @@ -57,3 +58,12 @@ int board_nand_init(struct nand_chip *nand) return -1; } + +int board_eth_init(bd_t *bis) +{ +#if defined(CONFIG_DESIGNWARE_ETH) + return designware_initialize(0, CONFIG_SPEAR_ETHBASE, CONFIG_DW0_PHY); +#else + return -1; +#endif +} diff --git a/board/spear/spear320/spear320.c b/board/spear/spear320/spear320.c index 2ba2dbb..1ed05aa 100644 --- a/board/spear/spear320/spear320.c +++ b/board/spear/spear320/spear320.c @@ -23,6 +23,7 @@ */ #include common.h +#include netdev.h #include nand.h #include asm/io.h #include asm/arch/hardware.h @@ -57,3 +58,12 @@ int board_nand_init(struct nand_chip *nand) return -1; } + +int board_eth_init(bd_t *bis) +{ +#if defined(CONFIG_DESIGNWARE_ETH) + return designware_initialize(0, CONFIG_SPEAR_ETHBASE, CONFIG_DW0_PHY); +#else + return -1; +#endif +} diff --git a/board/spear/spear600/spear600.c b/board/spear/spear600/spear600.c index eef9a37..cd7ff2c 100644 --- a/board/spear/spear600/spear600.c +++ b/board/spear/spear600/spear600.c @@ -22,6 +22,7 @@ */ #include common.h +#include netdev.h #include nand.h #include asm/io.h #include asm/arch/hardware.h @@ -51,3 +52,12 @@ int board_nand_init(struct nand_chip *nand) return -1; } + +int board_eth_init(bd_t *bis) +{ +#if defined(CONFIG_DESIGNWARE_ETH) + return designware_initialize(0, CONFIG_SPEAR_ETHBASE, CONFIG_DW0_PHY); +#else + return -1; +#endif +} diff --git a/include/configs/spear-common.h b/include/configs/spear-common.h index 10beef7..1398837 100644 --- a/include/configs/spear-common.h +++ b/include/configs/spear-common.h @@ -27,6 +27,14 @@ * Common configurations used for both spear3xx as well as spear6xx */ +/* Ethernet driver configuration */ +#define CONFIG_MII +#define CONFIG_DESIGNWARE_ETH +#define CONFIG_DW_SEARCH_PHY +#define CONFIG_DW0_PHY 1 +#define CONFIG_NET_MULTI +#define CONFIG_PHY_RESET_DELAY (1) /* in usec */ + /* USBD driver configuration */ #define CONFIG_SPEARUDC #define CONFIG_USB_DEVICE @@ -99,11 +107,13 @@ #define CONFIG_CMD_MEMORY #define CONFIG_CMD_RUN #define CONFIG_CMD_SAVES +#define CONFIG_CMD_NET +#define CONFIG_CMD_MII +#define CONFIG_CMD_PING +#define CONFIG_CMD_DHCP /* This must be included AFTER the definition of CONFIG_COMMANDS (if any) */ #include config_cmd_default.h -#undef CONFIG_CMD_NET -#undef CONFIG_CMD_NFS /* * Default Environment Varible definitions diff --git a/include/configs/spear3xx.h b/include/configs/spear3xx.h index 0248aba..502c50f 100644 --- a/include/configs/spear3xx.h +++ b/include/configs/spear3xx.h @@ -41,6 +41,9 @@ #include configs/spear-common.h +/* Ethernet driver configuration */ +#define CONFIG_DW_ALTDESCRIPTOR1 + /* Serial Configuration (PL011) */ #define CONFIG_SYS_SERIAL0 0xD000 -- 1.6.0.2 ___
[U-Boot] [PATCH v3 05/19] SPEAr : Reducing the max RAM size to 128MB
Signed-off-by: Vipin Kumar vipin.ku...@st.com --- include/configs/spear-common.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/include/configs/spear-common.h b/include/configs/spear-common.h index cc52e39..b526558 100644 --- a/include/configs/spear-common.h +++ b/include/configs/spear-common.h @@ -208,6 +208,6 @@ /* Physical Memory Map */ #define CONFIG_NR_DRAM_BANKS 1 #define PHYS_SDRAM_1 0x -#define PHYS_SDRAM_1_MAXSIZE 0x4000 +#define PHYS_SDRAM_1_MAXSIZE 0x0800 #endif -- 1.6.0.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3 12/19] SPEAr : i2c driver moved completely into drivers/i2c
The earlier i2c driver was specific to spear platforms. This patch implements the i2c controller as a generic driver which can be used by multiple platforms The driver files are now renamed to designware_i2c.c and designware_i2c.h and these are moved into drivers/i2c folder for reusability by other platforms Signed-off-by: Vipin Kumar vipin.ku...@st.com --- drivers/i2c/Makefile |2 +- drivers/i2c/{spr_i2c.c = designware_i2c.c}|4 ++-- .../spr_i2c.h = drivers/i2c/designware_i2c.h |6 +++--- include/configs/spear-common.h |2 +- 4 files changed, 7 insertions(+), 7 deletions(-) rename drivers/i2c/{spr_i2c.c = designware_i2c.c} (98%) rename arch/arm/include/asm/arch-spear/spr_i2c.h = drivers/i2c/designware_i2c.h (98%) diff --git a/drivers/i2c/Makefile b/drivers/i2c/Makefile index d2c2515..099a6cd 100644 --- a/drivers/i2c/Makefile +++ b/drivers/i2c/Makefile @@ -27,6 +27,7 @@ LIB := $(obj)libi2c.a COBJS-$(CONFIG_BFIN_TWI_I2C) += bfin-twi_i2c.o COBJS-$(CONFIG_DRIVER_DAVINCI_I2C) += davinci_i2c.o +COBJS-$(CONFIG_DW_I2C) += designware_i2c.o COBJS-$(CONFIG_FSL_I2C) += fsl_i2c.o COBJS-$(CONFIG_I2C_KIRKWOOD) += kirkwood_i2c.o COBJS-$(CONFIG_I2C_MXC) += mxc_i2c.o @@ -38,7 +39,6 @@ COBJS-$(CONFIG_PPC4XX_I2C) += ppc4xx_i2c.o COBJS-$(CONFIG_DRIVER_S3C24X0_I2C) += s3c24x0_i2c.o COBJS-$(CONFIG_S3C44B0_I2C) += s3c44b0_i2c.o COBJS-$(CONFIG_SOFT_I2C) += soft_i2c.o -COBJS-$(CONFIG_SPEAR_I2C) += spr_i2c.o COBJS-$(CONFIG_TSI108_I2C) += tsi108_i2c.o COBJS := $(COBJS-y) diff --git a/drivers/i2c/spr_i2c.c b/drivers/i2c/designware_i2c.c similarity index 98% rename from drivers/i2c/spr_i2c.c rename to drivers/i2c/designware_i2c.c index eabfe84..d352146 100644 --- a/drivers/i2c/spr_i2c.c +++ b/drivers/i2c/designware_i2c.c @@ -24,7 +24,7 @@ #include common.h #include asm/io.h #include asm/arch/hardware.h -#include asm/arch/spr_i2c.h +#include designware_i2c.h static struct i2c_regs *const i2c_regs_p = (struct i2c_regs *)CONFIG_SYS_I2C_BASE; @@ -113,7 +113,7 @@ int i2c_get_bus_speed(void) /* * i2c_init - Init function * @speed: required i2c speed - * @slaveadd: slave address for the spear device + * @slaveadd: slave address for the device * * Initialization function. */ diff --git a/arch/arm/include/asm/arch-spear/spr_i2c.h b/drivers/i2c/designware_i2c.h similarity index 98% rename from arch/arm/include/asm/arch-spear/spr_i2c.h rename to drivers/i2c/designware_i2c.h index 7521ebc..03b520e 100644 --- a/arch/arm/include/asm/arch-spear/spr_i2c.h +++ b/drivers/i2c/designware_i2c.h @@ -21,8 +21,8 @@ * MA 02111-1307 USA */ -#ifndef __SPR_I2C_H_ -#define __SPR_I2C_H_ +#ifndef __DW_I2C_H_ +#define __DW_I2C_H_ struct i2c_regs { u32 ic_con; @@ -143,4 +143,4 @@ struct i2c_regs { #define I2C_FAST_SPEED 40 #define I2C_STANDARD_SPEED 10 -#endif /* __SPR_I2C_H_ */ +#endif /* __DW_I2C_H_ */ diff --git a/include/configs/spear-common.h b/include/configs/spear-common.h index a54d534..2393bdf 100644 --- a/include/configs/spear-common.h +++ b/include/configs/spear-common.h @@ -47,7 +47,7 @@ /* I2C driver configuration */ #define CONFIG_HARD_I2C -#define CONFIG_SPEAR_I2C +#define CONFIG_DW_I2C #define CONFIG_SYS_I2C_SPEED 40 #define CONFIG_SYS_I2C_SLAVE 0x02 -- 1.6.0.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3 10/19] SPEAr : FSMC driver support added
Flexible static memory controller is a peripheral provided by ST, which controls the access to NAND chips along with many other memory device chips eg NOR, SRAM. This patch adds the driver support for FSMC controller interfacing with NAND memory. Signed-off-by: Vipin Kumar vipin.ku...@st.com --- drivers/mtd/nand/Makefile |1 + drivers/mtd/nand/fsmc_nand.c | 366 + include/linux/mtd/fsmc_nand.h | 104 3 files changed, 471 insertions(+), 0 deletions(-) create mode 100644 drivers/mtd/nand/fsmc_nand.c create mode 100644 include/linux/mtd/fsmc_nand.h diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile index 28f27da..4c6b54f 100644 --- a/drivers/mtd/nand/Makefile +++ b/drivers/mtd/nand/Makefile @@ -38,6 +38,7 @@ COBJS-$(CONFIG_DRIVER_NAND_BFIN) += bfin_nand.o COBJS-$(CONFIG_NAND_DAVINCI) += davinci_nand.o COBJS-$(CONFIG_NAND_FSL_ELBC) += fsl_elbc_nand.o COBJS-$(CONFIG_NAND_FSL_UPM) += fsl_upm.o +COBJS-$(CONFIG_NAND_FSMC) += fsmc_nand.o COBJS-$(CONFIG_NAND_KB9202) += kb9202_nand.o COBJS-$(CONFIG_NAND_KIRKWOOD) += kirkwood_nand.o COBJS-$(CONFIG_NAND_KMETER1) += kmeter1_nand.o diff --git a/drivers/mtd/nand/fsmc_nand.c b/drivers/mtd/nand/fsmc_nand.c new file mode 100644 index 000..39c3213 --- /dev/null +++ b/drivers/mtd/nand/fsmc_nand.c @@ -0,0 +1,366 @@ +/* + * (C) Copyright 2010 + * Vipin Kumar, ST Micoelectronics, vipin.ku...@st.com. + * + * 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 common.h +#include nand.h +#include asm/io.h +#include linux/bitops.h +#include linux/err.h +#include linux/mtd/nand_ecc.h +#include linux/mtd/fsmc_nand.h +#include asm/arch/hardware.h + +static u32 fsmc_version; +static struct fsmc_regs *const fsmc_regs_p = +(struct fsmc_regs *)CONFIG_SYS_FSMC_BASE; + +/* + * ECC4 and ECC1 have 13 bytes and 3 bytes of ecc respectively for 512 bytes of + * data. ECC4 can correct up to 8 bits in 512 bytes of data while ECC1 can + * correct 1 bit in 512 bytes + */ + +#if defined(CONFIG_SYS_FSMC_NAND_LP) +static struct nand_ecclayout fsmc_ecc4_layout = { + .eccbytes = 104, + .eccpos = { 2, 3, 4, 5, 6, 7, 8, + 9, 10, 11, 12, 13, 14, + 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, + 34, 35, 36, 37, 38, 39, 40, + 41, 42, 43, 44, 45, 46, + 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 60, 61, 62, + 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, 76, 77, 78, + 82, 83, 84, 85, 86, 87, 88, + 89, 90, 91, 92, 93, 94, + 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, + 114, 115, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, 126 + }, + .oobfree = { + {.offset = 15, .length = 3}, + {.offset = 31, .length = 3}, + {.offset = 47, .length = 3}, + {.offset = 63, .length = 3}, + {.offset = 79, .length = 3}, + {.offset = 95, .length = 3}, + {.offset = 111, .length = 3}, + {.offset = 127, .length = 1} + } +}; + +/* + * ECC placement definitions in oobfree type format + * There are 13 bytes of ecc for every 512 byte block and it has to be read + * consecutively and immediately after the 512 byte data block for hardware to + * generate the error bit offsets in 512 byte data + * Managing the ecc bytes in the following way makes it easier for software to + * read ecc bytes consecutive to data bytes. This way is similar to + * oobfree structure maintained already in u-boot nand driver + */ +static struct fsmc_eccplace fsmc_eccpl = { + .eccplace = { + {.offset = 2, .length = 13}, + {.offset = 18, .length = 13}, + {.offset = 34, .length = 13}, + {.offset = 50, .length = 13}, + {.offset = 66, .length = 13}, + {.offset = 82, .length = 13}, + {.offset = 98, .length = 13}, + {.offset = 114, .length = 13} + } +};
[U-Boot] [PATCH v3 14/19] SPEAr : USB Device Controller driver support added
The earlier usb device controller driver was specific to spear platforms. This patch implements the usb device controller driver as a generic controller which can be reused by other platforms using this peripheral. Signed-off-by: Vipin Kumar vipin.ku...@st.com --- drivers/serial/usbtty.h|4 +- drivers/usb/gadget/Makefile|2 +- drivers/usb/gadget/{spr_udc.c = designware_udc.c} | 57 ++-- include/configs/spear-common.h |4 +- include/usb/{spr_udc.h = designware_udc.h}|6 +- 5 files changed, 37 insertions(+), 36 deletions(-) rename drivers/usb/gadget/{spr_udc.c = designware_udc.c} (94%) rename include/usb/{spr_udc.h = designware_udc.h} (98%) diff --git a/drivers/serial/usbtty.h b/drivers/serial/usbtty.h index a23169a..38b407f 100644 --- a/drivers/serial/usbtty.h +++ b/drivers/serial/usbtty.h @@ -33,8 +33,8 @@ #include usb/musb_udc.h #elif defined(CONFIG_PXA27X) #include usb/pxa27x_udc.h -#elif defined(CONFIG_SPEAR3XX) || defined(CONFIG_SPEAR600) -#include usb/spr_udc.h +#elif defined(CONFIG_DW_UDC) +#include usb/designware_udc.h #endif #include version_autogenerated.h diff --git a/drivers/usb/gadget/Makefile b/drivers/usb/gadget/Makefile index 1d7362d..3820f36 100644 --- a/drivers/usb/gadget/Makefile +++ b/drivers/usb/gadget/Makefile @@ -28,11 +28,11 @@ LIB := $(obj)libusb_gadget.a ifdef CONFIG_USB_DEVICE COBJS-y += core.o COBJS-y += ep0.o +COBJS-$(CONFIG_DW_UDC) += designware_udc.o COBJS-$(CONFIG_OMAP1510) += omap1510_udc.o COBJS-$(CONFIG_OMAP1610) += omap1510_udc.o COBJS-$(CONFIG_MPC885_FAMILY) += mpc8xx_udc.o COBJS-$(CONFIG_PXA27X) += pxa27x_udc.o -COBJS-$(CONFIG_SPEARUDC) += spr_udc.o endif COBJS := $(COBJS-y) diff --git a/drivers/usb/gadget/spr_udc.c b/drivers/usb/gadget/designware_udc.c similarity index 94% rename from drivers/usb/gadget/spr_udc.c rename to drivers/usb/gadget/designware_udc.c index f2b06d6..aee44aa 100644 --- a/drivers/usb/gadget/spr_udc.c +++ b/drivers/usb/gadget/designware_udc.c @@ -29,14 +29,13 @@ #include usbdevice.h #include ep0.h -#include usb/spr_udc.h +#include usb/designware_udc.h #include asm/arch/hardware.h -#include asm/arch/spr_misc.h #define UDC_INIT_MDELAY80 /* Device settle delay */ /* Some kind of debugging output... */ -#ifndef DEBUG_SPRUSBTTY +#ifndef DEBUG_DWUSBTTY #define UDCDBG(str) #define UDCDBGA(fmt, args...) #else @@ -251,7 +250,7 @@ static void usbputpcktofifo(int epNum, u8 *bufp, u32 len) } /* - * spear_write_noniso_tx_fifo - Write the next packet to TxFIFO. + * dw_write_noniso_tx_fifo - Write the next packet to TxFIFO. * @endpoint: Endpoint pointer. * * If the endpoint has an active tx_urb, then the next packet of data from the @@ -263,7 +262,7 @@ static void usbputpcktofifo(int epNum, u8 *bufp, u32 len) * transmitted in this packet. * */ -static void spear_write_noniso_tx_fifo(struct usb_endpoint_instance +static void dw_write_noniso_tx_fifo(struct usb_endpoint_instance *endpoint) { struct urb *urb = endpoint-tx_urb; @@ -307,7 +306,7 @@ static void spear_write_noniso_tx_fifo(struct usb_endpoint_instance * Handle SETUP USB interrupt. * This function implements TRM Figure 14-14. */ -static void spear_udc_setup(struct usb_endpoint_instance *endpoint) +static void dw_udc_setup(struct usb_endpoint_instance *endpoint) { u8 *datap = (u8 *)ep0_urb-device_request; int ep_addr = endpoint-endpoint_address; @@ -344,11 +343,11 @@ static void spear_udc_setup(struct usb_endpoint_instance *endpoint) endpoint-tx_urb = ep0_urb; endpoint-sent = 0; /* -* Write packet data to the FIFO. spear_write_noniso_tx_fifo +* Write packet data to the FIFO. dw_write_noniso_tx_fifo * will update endpoint-last with the number of bytes written * to the FIFO. */ - spear_write_noniso_tx_fifo(endpoint); + dw_write_noniso_tx_fifo(endpoint); writel(0x0, inep_regs_p[ep_addr].write_done); } @@ -361,7 +360,7 @@ static void spear_udc_setup(struct usb_endpoint_instance *endpoint) /* * Handle endpoint 0 RX interrupt */ -static void spear_udc_ep0_rx(struct usb_endpoint_instance *endpoint) +static void dw_udc_ep0_rx(struct usb_endpoint_instance *endpoint) { u8 dummy[64]; @@ -395,7 +394,7 @@ static void spear_udc_ep0_rx(struct usb_endpoint_instance *endpoint) /* * Handle endpoint 0 TX interrupt */ -static void spear_udc_ep0_tx(struct usb_endpoint_instance *endpoint) +static void dw_udc_ep0_tx(struct usb_endpoint_instance *endpoint) { struct usb_device_request *request = ep0_urb-device_request; int ep_addr; @@ -444,7 +443,7 @@ static void spear_udc_ep0_tx(struct usb_endpoint_instance *endpoint)
[U-Boot] [PATCH v3 09/19] SPEAr : macb driver support added for spear310 and spear320
SPEAr310 and SPEAr320 SoCs have an extra ethernet controller. The driver for this device is already supported by u-boot, so configuring board configuration file and defining base addresses etc to make use of the common driver Signed-off-by: Vipin Kumar vipin.ku...@st.com --- arch/arm/include/asm/arch-spear/clk.h | 27 +++ arch/arm/include/asm/arch-spear/hardware.h |7 +++ board/spear/spear310/spear310.c| 25 ++--- board/spear/spear320/spear320.c| 12 +--- include/configs/spear3xx.h | 13 + 5 files changed, 78 insertions(+), 6 deletions(-) create mode 100644 arch/arm/include/asm/arch-spear/clk.h diff --git a/arch/arm/include/asm/arch-spear/clk.h b/arch/arm/include/asm/arch-spear/clk.h new file mode 100644 index 000..a45ec18 --- /dev/null +++ b/arch/arm/include/asm/arch-spear/clk.h @@ -0,0 +1,27 @@ +/* + * (C) Copyright 2010 + * Vipin Kumar, STMicroelectronics, vipin.ku...@st.com + * + * 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 + */ + +static inline unsigned long get_macb_pclk_rate(unsigned int dev_id) +{ + return 8300; +} diff --git a/arch/arm/include/asm/arch-spear/hardware.h b/arch/arm/include/asm/arch-spear/hardware.h index 39d64b6..9f1e154 100644 --- a/arch/arm/include/asm/arch-spear/hardware.h +++ b/arch/arm/include/asm/arch-spear/hardware.h @@ -56,6 +56,11 @@ #define CONFIG_SPEAR_EMIBASE (0x4F00) #define CONFIG_SPEAR_RASBASE (0xB400) +#define CONFIG_SYS_MACB0_BASE (0xB000) +#define CONFIG_SYS_MACB1_BASE (0xB080) +#define CONFIG_SYS_MACB2_BASE (0xB100) +#define CONFIG_SYS_MACB3_BASE (0xB180) + #elif defined(CONFIG_SPEAR320) #define CONFIG_SYS_I2C_BASE(0xD018) #define CONFIG_SPEAR_FSMCBASE (0x4C00) @@ -63,5 +68,7 @@ #define CONFIG_SPEAR_EMIBASE (0x4000) #define CONFIG_SPEAR_RASBASE (0xB300) +#define CONFIG_SYS_MACB0_BASE (0xAA00) + #endif #endif /* _ASM_ARCH_HARDWARE_H */ diff --git a/board/spear/spear310/spear310.c b/board/spear/spear310/spear310.c index f25eedf..96f1e00 100644 --- a/board/spear/spear310/spear310.c +++ b/board/spear/spear310/spear310.c @@ -61,9 +61,28 @@ int board_nand_init(struct nand_chip *nand) int board_eth_init(bd_t *bis) { + int ret = 0; + #if defined(CONFIG_DESIGNWARE_ETH) - return designware_initialize(0, CONFIG_SPEAR_ETHBASE, CONFIG_DW0_PHY); -#else - return -1; + if (designware_initialize(0, CONFIG_SPEAR_ETHBASE, CONFIG_DW0_PHY) 0) + ret += -1; +#endif +#if defined(CONFIG_MACB) + if (macb_eth_initialize(0, (void *)CONFIG_SYS_MACB0_BASE, + CONFIG_MACB0_PHY) 0) + ret += -1; + + if (macb_eth_initialize(1, (void *)CONFIG_SYS_MACB1_BASE, + CONFIG_MACB1_PHY) 0) + ret += -1; + + if (macb_eth_initialize(2, (void *)CONFIG_SYS_MACB2_BASE, + CONFIG_MACB2_PHY) 0) + ret += -1; + + if (macb_eth_initialize(3, (void *)CONFIG_SYS_MACB3_BASE, + CONFIG_MACB3_PHY) 0) + ret += -1; #endif + return ret; } diff --git a/board/spear/spear320/spear320.c b/board/spear/spear320/spear320.c index 1ed05aa..c3208e2 100644 --- a/board/spear/spear320/spear320.c +++ b/board/spear/spear320/spear320.c @@ -61,9 +61,15 @@ int board_nand_init(struct nand_chip *nand) int board_eth_init(bd_t *bis) { + int ret = 0; #if defined(CONFIG_DESIGNWARE_ETH) - return designware_initialize(0, CONFIG_SPEAR_ETHBASE, CONFIG_DW0_PHY); -#else - return -1; + if (designware_initialize(0, CONFIG_SPEAR_ETHBASE, CONFIG_DW0_PHY) 0) + ret += -1; +#endif +#if defined(CONFIG_MACB) + if (macb_eth_initialize(0, (void *)CONFIG_SYS_MACB0_BASE, + CONFIG_MACB0_PHY) 0) + ret += -1; #endif + return ret; } diff --git a/include/configs/spear3xx.h
[U-Boot] [PATCH v3 07/19] SPEAr : Network driver support added
Designware network driver support added. This is a Synopsys ethernet controller Signed-off-by: Vipin Kumar vipin.ku...@st.com --- doc/README.designware_eth | 25 ++ drivers/net/Makefile |1 + drivers/net/designware.c | 531 + drivers/net/designware.h | 264 ++ include/netdev.h |1 + 5 files changed, 822 insertions(+), 0 deletions(-) create mode 100644 doc/README.designware_eth create mode 100644 drivers/net/designware.c create mode 100644 drivers/net/designware.h diff --git a/doc/README.designware_eth b/doc/README.designware_eth new file mode 100644 index 000..25ec6bd --- /dev/null +++ b/doc/README.designware_eth @@ -0,0 +1,25 @@ +This driver supports Designware Ethernet Controller provided by Synopsis. + +The driver is enabled by CONFIG_DESIGNWARE_ETH. + +The driver has been developed and tested on SPEAr platforms. By default, the +MDIO interface works at 100/Full. #defining the below options in board +configuration file changes this behavior. + +Call an subroutine from respective board/.../board.c +designware_initialize(u32 id, ulong base_addr, u32 phy_addr); + +The various options suported by the driver are +1. CONFIG_DW_ALTDESCRIPTOR + Define this to use the Alternate/Enhanced Descriptor configurations. +1. CONFIG_DW_AUTONEG + Define this to autonegotiate with the host before proceeding with mac + level configuration. This obviates the definitions of CONFIG_DW_SPEED10M + and CONFIG_DW_DUPLEXHALF. +2. CONFIG_DW_SPEED10M + Define this to change the default behavior from 100Mbps to 10Mbps. +3. CONFIG_DW_DUPLEXHALF + Define this to change the default behavior from Full Duplex to Half. +4. CONFIG_DW_SEARCH_PHY + Define this to search the phy address. This would overwrite the value + passed as 3rd arg from designware_initialize routine. diff --git a/drivers/net/Makefile b/drivers/net/Makefile index b75c02f..7a320fd 100644 --- a/drivers/net/Makefile +++ b/drivers/net/Makefile @@ -34,6 +34,7 @@ COBJS-$(CONFIG_BCM570x) += bcm570x.o bcm570x_autoneg.o 5701rls.o COBJS-$(CONFIG_BFIN_MAC) += bfin_mac.o COBJS-$(CONFIG_CS8900) += cs8900.o COBJS-$(CONFIG_TULIP) += dc2114x.o +COBJS-$(CONFIG_DESIGNWARE_ETH) += designware.o COBJS-$(CONFIG_DRIVER_DM9000) += dm9000x.o COBJS-$(CONFIG_DNET) += dnet.o COBJS-$(CONFIG_E1000) += e1000.o diff --git a/drivers/net/designware.c b/drivers/net/designware.c new file mode 100644 index 000..d0d9827 --- /dev/null +++ b/drivers/net/designware.c @@ -0,0 +1,531 @@ +/* + * (C) Copyright 2010 + * Vipin Kumar, ST Micoelectronics, vipin.ku...@st.com. + * + * 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 + */ + +/* + * Designware ethernet IP driver for u-boot + */ + +#include common.h +#include miiphy.h +#include malloc.h +#include linux/err.h +#include asm/io.h +#include designware.h + +static void tx_descs_init(struct eth_device *dev) +{ + struct dw_eth_dev *priv = dev-priv; + struct eth_dma_regs *dma_p = priv-dma_regs_p; + struct dmamacdescr *desc_table_p = priv-tx_mac_descrtable[0]; + char *txbuffs = priv-txbuffs[0]; + struct dmamacdescr *desc_p; + u32 idx; + + for (idx = 0; idx CONFIG_TX_DESCR_NUM; idx++) { + desc_p = desc_table_p[idx]; + desc_p-dmamac_addr = txbuffs[idx * CONFIG_ETH_BUFSIZE]; + desc_p-dmamac_next = desc_table_p[idx + 1]; + +#if defined(CONFIG_DW_ALTDESCRIPTOR) + desc_p-txrx_status = ~(DESC_TXSTS_TXINT | DESC_TXSTS_TXLAST | + DESC_TXSTS_TXFIRST | DESC_TXSTS_TXCRCDIS | \ + DESC_TXSTS_TXCHECKINSCTRL | \ + DESC_TXSTS_TXRINGEND | DESC_TXSTS_TXPADDIS); + + desc_p-txrx_status |= DESC_TXSTS_TXCHAIN; + desc_p-dmamac_cntl = 0; + desc_p-txrx_status = ~(DESC_TXSTS_MSK | DESC_TXSTS_OWNBYDMA); +#else + desc_p-dmamac_cntl = DESC_TXCTRL_TXCHAIN; + desc_p-txrx_status = 0; +#endif + } + + /* Correcting the last pointer of the chain */ + desc_p-dmamac_next = desc_table_p[0]; + + writel((ulong)desc_table_p[0],
[U-Boot] [PATCH v3 17/19] SPEAr : spear1300 SoC support added
SPEAr1300 SoC support contains basic spear1300 support along with the usage of following drivers - serial driver(UART) - i2c driver - smi driver - nand driver(FSMC) - usbd driver Signed-off-by: Vipin Kumar vipin.ku...@st.com --- MAINTAINERS|1 + MAKEALL|1 + Makefile |6 + arch/arm/include/asm/arch-spear13xx/hardware.h |8 +- board/spear/common/Makefile| 10 +- board/spear/spear1300/Makefile | 51 ++ board/spear/spear1300/config.mk| 28 board/spear/spear1300/spear1300.c | 88 ++ board/spear/spear1300/spr_lowlevel_init.S | 38 + doc/README.spear | 11 +- include/configs/spear13xx_evb.h| 202 11 files changed, 436 insertions(+), 8 deletions(-) create mode 100644 board/spear/spear1300/Makefile create mode 100644 board/spear/spear1300/config.mk create mode 100644 board/spear/spear1300/spear1300.c create mode 100644 board/spear/spear1300/spr_lowlevel_init.S create mode 100644 include/configs/spear13xx_evb.h diff --git a/MAINTAINERS b/MAINTAINERS index 5cbc845..9275279 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -650,6 +650,7 @@ Prakash Kumar prak...@embedx.com Vipin Kumar vipin.ku...@st.com + spear1300 ARM CORTEX-A9 (spear1300 Soc) spear300ARM926EJS (spear300 Soc) spear310ARM926EJS (spear310 Soc) spear320ARM926EJS (spear320 Soc) diff --git a/MAKEALL b/MAKEALL index bb09627..d098b35 100755 --- a/MAKEALL +++ b/MAKEALL @@ -651,6 +651,7 @@ LIST_ARM_CORTEX_A8=\ omap3_zoom1 \ omap3_zoom2 \ smdkc100\ + spear1300 \ # diff --git a/Makefile b/Makefile index e8b4ac9..5f1da2f 100644 --- a/Makefile +++ b/Makefile @@ -3063,6 +3063,12 @@ spear600_usbtty_config \ spear600_usbtty_nand_config : unconfig @$(MKCONFIG) -n $@ -t $(@:_config=) spear6xx_evb arm arm926ejs $(@:_config=) spear spear +spear1300_config \ +spear1300_nand_config \ +spear1300_usbtty_config \ +spear1300_usbtty_nand_config : unconfig + @$(MKCONFIG) -n $@ -t $(@:_config=) spear13xx_evb arm arm_cortexa8 spear1300 spear spear13xx + suen3_config: unconfig @$(MKCONFIG) $(@:_config=) arm arm926ejs km_arm keymile kirkwood diff --git a/arch/arm/include/asm/arch-spear13xx/hardware.h b/arch/arm/include/asm/arch-spear13xx/hardware.h index 020ab2a..e3dd6e5 100644 --- a/arch/arm/include/asm/arch-spear13xx/hardware.h +++ b/arch/arm/include/asm/arch-spear13xx/hardware.h @@ -24,10 +24,10 @@ #ifndef _ASM_ARCH_SPEAR13XX_HARDWARE_H #define _ASM_ARCH_SPEAR13XX_HARDWARE_H -#define CONFIG_SYS_USBD_BASE (0xE110) -#define CONFIG_SYS_PLUG_BASE (0xE120) -#define CONFIG_SYS_FIFO_BASE (0xE1000800) -#define CONFIG_SYS_SMI_BASE(0xFC00) +#define CONFIG_SYS_USBD_BASE (0xE380) +#define CONFIG_SYS_PLUG_BASE (0xE280) +#define CONFIG_SYS_FIFO_BASE (0xE3000800) +#define CONFIG_SYS_SMI_BASE(0xEA00) #define CONFIG_SPEAR_TIMERBASE (0xE038) #define CONFIG_SPEAR_MISCBASE (0xE070) #define CONFIG_SYS_I2C_BASE(0xE028) diff --git a/board/spear/common/Makefile b/board/spear/common/Makefile index 4f8959f..1ae4fd4 100644 --- a/board/spear/common/Makefile +++ b/board/spear/common/Makefile @@ -29,8 +29,14 @@ endif LIB= $(obj)lib$(VENDOR).a -COBJS := spr_misc.o -SOBJS := spr_lowlevel_init.o +COBJS-$(CONFIG_SPEAR3XX) += spr_misc.o +COBJS-$(CONFIG_SPEAR600) += spr_misc.o + +SOBJS-$(CONFIG_SPEAR3XX) += spr_lowlevel_init.o +SOBJS-$(CONFIG_SPEAR600) += spr_lowlevel_init.o + +COBJS := $(COBJS-y) +SOBJS := $(SOBJS-y) SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS)) diff --git a/board/spear/spear1300/Makefile b/board/spear/spear1300/Makefile new file mode 100644 index 000..fb66895 --- /dev/null +++ b/board/spear/spear1300/Makefile @@ -0,0 +1,51 @@ +# +# (C) Copyright 2000-2004 +# 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.
[U-Boot] [PATCH v3 16/19] SPEAr : Basic spear1300 architecture support added
SPEAr1300 is an ARMCortexA9 dual core based SoC which supports multiple peripherals such as 1. Ethernet Controller 2. USB Device Controller 3. USB Host Controllers 4. MTD interfaces for NAND and NOR(serial and parallel) flash devices etc For more information, visit www.st.com/spear This patch adds the architecture support for spear1300. Signed-off-by: Vipin Kumar vipin.ku...@st.com --- arch/arm/cpu/arm_cortexa8/spear13xx/Makefile| 52 arch/arm/cpu/arm_cortexa8/spear13xx/cache.S | 114 arch/arm/cpu/arm_cortexa8/spear13xx/cpu.c | 96 +++ arch/arm/cpu/arm_cortexa8/spear13xx/reset.c | 47 arch/arm/cpu/arm_cortexa8/spear13xx/timer.c | 138 ++ arch/arm/include/asm/arch-spear13xx/hardware.h | 40 +++ arch/arm/include/asm/arch-spear13xx/spr_gpt.h | 85 ++ arch/arm/include/asm/arch-spear13xx/spr_misc.h | 317 +++ arch/arm/include/asm/arch-spear13xx/sys_proto.h | 34 +++ 9 files changed, 923 insertions(+), 0 deletions(-) create mode 100644 arch/arm/cpu/arm_cortexa8/spear13xx/Makefile create mode 100644 arch/arm/cpu/arm_cortexa8/spear13xx/cache.S create mode 100644 arch/arm/cpu/arm_cortexa8/spear13xx/cpu.c create mode 100755 arch/arm/cpu/arm_cortexa8/spear13xx/reset.c create mode 100644 arch/arm/cpu/arm_cortexa8/spear13xx/timer.c create mode 100644 arch/arm/include/asm/arch-spear13xx/hardware.h create mode 100644 arch/arm/include/asm/arch-spear13xx/spr_gpt.h create mode 100644 arch/arm/include/asm/arch-spear13xx/spr_misc.h create mode 100644 arch/arm/include/asm/arch-spear13xx/sys_proto.h diff --git a/arch/arm/cpu/arm_cortexa8/spear13xx/Makefile b/arch/arm/cpu/arm_cortexa8/spear13xx/Makefile new file mode 100644 index 000..4157164 --- /dev/null +++ b/arch/arm/cpu/arm_cortexa8/spear13xx/Makefile @@ -0,0 +1,52 @@ +# +# (C) Copyright 2000-2003 +# Wolfgang Denk, DENX Software Engineering, w...@denx.de. +# +# (C) Copyright 2008 +# Guennadi Liakhovetki, DENX Software Engineering, l...@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$(SOC).a + +COBJS += timer.o +COBJS += reset.o +COBJS += cpu.o + +SOBJS = cache.o + +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS)) + +all:$(obj).depend $(LIB) + +$(LIB):$(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) + +# + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +# diff --git a/arch/arm/cpu/arm_cortexa8/spear13xx/cache.S b/arch/arm/cpu/arm_cortexa8/spear13xx/cache.S new file mode 100644 index 000..4b3db08 --- /dev/null +++ b/arch/arm/cpu/arm_cortexa8/spear13xx/cache.S @@ -0,0 +1,114 @@ +/* + * (C) Copyright 2010 + * Vipin Kumar, ST Micoelectronics, vipin.ku...@st.com. + * + * Based on arch/arm/cpu/arm_cortexa8/s5pc1xx/cache.S + * + * 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 + */ + +.global invalidate_dcache + +/* + * invalidate_dcache() + * + * Invalidate the whole D-cache. + * + * Corrupted registers: r0-r5, r7, r9-r11 + * + * - mm- mm_struct describing address space + */ +invalidate_dcache: + stmfd r13!, {r0 - r5, r7, r9 - r12, r14} + + mrc p15, 1, r0, c0, c0, 1 @ read clidr + andsr3, r0, #0x700 @ extract loc
[U-Boot] [PATCH v3 13/19] SPEAr : smi driver moved completely into drivers/mtd
SMI is the serial memory interface controller provided by ST. The earlier driver was specific to spear platform. The driver files are renamed to st_smi.c and st_smi.h and moved into drivers/mtd folder for reusability by other platforms using smi controller peripheral. Signed-off-by: Vipin Kumar vipin.ku...@st.com --- drivers/mtd/Makefile |2 +- drivers/mtd/{spr_smi.c = st_smi.c}|2 +- .../arch-spear/spr_smi.h = drivers/mtd/st_smi.h |4 ++-- include/configs/spear-common.h |6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) rename drivers/mtd/{spr_smi.c = st_smi.c} (99%) rename arch/arm/include/asm/arch-spear/spr_smi.h = drivers/mtd/st_smi.h (99%) diff --git a/drivers/mtd/Makefile b/drivers/mtd/Makefile index cbf6f15..d868d27 100644 --- a/drivers/mtd/Makefile +++ b/drivers/mtd/Makefile @@ -34,7 +34,7 @@ COBJS-$(CONFIG_FLASH_CFI_MTD) += cfi_mtd.o COBJS-$(CONFIG_HAS_DATAFLASH) += dataflash.o COBJS-$(CONFIG_FLASH_CFI_LEGACY) += jedec_flash.o COBJS-$(CONFIG_MW_EEPROM) += mw_eeprom.o -COBJS-$(CONFIG_SPEARSMI) += spr_smi.o +COBJS-$(CONFIG_ST_SMI) += st_smi.o COBJS := $(COBJS-y) SRCS := $(COBJS:.o=.c) diff --git a/drivers/mtd/spr_smi.c b/drivers/mtd/st_smi.c similarity index 99% rename from drivers/mtd/spr_smi.c rename to drivers/mtd/st_smi.c index c6ba951..5193c1c 100644 --- a/drivers/mtd/spr_smi.c +++ b/drivers/mtd/st_smi.c @@ -27,7 +27,7 @@ #include asm/io.h #include asm/arch/hardware.h -#include asm/arch/spr_smi.h +#include st_smi.h #if !defined(CONFIG_SYS_NO_FLASH) diff --git a/arch/arm/include/asm/arch-spear/spr_smi.h b/drivers/mtd/st_smi.h similarity index 99% rename from arch/arm/include/asm/arch-spear/spr_smi.h rename to drivers/mtd/st_smi.h index 0cca000..afab546 100644 --- a/arch/arm/include/asm/arch-spear/spr_smi.h +++ b/drivers/mtd/st_smi.h @@ -21,8 +21,8 @@ * MA 02111-1307 USA */ -#ifndef SPR_SMI_H -#define SPR_SMI_H +#ifndef ST_SMI_H +#define ST_SMI_H /* 0xF800. . 0xFBFF. 64MBSMI (Serial Flash Mem) */ /* 0xFC00. . 0xFC1F. 2MB SMI (Serial Flash Reg.) */ diff --git a/include/configs/spear-common.h b/include/configs/spear-common.h index 2393bdf..4aa0c15 100644 --- a/include/configs/spear-common.h +++ b/include/configs/spear-common.h @@ -61,10 +61,10 @@ #if defined(CONFIG_FLASH_PNOR) #define CONFIG_SPEAR_EMI 1 #else -#define CONFIG_SPEARSMI1 +#define CONFIG_ST_SMI 1 #endif -#if defined(CONFIG_SPEARSMI) +#if defined(CONFIG_ST_SMI) #define CONFIG_SYS_MAX_FLASH_BANKS 2 #define CONFIG_SYS_FLASH_BASE (0xF800) @@ -130,7 +130,7 @@ * U-Boot Environment placing definitions. */ #if defined(CONFIG_ENV_IS_IN_FLASH) -#ifdef CONFIG_SPEARSMI +#ifdef CONFIG_ST_SMI /* * Environment is in serial NOR flash */ -- 1.6.0.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3 11/19] SPEAr : Configuring FSMC driver for NAND interface
Since FSMC is a standard IP and it supports different memory interfaces, it is supported independent of spear platform and spear is configured to use that driver for interfacing with the NAND device Spear platform uses generic FSMC driver and spear specific files i.e drivers/mtd/nand/spr_nand.c, arch/arm/include/asm/arch-spear/spr_nand.h are removed Signed-off-by: Vipin Kumar vipin.ku...@st.com --- arch/arm/include/asm/arch-spear/hardware.h |8 +- arch/arm/include/asm/arch-spear/spr_nand.h | 57 - board/spear/spear300/spear300.c|7 +- board/spear/spear310/spear310.c|7 +- board/spear/spear320/spear320.c|7 +- board/spear/spear600/spear600.c|7 +- drivers/mtd/nand/Makefile |1 - drivers/mtd/nand/spr_nand.c| 124 include/configs/spear-common.h |2 +- include/configs/spear3xx.h |4 + include/configs/spear6xx.h |3 + 11 files changed, 28 insertions(+), 199 deletions(-) delete mode 100644 arch/arm/include/asm/arch-spear/spr_nand.h delete mode 100644 drivers/mtd/nand/spr_nand.c diff --git a/arch/arm/include/asm/arch-spear/hardware.h b/arch/arm/include/asm/arch-spear/hardware.h index 9f1e154..52037b6 100644 --- a/arch/arm/include/asm/arch-spear/hardware.h +++ b/arch/arm/include/asm/arch-spear/hardware.h @@ -38,15 +38,15 @@ #if defined(CONFIG_SPEAR600) #define CONFIG_SYS_I2C_BASE(0xD020) -#define CONFIG_SPEAR_FSMCBASE (0xD180) +#define CONFIG_SYS_FSMC_BASE (0xD180) #elif defined(CONFIG_SPEAR300) #define CONFIG_SYS_I2C_BASE(0xD018) -#define CONFIG_SPEAR_FSMCBASE (0x9400) +#define CONFIG_SYS_FSMC_BASE (0x9400) #elif defined(CONFIG_SPEAR310) #define CONFIG_SYS_I2C_BASE(0xD018) -#define CONFIG_SPEAR_FSMCBASE (0x4400) +#define CONFIG_SYS_FSMC_BASE (0x4400) #undef CONFIG_SYS_NAND_CLE #undef CONFIG_SYS_NAND_ALE @@ -63,7 +63,7 @@ #elif defined(CONFIG_SPEAR320) #define CONFIG_SYS_I2C_BASE(0xD018) -#define CONFIG_SPEAR_FSMCBASE (0x4C00) +#define CONFIG_SYS_FSMC_BASE (0x4C00) #define CONFIG_SPEAR_EMIBASE (0x4000) #define CONFIG_SPEAR_RASBASE (0xB300) diff --git a/arch/arm/include/asm/arch-spear/spr_nand.h b/arch/arm/include/asm/arch-spear/spr_nand.h deleted file mode 100644 index 2b63dc7..000 --- a/arch/arm/include/asm/arch-spear/spr_nand.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * (C) Copyright 2009 - * Vipin Kumar, ST Micoelectronics, vipin.ku...@st.com. - * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA - */ - -#ifndef __SPR_NAND_H__ -#define __SPR_NAND_H__ - -struct fsmc_regs { - u32 reserved_1[0x10]; - u32 genmemctrl_pc; - u32 reserved_2; - u32 genmemctrl_comm; - u32 genmemctrl_attrib; - u32 reserved_3; - u32 genmemctrl_ecc; -}; - -/* genmemctrl_pc register definitions */ -#define FSMC_RESET (1 0) -#define FSMC_WAITON(1 1) -#define FSMC_ENABLE(1 2) -#define FSMC_DEVTYPE_NAND (1 3) -#define FSMC_DEVWID_8 (0 4) -#define FSMC_DEVWID_16 (1 4) -#define FSMC_ECCEN (1 6) -#define FSMC_ECCPLEN_512 (0 7) -#define FSMC_ECCPLEN_256 (1 7) -#define FSMC_TCLR_1(1 9) -#define FSMC_TAR_1 (1 13) - -/* genmemctrl_comm register definitions */ -#define FSMC_TSET_0(0 0) -#define FSMC_TWAIT_6 (6 8) -#define FSMC_THOLD_4 (4 16) -#define FSMC_THIZ_1(1 24) - -extern int spear_nand_init(struct nand_chip *nand); -#endif diff --git a/board/spear/spear300/spear300.c b/board/spear/spear300/spear300.c index 774f466..3f7ccb8 100644 --- a/board/spear/spear300/spear300.c +++ b/board/spear/spear300/spear300.c @@ -25,10 +25,10 @@ #include netdev.h #include nand.h #include asm/io.h +#include linux/mtd/fsmc_nand.h #include asm/arch/hardware.h #include
[U-Boot] [PATCH v3 19/19] SPEAr : USB device controller bugfixes
This patch fixes a few bugs in USB device controller driver. The fixes are as follows 1. Adding error condition checks eg. NULL return 2. Endpoint other than endpoint 0 (control endpoint) are initialized only if usb state machine reaches STATE_ADDRESSED or above 3. Zero length packet handling corrected 4. Dead code removed 5. Bulk out endpoint returns after servicing 1 interrupt and returns back to service if more interrupts are pending Signed-off-by: Vipin Kumar vipin.ku...@st.com --- drivers/usb/gadget/designware_udc.c | 59 ++ 1 files changed, 38 insertions(+), 21 deletions(-) diff --git a/drivers/usb/gadget/designware_udc.c b/drivers/usb/gadget/designware_udc.c index aee44aa..3c20f3d 100644 --- a/drivers/usb/gadget/designware_udc.c +++ b/drivers/usb/gadget/designware_udc.c @@ -497,16 +497,24 @@ static void dw_udc_epn_tx(int ep) { struct usb_endpoint_instance *endpoint = dw_find_ep(ep); + if (!endpoint) + return; + /* * We need to transmit a terminating zero-length packet now if * we have sent all of the data in this URB and the transfer * size was an exact multiple of the packet size. */ - if (endpoint endpoint-tx_urb endpoint-tx_urb-actual_length) { - if (endpoint-last == endpoint-tx_packetSize) { - /* handle zero length packet here */ - writel(0x0, inep_regs_p[ep].write_done); - } + if (endpoint-tx_urb + (endpoint-last == endpoint-tx_packetSize) + (endpoint-tx_urb-actual_length - endpoint-sent - +endpoint-last == 0)) { + /* handle zero length packet here */ + writel(0x0, inep_regs_p[ep].write_done); + + } + + if (endpoint-tx_urb endpoint-tx_urb-actual_length) { /* retire the data that was just sent */ usbd_tx_complete(endpoint); /* @@ -548,8 +556,6 @@ int udc_init(void) readl(plug_regs_p-plug_pending); - udc_disconnect(); - for (i = 0; i UDC_INIT_MDELAY; i++) udelay(1000); @@ -561,10 +567,9 @@ int udc_init(void) writel(~0x0, udc_regs_p-endp_int_mask); writel(DEV_CONF_FS_SPEED | DEV_CONF_REMWAKEUP | DEV_CONF_SELFPOW | - /* Dev_Conf_SYNCFRAME | */ DEV_CONF_PHYINT_16, udc_regs_p-dev_conf); - writel(0x0, udc_regs_p-dev_cntl); + writel(DEV_CNTL_SOFTDISCONNECT, udc_regs_p-dev_cntl); /* Clear all interrupts pending */ writel(DEV_INT_MSK, udc_regs_p-dev_int); @@ -588,6 +593,9 @@ void udc_setup_ep(struct usb_device_instance *device, char *tt; u32 endp_intmask; + if ((ep != 0) (udc_device-device_state STATE_ADDRESSED)) + return; + tt = getenv(usbtty); if (!tt) tt = generic; @@ -647,9 +655,6 @@ void udc_setup_ep(struct usb_device_instance *device, writel(packet_size | ((buffer_size / sizeof(int)) 16), out_p-endp_maxpacksize); - writel((packet_size 19) | ENDP_EPTYPE_CNTL, - udc_regs_p-udc_endp_reg[ep_num]); - } else if ((ep_addr USB_ENDPOINT_DIR_MASK) == USB_DIR_IN) { /* Setup the IN endpoint */ writel(0x0, in_p-endp_status); @@ -708,7 +713,17 @@ void udc_setup_ep(struct usb_device_instance *device, /* Turn on the USB connection by enabling the pullup resistor */ void udc_connect(void) { - u32 plug_st; + u32 plug_st, dev_cntl; + + dev_cntl = readl(udc_regs_p-dev_cntl); + dev_cntl |= DEV_CNTL_SOFTDISCONNECT; + writel(dev_cntl, udc_regs_p-dev_cntl); + + udelay(1000); + + dev_cntl = readl(udc_regs_p-dev_cntl); + dev_cntl = ~DEV_CNTL_SOFTDISCONNECT; + writel(dev_cntl, udc_regs_p-dev_cntl); plug_st = readl(plug_regs_p-plug_state); plug_st = ~(PLUG_STATUS_PHY_RESET | PLUG_STATUS_PHY_MODE); @@ -720,6 +735,8 @@ void udc_disconnect(void) { u32 plug_st; + writel(DEV_CNTL_SOFTDISCONNECT, udc_regs_p-dev_cntl); + plug_st = readl(plug_regs_p-plug_state); plug_st |= (PLUG_STATUS_PHY_RESET | PLUG_STATUS_PHY_MODE); writel(plug_st, plug_regs_p-plug_state); @@ -789,11 +806,6 @@ void dw_udc_plug_irq(void) UDCDBG(device attached and powered); udc_state_transition(udc_device-device_state, STATE_POWERED); } else { - /* -* USB cable detached -* Reset the PHY and switch the mode. -*/ - udc_disconnect(); writel(~0x0, udc_regs_p-dev_int_mask); UDCDBG(device detached or unpowered); @@ -809,13 +821,18 @@ void dw_udc_dev_irq(void) if (readl(udc_regs_p-dev_int) DEV_INT_USBRESET) { writel(~0x0, udc_regs_p-endp_int_mask); -
[U-Boot] [PATCH v3 15/19] SPEAr : Supporting various configurations for spear3xx and spear6xx boards
spear3xx and 6xx boards can be compiled in following configurations 1. Environment placed in NAND 2. console on usb device 3. console on usb device with environment placed in NAND Also, renaming the include/configs/spearxxx.h files to spear3xx_evb.h, spear6xx_evb.h etc to depict evaluation board configuration. Signed-off-by: Vipin Kumar vipin.ku...@st.com --- Makefile | 22 + board/spear/spear300/config.mk | 11 board/spear/spear310/config.mk | 11 board/spear/spear320/config.mk | 11 board/spear/spear600/config.mk | 11 doc/README.spear | 31 +--- include/configs/{spear3xx.h = spear3xx_evb.h} | 10 +++ include/configs/{spear6xx.h = spear6xx_evb.h} | 10 +++ 8 files changed, 59 insertions(+), 58 deletions(-) rename include/configs/{spear3xx.h = spear3xx_evb.h} (95%) rename include/configs/{spear6xx.h = spear6xx_evb.h} (88%) diff --git a/Makefile b/Makefile index 7b4678e..e8b4ac9 100644 --- a/Makefile +++ b/Makefile @@ -3044,12 +3044,24 @@ smdk2410_config : unconfig @$(MKCONFIG) $(@:_config=) arm arm920t smdk2410 samsung s3c24x0 spear300_config \ +spear300_nand_config \ +spear300_usbtty_config \ +spear300_usbtty_nand_config \ spear310_config \ -spear320_config : unconfig - @$(MKCONFIG) -n $@ -t $(@:_config=) spear3xx arm arm926ejs $(@:_config=) spear spear - -spear600_config : unconfig - @$(MKCONFIG) -n $@ -t $(@:_config=) spear6xx arm arm926ejs $(@:_config=) spear spear +spear310_nand_config \ +spear310_usbtty_config \ +spear310_usbtty_nand_config \ +spear320_config \ +spear320_nand_config \ +spear320_usbtty_config \ +spear320_usbtty_nand_config : unconfig + @$(MKCONFIG) -n $@ -t $(@:_config=) spear3xx_evb arm arm926ejs $(@:_config=) spear spear + +spear600_config \ +spear600_nand_config \ +spear600_usbtty_config \ +spear600_usbtty_nand_config : unconfig + @$(MKCONFIG) -n $@ -t $(@:_config=) spear6xx_evb arm arm926ejs $(@:_config=) spear spear suen3_config: unconfig @$(MKCONFIG) $(@:_config=) arm arm926ejs km_arm keymile kirkwood diff --git a/board/spear/spear300/config.mk b/board/spear/spear300/config.mk index 35646f2..0bbb40f 100644 --- a/board/spear/spear300/config.mk +++ b/board/spear/spear300/config.mk @@ -26,14 +26,3 @@ TEXT_BASE = 0x0070 ALL += $(obj)u-boot.img - -# Environment variables in NAND -ifeq ($(ENV),NAND) -PLATFORM_RELFLAGS += -DCONFIG_ENV_IS_IN_NAND -else -PLATFORM_RELFLAGS += -DCONFIG_ENV_IS_IN_FLASH -endif - -ifeq ($(CONSOLE),USB) -PLATFORM_RELFLAGS += -DCONFIG_SPEAR_USBTTY -endif diff --git a/board/spear/spear310/config.mk b/board/spear/spear310/config.mk index cba8436..c8264c3 100644 --- a/board/spear/spear310/config.mk +++ b/board/spear/spear310/config.mk @@ -27,18 +27,7 @@ TEXT_BASE = 0x0070 ALL += $(obj)u-boot.img -# Environment variables in NAND -ifeq ($(ENV),NAND) -PLATFORM_RELFLAGS += -DCONFIG_ENV_IS_IN_NAND -else -PLATFORM_RELFLAGS += -DCONFIG_ENV_IS_IN_FLASH -endif - # Support parallel flash ifeq ($(FLASH),PNOR) PLATFORM_RELFLAGS += -DCONFIG_FLASH_PNOR endif - -ifeq ($(CONSOLE),USB) -PLATFORM_RELFLAGS += -DCONFIG_SPEAR_USBTTY -endif diff --git a/board/spear/spear320/config.mk b/board/spear/spear320/config.mk index cba8436..c8264c3 100644 --- a/board/spear/spear320/config.mk +++ b/board/spear/spear320/config.mk @@ -27,18 +27,7 @@ TEXT_BASE = 0x0070 ALL += $(obj)u-boot.img -# Environment variables in NAND -ifeq ($(ENV),NAND) -PLATFORM_RELFLAGS += -DCONFIG_ENV_IS_IN_NAND -else -PLATFORM_RELFLAGS += -DCONFIG_ENV_IS_IN_FLASH -endif - # Support parallel flash ifeq ($(FLASH),PNOR) PLATFORM_RELFLAGS += -DCONFIG_FLASH_PNOR endif - -ifeq ($(CONSOLE),USB) -PLATFORM_RELFLAGS += -DCONFIG_SPEAR_USBTTY -endif diff --git a/board/spear/spear600/config.mk b/board/spear/spear600/config.mk index 35646f2..0bbb40f 100644 --- a/board/spear/spear600/config.mk +++ b/board/spear/spear600/config.mk @@ -26,14 +26,3 @@ TEXT_BASE = 0x0070 ALL += $(obj)u-boot.img - -# Environment variables in NAND -ifeq ($(ENV),NAND) -PLATFORM_RELFLAGS += -DCONFIG_ENV_IS_IN_NAND -else -PLATFORM_RELFLAGS += -DCONFIG_ENV_IS_IN_FLASH -endif - -ifeq ($(CONSOLE),USB) -PLATFORM_RELFLAGS += -DCONFIG_SPEAR_USBTTY -endif diff --git a/doc/README.spear b/doc/README.spear index a6ff7fd..3161e64 100644 --- a/doc/README.spear +++ b/doc/README.spear @@ -6,9 +6,9 @@ SPEAr600 is also known as SPEArPlus and SPEAr300 is also known as SPEArBasic The SPEAr SoC family embeds a customizable logic that can be programmed one-time by a customer at silicon mask level (i.e. not at runtime!). -We are now adding the support in u-boot for two SoC: SPEAr600 and SPEAr3xx. +U-Boot supports four SoCs: SPEAr600, SPEAr3xx -All 4 SoCs share common peripherals. +All 4 SoCs (SPEAr3xx and SPEAr600) share common
[U-Boot] [PATCH v3 18/19] SPEAr : Removing extraneous code
This sub-patch removes extraneous code from the spear platform code Signed-off-by: Vipin Kumar vipin.ku...@st.com --- include/configs/spear-common.h |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/include/configs/spear-common.h b/include/configs/spear-common.h index c03520b..1f7aff7 100644 --- a/include/configs/spear-common.h +++ b/include/configs/spear-common.h @@ -57,7 +57,6 @@ /* Timer, HZ specific defines */ #define CONFIG_SYS_HZ (1000) -#define CONFIG_SYS_HZ_CLOCK(830) /* Flash configuration */ #if defined(CONFIG_FLASH_PNOR) -- 1.6.0.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3 01/19] u-boot.img file not created when srctree and objtree are different
Adding ($obj) before tools/mkimage for u-boot.img file creation Signed-off-by: Vipin Kumar vipin.ku...@st.com --- Makefile |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/Makefile b/Makefile index 2d96574..7b4678e 100644 --- a/Makefile +++ b/Makefile @@ -313,7 +313,7 @@ $(obj)u-boot.ldr.srec: $(obj)u-boot.ldr $(OBJCOPY) ${OBJCFLAGS} -O srec $ $@ -I binary $(obj)u-boot.img: $(obj)u-boot.bin - ./tools/mkimage -A $(ARCH) -T firmware -C none \ + $(obj)tools/mkimage -A $(ARCH) -T firmware -C none \ -a $(TEXT_BASE) -e 0 \ -n $(shell sed -n -e 's/.*U_BOOT_VERSION//p' $(VERSION_FILE) | \ sed -e 's/[ ]*$$/ for $(BOARD) board/') \ -- 1.6.0.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RESEND:PATCH-V4] OMAP3EVM: Added NAND support
Dear Nishanth Menon, In message o2q782515bb1005060411u9e53fd21idbfcf95cd5e1e...@mail.gmail.com you wrote: Yep.. waiting for my next free cycle ;) i would have pointed as an RFC to the git repo history, unfortunately the transition from clearcase to git was done as a single blob :( Heh. This matches my experience - each and every contact with ClearCase has always been a clear case of PITA :-( 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
Re: [U-Boot] Same U-Boot for smdk6400 and smdk6410...?
Dear Minkyu Kang Naveen Krishna Ch, Thank you both for your quick responses. Having looked at include/configs/smdk6400.h, it seems that there is indeed a little work to be done before the SMDK6410 is fully supported. :-( May I please ask if either of you have access to the source for the version of U-Boot (based on 1.1.6) currently used for the SMDK6410? Starting from working code is usually a good idea. :-) Thanks again, Nick Pelling ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] u-boot hangs after detecting DDR3 RAM and Flash.
Hi Stefan, But, my DDR3 initialization seems to be completed and I am not getting any error in DDR3 initialization. Another issue I am facing that if I add 2 pritinf functions before or after DDR initialization the DDR3 initialization code hangs in between and if I remove the printf functions, everything is working fine and after disabling the EE bit I am able to see the u-boot proopt This is not desired and I am looking in that problem. if I replace the printf whith udelay(5) then also I am facing same issue. In BDI3000 debugger I am seeing that after set_timer(0) function in cpu/ppc4xx/board.c when I execute next fucntion /* Initialize from environment */ if ((s = getenv (loadaddr)) != NULL) { ... } then u-boot hangs in between during the execution of getenv(..) function. What may be the reason? Which registers I should see to check the address of instruction which causes exception? Regards, Prakash On Wed, May 5, 2010 at 5:22 PM, Stefan Roese s...@denx.de wrote: On Wednesday 05 May 2010 13:48:05 prakash bedge wrote: I commented he MSR_EE in interrupt_init function in cpu/ppc4xx/interrupts.c to run the u-boot and to get u-boot prompt. when I executed sleep 3 command it doesn't reurns to prompt. It seems that it hangs in while loop or hangs somewhere else. what does it mean? That means, that the timer is not running at all. Since you disabled the interrupts in the MSR register. You need to solve the problem with the hanging trap, most likely resulting from the DDR3 setup code. Cheers, Stefan -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: off...@denx.de ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] OT: SD/MMC-over-SPI and speed in linux
Hi all, sorry for the off-topic question, but I seemingly did not yet find the right search string and was hoping to find experienced embedded people here to point me in the right direction. I have connected a SD card to a coldfire MCF54455 via SPI, accessible from both U-Boot and linux. The kernel is quite old, 2.6.25 from the freescale LTIB, because freescale did not push their coldfire changes back into any official tree. In U-Boot, I can get read speeds with fatload of around 400 kBytes/second, which seems reasonable as the card can handle 25 MHz SPI speed. (And, it would be sufficient for our application.) In the linux kernel, the read speed drops to around 35 kBytes/second, regardless of using a filesystem or not. This is not only quite ridiculous (as I would expect more optimized drivers in the kernel than in the bootloader), but would give us real performance problems when writing to the card. The SPI speed is detected and set correctly to 25 MHz by the driver. Does anybody know if this is a known limitation in (older) linux mmc_spi implementation, or if this issue still exists? If it is solved, can anybody point me to a patch/discussion/keyword where I can find more information which part I would have to check or back-port? Best regards, Wolfgang ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] Support for devices with FAT32 PBR
This patch adds support for devices that have a FAT32 PBR. Signed-off-by: Igor Luri il...@aotek.es --- disk/part_dos.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/disk/part_dos.c b/disk/part_dos.c index 887b75e..d91f773 100644 --- a/disk/part_dos.c +++ b/disk/part_dos.c @@ -77,7 +77,8 @@ static int test_block_type(unsigned char *buffer) (buffer[DOS_PART_MAGIC_OFFSET + 1] != 0xaa) ) { return (-1); } /* no DOS Signature at all */ - if(strncmp((char *)buffer[DOS_PBR_FSTYPE_OFFSET],FAT,3)==0) + if((strncmp((char *)buffer[DOS_PBR_FSTYPE_OFFSET],FAT,3)==0) || + (strncmp((char *)buffer[DOS_PBR_FAT32_FSTYPE_OFFSET],FAT32,5)==0) ) return DOS_PBR; /* is PBR */ return DOS_MBR; /* Is MBR */ } -- 1.5.4.3 --- disk/part_dos.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/disk/part_dos.h b/disk/part_dos.h index ac93f20..6383c58 100644 --- a/disk/part_dos.h +++ b/disk/part_dos.h @@ -35,6 +35,7 @@ #define DOS_PART_TBL_OFFSET0x1be #define DOS_PART_MAGIC_OFFSET 0x1fe #define DOS_PBR_FSTYPE_OFFSET 0x36 +#define DOS_PBR_FAT32_FSTYPE_OFFSET0x52 #define DOS_PBR_MEDIA_TYPE_OFFSET 0x15 #define DOS_MBR0 #define DOS_PBR1 -- 1.5.4.3 --- fs/fat/fat.c |7 +-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/fs/fat/fat.c b/fs/fat/fat.c index 2445f1e..4da4351 100644 --- a/fs/fat/fat.c +++ b/fs/fat/fat.c @@ -50,6 +50,7 @@ static int cur_part = 1; #define DOS_PART_TBL_OFFSET0x1be #define DOS_PART_MAGIC_OFFSET 0x1fe #define DOS_FS_TYPE_OFFSET 0x36 +#define DOS_FS_FAT32_TYPE_OFFSET 0x52 int disk_read (__u32 startblock, __u32 getsize, __u8 * bufptr) { @@ -94,7 +95,8 @@ fat_register_device(block_dev_desc_t *dev_desc, int part_no) if (!get_partition_info (dev_desc, part_no, info)) { part_offset = info.start; cur_part = part_no; - } else if (!strncmp((char *)buffer[DOS_FS_TYPE_OFFSET], FAT, 3)) { + } else if (!strncmp((char *)buffer[DOS_FS_TYPE_OFFSET], FAT, 3) || + !strncmp((char *)buffer[DOS_FS_FAT32_TYPE_OFFSET], FAT32, 5)) { /* ok, we assume we are on a PBR only */ cur_part = 1; part_offset = 0; @@ -105,7 +107,8 @@ fat_register_device(block_dev_desc_t *dev_desc, int part_no) } #else - if (!strncmp((char *)buffer[DOS_FS_TYPE_OFFSET],FAT,3)) { + if (!strncmp((char *)buffer[DOS_FS_TYPE_OFFSET],FAT,3) || + !strncmp((char *)buffer[DOS_FS_FAT32_TYPE_OFFSET], FAT32, 5) ) { /* ok, we assume we are on a PBR only */ cur_part = 1; part_offset = 0; -- 1.5.4.3 -- Igor Luri RD Software Department Fagor Aotek S. Coop. P. O. Box 144 E-20500 Mondragón-Arrasate Tel.++34 943 71 92 00 ++34 943 71 92 01 (Ext. 44268) Fax.++34 943 79 92 03 www.aotek.es ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] OT: SD/MMC-over-SPI and speed in linux
Hello Wolfgang, Am Donnerstag, 6. Mai 2010 15:13:14 schrieb Wolfgang Wegner: In U-Boot, I can get read speeds with fatload of around 400 kBytes/second, which seems reasonable as the card can handle 25 MHz SPI speed. (And, it would be sufficient for our application.) IIRC 400kBytes/second is the initial speed for SD cards on SPI. The card itself responds which max speed it can handle. Which could be adjusted later (up to 25MHz or even more). In the linux kernel, the read speed drops to around 35 kBytes/second, regardless of using a filesystem or not. This is not only quite ridiculous (as I would expect more optimized drivers in the kernel than in the bootloader), but would give us real performance problems when writing to the card. The SPI speed is detected and set correctly to 25 MHz by the driver. Does anybody know if this is a known limitation in (older) linux mmc_spi implementation, or if this issue still exists? If it is solved, can anybody point me to a patch/discussion/keyword where I can find more information which part I would have to check or back-port? I backported this spi_mmc driver to 2.6.10 (yes, even older) and it is slow, nevertheless. I don't know how SPI is done in u-boot, but maybe the system interrupts in linux like ethernet and timer slow SPI transfer down. Best regards Alexander ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] OT: SD/MMC-over-SPI and speed in linux
Hi Alexander, On Thu, May 06, 2010 at 03:33:53PM +0200, Alexander Stein wrote: [...] IIRC 400kBytes/second is the initial speed for SD cards on SPI. The card itself responds which max speed it can handle. Which could be adjusted later (up to 25MHz or even more). the initial speed is 400 kBits/second, because there may be some (few) cards that could not handle more. I backported this spi_mmc driver to 2.6.10 (yes, even older) and it is slow, nevertheless. I don't know how SPI is done in u-boot, but maybe the system interrupts in linux like ethernet and timer slow SPI transfer down. Thanks for the confirmation! I just found a page from the blackfin linux project: http://docs.blackfin.uclinux.org/doku.php?id=linux-kernel:drivers:spi_mmc which suggests better values (using dd with bs=512 should be similar to what bonnie does in the block tests?). A hint I got from this page was to disable SPI DMA (which was also enabled on my coldfire), and this improved the situation to get around 115 kBytes/second. Strange enough enabling DMA decreases performance, there still seems to be room for improvement. I will try to see if I can spot differences in the blackfin kernel that I could back-port - although I already saw there are many differences when back-porting the locking part. Best regards, Wolfgang ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] OT: SD/MMC-over-SPI and speed in linux
Am Donnerstag, 6. Mai 2010 15:59:44 schrieb Wolfgang Wegner: Hi Alexander, On Thu, May 06, 2010 at 03:33:53PM +0200, Alexander Stein wrote: [...] IIRC 400kBytes/second is the initial speed for SD cards on SPI. The card itself responds which max speed it can handle. Which could be adjusted later (up to 25MHz or even more). the initial speed is 400 kBits/second, because there may be some (few) cards that could not handle more. Yep, it's need to distinguish between SD and MMC. IIRC that's also the speed a MMC can handle (at maximum?). I backported this spi_mmc driver to 2.6.10 (yes, even older) and it is slow, nevertheless. I don't know how SPI is done in u-boot, but maybe the system interrupts in linux like ethernet and timer slow SPI transfer down. Thanks for the confirmation! e.g. If I'm downloading something per FTP to the SD card I get a big burst at first and then several seconds 0bytes/s In this case I also detected a bug in the windows TCP stack if some packets get dropped... On a new AT91 board with integrated MCI interface it's much faster I just found a page from the blackfin linux project: http://docs.blackfin.uclinux.org/doku.php?id=linux-kernel:drivers:spi_mmc which suggests better values (using dd with bs=512 should be similar to what bonnie does in the block tests?). A hint I got from this page was to disable SPI DMA (which was also enabled on my coldfire), and this improved the situation to get around 115 kBytes/second. I can't say much about actual transfer rates. But i noticed a real slowdown when the filesystem buffer is about to be flushed. We are using a COldfire 5484 and AFAIK there is no DMA for SPI, at least we don't use it. Best regards Alexander ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] mmc: modified calculated mmc-capacity set mmc trans_speed
On Wed, Apr 7, 2010 at 10:36 PM, Jae hoon Chung jh80.ch...@gmail.com wrote: The patches do the following 1. If mmc size is more than 2GB , we need to calculated using the extended csd register. This description is slightly inaccurate. I have encountered MMC cards with 4GB capacity, which are not actually high-capacity cards. But certainly there's a bug in the current code where high-capacity MMC cards are not getting proper size calculations. diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index cf4ea16..c985924 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -410,6 +410,10 @@ int mmc_change_freq(struct mmc *mmc) if (ext_csd[212] || ext_csd[213] || ext_csd[214] || ext_csd[215]) mmc-high_capacity = 1; + if (mmc-high_capacity) + mmc-capacity = ((ext_csd[215] 24) | (ext_csd[214] 16) | + (ext_csd[213] 8) | ext_csd[212]); + This is off by a factor of block size. Capacity is supposed to be the size in bytes, and this sets it to the size in blocks, I believe. Hmm... I don't like that we are now doing the calculation twice for high-capacity MMC cards, but I guess that's fine for now, as this only affects v4 and higher, and extracting it is a bit more of a pain than I originally thought. On a side note, does this mean you have a high-capacity MMC card? And can you point me to a place to get one? We've been trying to test MMC high-capacity for a while, and have yet to find a real one (we found that 4GB one I mentioned, and it does normal byte-addressing). So just multiply capacity by block size, and we can apply this. cardtype = ext_csd[196] 0xf; err = mmc_switch(mmc, EXT_CSD_CMD_SET_NORMAL, EXT_CSD_HS_TIMING, 1); @@ -794,12 +798,11 @@ int mmc_startup(struct mmc *mmc) if (mmc-card_caps MMC_MODE_HS) { if (mmc-card_caps MMC_MODE_HS_52MHz) - mmc_set_clock(mmc, 5200); + mmc-tran_speed = 5200; else - mmc_set_clock(mmc, 2600); - } else - mmc_set_clock(mmc, 2000); - } + mmc-tran_speed = 2600; + } + mmc_set_clock(mmc, mmc-tran_speed); This looks good. Andy ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] OT: SD/MMC-over-SPI and speed in linux
Hi, On Thu, May 06, 2010 at 04:13:41PM +0200, Alexander Stein wrote: I can't say much about actual transfer rates. But i noticed a real slowdown when the filesystem buffer is about to be flushed. We are using a COldfire 5484 and AFAIK there is no DMA for SPI, at least we don't use it. I used M54451EVB/M54455EVB as a starting point, both use eDMA for SPI by default. Sorry, don't know about MCF547x/548x. Things are clearing up now: as far as I could see, there are no real timing-relevant things changed in mmc_spi code, BUT the underlying SPI driver is crucial. Setting the same default timing values found in mcf5445x-devices.c in U-Boot (CONFIG_SYS_DSPI_CTAR0), I can degrade the performance of MMC-SPI in U-Boot by a factor of 3, approximately. However, setting the fast default values from U-Boot in the linux kernel (mcf5445x-devices.c) makes things even worse there, too. After all, I am sure now it is only the SPI part I have to investigate further, most probably concerning latency between transfers. Thanks for the comments and sorry for the noise! Best regards, Wolfgang ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Endless loop in cmd_log.c?
Not sure why this hasn't come through in my 3 earlier attempts... Let me try a different email address... I am trying to implement CONFIG_LOGBUFFER and CONFIG_CMD_LOG on our ARM systems and I seem to have run into an endless loop. With loglevel=5 so we still see our console output, the printf at the end of logbuff_printk appears to create an endless loop. I had to replace that line with serial_puts(msg); Have I missed some other solution or do the systems that use this never set logbuffer higher than default_message_loglevel? DaR ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Endless loop in cmd_log.c?
Hi Dennis, On Thu, 2010-05-06 at 09:03 -0700, Dennis Ruffer wrote: Not sure why this hasn't come through in my 3 earlier attempts... Let me try a different email address... I am trying to implement CONFIG_LOGBUFFER and CONFIG_CMD_LOG on our ARM systems and I seem to have run into an endless loop. With loglevel=5 so we still see our console output, the printf at the end of logbuff_printk appears to create an endless loop. I had to replace that line with serial_puts(msg); Have I missed some other solution or do the systems that use this never set logbuffer higher than default_message_loglevel? It has been coming through. 4 times now. Give people some time to respond. http://lists.denx.de/pipermail/u-boot/2010-May/071107.html Best, Peter ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] U-Boot public API example desired
Is there an example available of the use of the U-Boot public API or of a stand-alone application, that can be, or is, sanctioned by someone who would definitely know (for example, Wolfgang Denk) as being not a derived work? I've seen several discussions in various mailing lists about these interfaces but I have not seen a definite example that qualifies. It is not clear that the examples in the U-Boot source trees completely qualify. The most recent tree I've seen is 2010.03, which I got from ftp://ftp.denx.de/pub/u-boot/u-boot-2010.03.tar.bz2. Web searches I've done have revealed only theoretical discussion or discussion of future needs and possible improvements. I've probably missed it, can someone provide a pointer? Thank you very much. Jim ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH-V5] OMAP3EVM: Added NAND support
From: Vaibhav Hiremath hvaib...@ti.com The EVMS have been shipping with NAND (instead of OneNAND) as default. So, this patch sets NAND as default. To choose OneNAND, define CMD_ONENAND instead of CMD_NAND in the config file omap3_evm.h, Changes From V4 :- - Removed #undef ONENAND line (comment from Denk) Changes from V3 :- - Refreshed against latest u-boot/master Changes from V2 :- - Added undef statement for CMD_ONENAND. Signed-off-by: Vaibhav Hiremath hvaib...@ti.com --- include/configs/omap3_evm.h |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/include/configs/omap3_evm.h b/include/configs/omap3_evm.h index 0d99f7d..88af492 100644 --- a/include/configs/omap3_evm.h +++ b/include/configs/omap3_evm.h @@ -151,7 +151,7 @@ #define CONFIG_CMD_I2C /* I2C serial bus support */ #define CONFIG_CMD_MMC /* MMC support */ -#define CONFIG_CMD_ONENAND /* ONENAND support */ +#define CONFIG_CMD_NAND/* NAND support */ #define CONFIG_CMD_DHCP #define CONFIG_CMD_PING @@ -306,7 +306,13 @@ #define CONFIG_SYS_MONITOR_BASECONFIG_SYS_FLASH_BASE #define CONFIG_SYS_ONENAND_BASEONENAND_MAP +#if defined(CONFIG_CMD_NAND) +#define CONFIG_NAND_OMAP_GPMC +#define GPMC_NAND_ECC_LP_x16_LAYOUT1 +#define CONFIG_ENV_IS_IN_NAND +#elif defined(CONFIG_CMD_ONENAND) #define CONFIG_ENV_IS_IN_ONENAND 1 +#endif #define ONENAND_ENV_OFFSET 0x26 /* environment starts here */ #define SMNAND_ENV_OFFSET 0x26 /* environment starts here */ -- 1.6.2.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH-V3 2/2] omap3: Consolidate SDRC related operations
From: Vaibhav Hiremath hvaib...@ti.com Consolidated SDRC related functions into one file - sdrc.c And also replaced sdrc_init with generic memory init function (mem_init), this generalization of omap memory setup is necessary to support the new emif4 interface introduced in AM3517. Changes from V2: - Removed all instances of #ifdef CONFIG_SDRC Changes from V1: - Refreshed against latest denx/master Signed-off-by: Vaibhav Hiremath hvaib...@ti.com Signed-off-by: Sanjeev Premi pr...@ti.com --- arch/arm/cpu/arm_cortexa8/omap3/Makefile|4 +- arch/arm/cpu/arm_cortexa8/omap3/board.c | 35 +- arch/arm/cpu/arm_cortexa8/omap3/mem.c | 90 arch/arm/cpu/arm_cortexa8/omap3/sdrc.c | 202 +++ arch/arm/cpu/arm_cortexa8/omap3/sys_info.c | 41 -- arch/arm/include/asm/arch-omap3/cpu.h |1 + arch/arm/include/asm/arch-omap3/mem.h | 13 ++ arch/arm/include/asm/arch-omap3/sys_proto.h |2 - include/configs/devkit8000.h|2 + include/configs/omap3_beagle.h |2 + include/configs/omap3_evm.h |2 + include/configs/omap3_overo.h |2 + include/configs/omap3_pandora.h |2 + include/configs/omap3_sdp3430.h |2 + include/configs/omap3_zoom1.h |2 + include/configs/omap3_zoom2.h |2 + 16 files changed, 236 insertions(+), 168 deletions(-) create mode 100644 arch/arm/cpu/arm_cortexa8/omap3/sdrc.c diff --git a/arch/arm/cpu/arm_cortexa8/omap3/Makefile b/arch/arm/cpu/arm_cortexa8/omap3/Makefile index 136b163..1e80eb3 100644 --- a/arch/arm/cpu/arm_cortexa8/omap3/Makefile +++ b/arch/arm/cpu/arm_cortexa8/omap3/Makefile @@ -37,8 +37,10 @@ COBJS+= syslib.o COBJS += sys_info.o COBJS += timer.o +COBJS-$(CONFIG_SDRC) += sdrc.o + SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS)) +OBJS := $(addprefix $(obj),$(COBJS) $(COBJS-y) $(SOBJS)) all:$(obj).depend $(LIB) diff --git a/arch/arm/cpu/arm_cortexa8/omap3/board.c b/arch/arm/cpu/arm_cortexa8/omap3/board.c index 69a08fd..d2500ca 100644 --- a/arch/arm/cpu/arm_cortexa8/omap3/board.c +++ b/arch/arm/cpu/arm_cortexa8/omap3/board.c @@ -40,8 +40,6 @@ extern omap3_sysinfo sysinfo; -extern u32 is_mem_sdr(void); - /** * Routine: delay * Description: spinning delay to use before udelay works @@ -233,7 +231,7 @@ void s_init(void) per_clocks_enable(); if (!in_sdram) - sdrc_init(); + mem_init(); } /** @@ -274,37 +272,6 @@ void watchdog_init(void) } /** - * Routine: dram_init - * Description: sets uboots idea of sdram size - */ -int dram_init(void) -{ - DECLARE_GLOBAL_DATA_PTR; - unsigned int size0 = 0, size1 = 0; - - size0 = get_sdr_cs_size(CS0); - - /* -* If a second bank of DDR is attached to CS1 this is -* where it can be started. Early init code will init -* memory on CS0. -*/ - if ((sysinfo.mtype == DDR_COMBO) || (sysinfo.mtype == DDR_STACKED)) { - do_sdrc_init(CS1, NOT_EARLY); - make_cs1_contiguous(); - - size1 = get_sdr_cs_size(CS1); - } - - gd-bd-bi_dram[0].start = PHYS_SDRAM_1; - gd-bd-bi_dram[0].size = size0; - gd-bd-bi_dram[1].start = PHYS_SDRAM_1 + get_sdr_cs_offset(CS1); - gd-bd-bi_dram[1].size = size1; - - return 0; -} - -/** * Dummy function to handle errors for EABI incompatibility */ void abort(void) diff --git a/arch/arm/cpu/arm_cortexa8/omap3/mem.c b/arch/arm/cpu/arm_cortexa8/omap3/mem.c index dfb7e4c..bd914b0 100644 --- a/arch/arm/cpu/arm_cortexa8/omap3/mem.c +++ b/arch/arm/cpu/arm_cortexa8/omap3/mem.c @@ -79,26 +79,6 @@ static const u32 gpmc_onenand[GPMC_MAX_REG] = { #endif -static struct sdrc *sdrc_base = (struct sdrc *)OMAP34XX_SDRC_BASE; - -/** - * make_cs1_contiguous() - for es2 and above remap cs1 behind cs0 to allow - * command line mem=xyz use all memory with out discontinuous support - * compiled in. Could do it at the ATAG, but there really is two banks... - * Called as part of 2nd phase DDR init. - **/ -void make_cs1_contiguous(void) -{ - u32 size, a_add_low, a_add_high; - - size = get_sdr_cs_size(CS0); - size = 25;/* divide by 32 MiB to find size
[U-Boot] [PATCH-V3 1/2] omap3: Calculate CS1 size only when SDRC is initialized for CS1
From: Vaibhav Hiremath hvaib...@ti.com The patch makes sure that size for SDRC CS1 gets calculated only when the CS1 SDRC is initialized. Signed-off-by: Vaibhav Hiremath hvaib...@ti.com Signed-off-by: Sanjeev Premi pr...@ti.com --- arch/arm/cpu/arm_cortexa8/omap3/board.c |7 --- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/arm/cpu/arm_cortexa8/omap3/board.c b/arch/arm/cpu/arm_cortexa8/omap3/board.c index 7b78fa4..69a08fd 100644 --- a/arch/arm/cpu/arm_cortexa8/omap3/board.c +++ b/arch/arm/cpu/arm_cortexa8/omap3/board.c @@ -282,6 +282,8 @@ int dram_init(void) DECLARE_GLOBAL_DATA_PTR; unsigned int size0 = 0, size1 = 0; + size0 = get_sdr_cs_size(CS0); + /* * If a second bank of DDR is attached to CS1 this is * where it can be started. Early init code will init @@ -290,10 +292,9 @@ int dram_init(void) if ((sysinfo.mtype == DDR_COMBO) || (sysinfo.mtype == DDR_STACKED)) { do_sdrc_init(CS1, NOT_EARLY); make_cs1_contiguous(); - } - size0 = get_sdr_cs_size(CS0); - size1 = get_sdr_cs_size(CS1); + size1 = get_sdr_cs_size(CS1); + } gd-bd-bi_dram[0].start = PHYS_SDRAM_1; gd-bd-bi_dram[0].size = size0; -- 1.6.2.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH-V3 1/2] AM35x: Add support for AM3517EVM
From: Vaibhav Hiremath hvaib...@ti.com This patch adds basic support for the AM3517EVM. It includes: - Board int file (.c and .h) - Default configuration file - Updates for Makefile Changes from V2: - Removed trailing spaces - Updated MAINTAINERS MAKEALL for am3517_evm Signed-off-by: Vaibhav Hiremath hvaib...@ti.com Signed-off-by: Sanjeev Premi pr...@ti.com --- MAINTAINERS |4 + MAKEALL |1 + Makefile |3 + arch/arm/include/asm/arch-omap3/mux.h | 38 +++- board/logicpd/am3517evm/Makefile | 46 board/logicpd/am3517evm/am3517evm.c | 76 ++ board/logicpd/am3517evm/am3517evm.h | 405 + board/logicpd/am3517evm/config.mk | 30 +++ include/configs/am3517_evm.h | 296 9 files changed, 898 insertions(+), 1 deletions(-) create mode 100644 board/logicpd/am3517evm/Makefile create mode 100644 board/logicpd/am3517evm/am3517evm.c create mode 100644 board/logicpd/am3517evm/am3517evm.h create mode 100644 board/logicpd/am3517evm/config.mk create mode 100644 include/configs/am3517_evm.h diff --git a/MAINTAINERS b/MAINTAINERS index 5cbc845..0bc65e1 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -798,6 +798,10 @@ Alex Z lartSA1100 dnp1110 SA1110 +Vaibhav Hiremath hvaib...@ti.com + + am3517_evm ARM CORTEX-A8 (AM35x SoC) + - Unknown / orphaned boards: diff --git a/MAKEALL b/MAKEALL index bb09627..cd59daa 100755 --- a/MAKEALL +++ b/MAKEALL @@ -641,6 +641,7 @@ LIST_ARM11=\ ## ARM Cortex-A8 Systems # LIST_ARM_CORTEX_A8= \ + am3517_evm \ devkit8000 \ mx51evk \ omap3_beagle\ diff --git a/Makefile b/Makefile index 2d96574..57b3491 100644 --- a/Makefile +++ b/Makefile @@ -3155,6 +3155,9 @@ SMN42_config : unconfig ## ARM CORTEX Systems # +am3517_evm_config :unconfig + @$(MKCONFIG) $(@:_config=) arm arm_cortexa8 am3517evm logicpd omap3 + devkit8000_config :unconfig @$(MKCONFIG) $(@:_config=) arm arm_cortexa8 devkit8000 timll omap3 diff --git a/arch/arm/include/asm/arch-omap3/mux.h b/arch/arm/include/asm/arch-omap3/mux.h index 0c01c73..ffeb982 100644 --- a/arch/arm/include/asm/arch-omap3/mux.h +++ b/arch/arm/include/asm/arch-omap3/mux.h @@ -283,7 +283,7 @@ /*Control and debug */ #define CONTROL_PADCONF_SYS_32K0x0A04 #define CONTROL_PADCONF_SYS_CLKREQ 0x0A06 -#define CONTROL_PADCONF_SYS_NIRQ 0x01E0 +#define CONTROL_PADCONF_SYS_NRESWARM 0x0A08 #define CONTROL_PADCONF_SYS_BOOT0 0x0A0A #define CONTROL_PADCONF_SYS_BOOT1 0x0A0C #define CONTROL_PADCONF_SYS_BOOT2 0x0A0E @@ -337,6 +337,7 @@ #define CONTROL_PADCONF_ETK_D14_ES20x05F8 #define CONTROL_PADCONF_ETK_D15_ES20x05FA /*Die to Die */ +#define CONTROL_PADCONF_SYS_NIRQ 0x01E0 #define CONTROL_PADCONF_D2D_MCAD0 0x01E4 #define CONTROL_PADCONF_D2D_MCAD1 0x01E6 #define CONTROL_PADCONF_D2D_MCAD2 0x01E8 @@ -403,6 +404,41 @@ #define CONTROL_PADCONF_D2D_SBUSFLAG 0x0260 #define CONTROL_PADCONF_SDRC_CKE0 0x0262 #define CONTROL_PADCONF_SDRC_CKE1 0x0264 +/* AM3517 specific */ +#define CONTROL_PADCONF_CCDC_PCLK 0x01E4 +#define CONTROL_PADCONF_CCDC_FIELD 0x01E6 +#define CONTROL_PADCONF_CCDC_HD0x01E8 +#define CONTROL_PADCONF_CCDC_VD0x01EA +#define CONTROL_PADCONF_CCDC_WEN 0x01EC +#define CONTROL_PADCONF_CCDC_DATA0 0x01EE +#define CONTROL_PADCONF_CCDC_DATA1 0x01F0 +#define CONTROL_PADCONF_CCDC_DATA2 0x01F2 +#define CONTROL_PADCONF_CCDC_DATA3 0x01F4 +#define CONTROL_PADCONF_CCDC_DATA4 0x01F6 +#define CONTROL_PADCONF_CCDC_DATA5 0x01F8 +#define CONTROL_PADCONF_CCDC_DATA6 0x01FA +#define CONTROL_PADCONF_CCDC_DATA7 0x01FC +#define CONTROL_PADCONF_RMII_MDIO_DATA 0x01FE +#define CONTROL_PADCONF_RMII_MDIO_CLK 0x0200 +#define CONTROL_PADCONF_RMII_RXD0 0x0202 +#define CONTROL_PADCONF_RMII_RXD1 0x0204 +#define CONTROL_PADCONF_RMII_CRS_DV0x0206 +#define CONTROL_PADCONF_RMII_RXER 0x0208 +#define CONTROL_PADCONF_RMII_TXD0 0x020A +#define CONTROL_PADCONF_RMII_TXD1 0x020C +#define CONTROL_PADCONF_RMII_TXEN 0x020E +#define CONTROL_PADCONF_RMII_50MHZ_CLK 0x0210 +#define CONTROL_PADCONF_USB0_DRVBUS0x0212 +#define CONTROL_PADCONF_HECC1_TXD 0x0214 +#define CONTROL_PADCONF_HECC1_RXD 0x0216 +#define CONTROL_PADCONF_SYS_BOOT7 0x0218 +#define CONTROL_PADCONF_SDRC_DQS0N 0x021A +#define CONTROL_PADCONF_SDRC_DQS1N 0x021C +#define
[U-Boot] [PATCH-V3 2/2] AM35x: Add support for EMIF4
From: Vaibhav Hiremath hvaib...@ti.com This patch adds support for the EMIF4 interface available in the AM35x processors. Changes from V2: - Removed all instances of #ifdef CONFIG_EMIF4 Signed-off-by: Vaibhav Hiremath hvaib...@ti.com Signed-off-by: Sanjeev Premi pr...@ti.com --- arch/arm/cpu/arm_cortexa8/omap3/Makefile|1 + arch/arm/cpu/arm_cortexa8/omap3/emif4.c | 168 +++ arch/arm/include/asm/arch-omap3/cpu.h | 24 arch/arm/include/asm/arch-omap3/emif4.h | 79 + arch/arm/include/asm/arch-omap3/sys_proto.h |1 + include/configs/am3517_evm.h|2 +- 6 files changed, 274 insertions(+), 1 deletions(-) create mode 100644 arch/arm/cpu/arm_cortexa8/omap3/emif4.c create mode 100644 arch/arm/include/asm/arch-omap3/emif4.h diff --git a/arch/arm/cpu/arm_cortexa8/omap3/Makefile b/arch/arm/cpu/arm_cortexa8/omap3/Makefile index 1e80eb3..d25bfd5 100644 --- a/arch/arm/cpu/arm_cortexa8/omap3/Makefile +++ b/arch/arm/cpu/arm_cortexa8/omap3/Makefile @@ -38,6 +38,7 @@ COBJS += sys_info.o COBJS += timer.o COBJS-$(CONFIG_SDRC) += sdrc.o +COBJS-$(CONFIG_EMIF4) +=emif4.o SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS) $(COBJS-y) $(SOBJS)) diff --git a/arch/arm/cpu/arm_cortexa8/omap3/emif4.c b/arch/arm/cpu/arm_cortexa8/omap3/emif4.c new file mode 100644 index 000..fae5b11 --- /dev/null +++ b/arch/arm/cpu/arm_cortexa8/omap3/emif4.c @@ -0,0 +1,168 @@ +/* + * Author : + * Vaibhav Hiremath hvaib...@ti.com + * + * Based on mem.c and sdrc.c + * + * Copyright (C) 2010 + * Texas Instruments Incorporated - http://www.ti.com/ + * + * 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 common.h +#include asm/io.h +#include asm/arch/mem.h +#include asm/arch/sys_proto.h +#include asm/arch/emif4.h + +extern omap3_sysinfo sysinfo; + +static emif4_t *emif4_base = (emif4_t *)OMAP34XX_SDRC_BASE; + +/* + * is_mem_sdr - + * - Return 1 if mem type in use is SDR + */ +u32 is_mem_sdr(void) +{ + return 0; +} + +/* + * get_sdr_cs_size - + * - Get size of chip select 0/1 + */ +u32 get_sdr_cs_size(u32 cs) +{ + u32 size; + + /* TODO: Calculate the size based on EMIF4 configuration */ + size = CONFIG_SYS_CS0_SIZE; + + return size; +} + +/* + * get_sdr_cs_offset - + * - Get offset of cs from cs0 start + */ +u32 get_sdr_cs_offset(u32 cs) +{ + u32 offset = 0; + + return offset; +} + +/* + * do_emif4_init - + * - Init the emif4 module for DDR access + * - Early init routines, called from flash or SRAM. + */ +void do_emif4_init(void) +{ + unsigned int regval; + /* Set the DDR PHY parameters in PHY ctrl registers */ + regval = (EMIF4_DDR1_READ_LAT | EMIF4_DDR1_PWRDN_DIS | + EMIF4_DDR1_EXT_STRB_DIS); + writel(regval, emif4_base-ddr_phyctrl1); + writel(regval, emif4_base-ddr_phyctrl1_shdw); + writel(0, emif4_base-ddr_phyctrl2); + + /* Reset the DDR PHY and wait till completed */ + regval = readl(emif4_base-sdram_iodft_tlgc); + regval |= (110); + writel(regval, emif4_base-sdram_iodft_tlgc); + /*Wait till that bit clears*/ + while ((readl(emif4_base-sdram_iodft_tlgc) (110)) == 0x1); + /*Re-verify the DDR PHY status*/ + while ((readl(emif4_base-sdram_sts) (12)) == 0x0); + + regval |= (10); + writel(regval, emif4_base-sdram_iodft_tlgc); + /* Set SDR timing registers */ + regval = (EMIF4_TIM1_T_WTR | EMIF4_TIM1_T_RRD | + EMIF4_TIM1_T_RC | EMIF4_TIM1_T_RAS | + EMIF4_TIM1_T_WR | EMIF4_TIM1_T_RCD | + EMIF4_TIM1_T_RP); + writel(regval, emif4_base-sdram_time1); + writel(regval, emif4_base-sdram_time1_shdw); + + regval = (EMIF4_TIM2_T_CKE | EMIF4_TIM2_T_RTP | + EMIF4_TIM2_T_XSRD | EMIF4_TIM2_T_XSNR | + EMIF4_TIM2_T_ODT | EMIF4_TIM2_T_XP); + writel(regval, emif4_base-sdram_time2); + writel(regval, emif4_base-sdram_time2_shdw); + + regval = (EMIF4_TIM3_T_RAS_MAX | EMIF4_TIM3_T_RFC); + writel(regval, emif4_base-sdram_time3); + writel(regval, emif4_base-sdram_time3_shdw); + + /* Set the PWR control register */ + regval = (EMIF4_PWR_PM_TIM |
Re: [U-Boot] U-Boot public API example desired
Dear j...@sdateam.com, In message 8139.1273161...@sdateam.com you wrote: Is there an example available of the use of the U-Boot public API or of a stand-alone application, that can be, or is, sanctioned by someone who would definitely know (for example, Wolfgang Denk) as being not a derived work? The code in the examples/standalone/ is supposed to provide example code, and doc/README.standalone is supposed to provide documentation. I've seen several discussions in various mailing lists about these interfaces but I have not seen a definite example that qualifies. It What are these various mailing lists, and what exactluy is not clear to you? 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 People with narrow minds usually have broad tongues. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Endless loop in cmd_log.c?
Oh, sorry. I have the option turned on to send me my postings, but I have not gotten them. ;( Sorry for spamming the list! DaR -Original Message- From: Peter Tyser [mailto:pty...@xes-inc.com] Sent: Thursday, May 06, 2010 9:22 AM To: Dennis Ruffer Cc: 'Wolfgang Denk'; u-boot@lists.denx.de Subject: Re: [U-Boot] Endless loop in cmd_log.c? Hi Dennis, On Thu, 2010-05-06 at 09:03 -0700, Dennis Ruffer wrote: Not sure why this hasn't come through in my 3 earlier attempts... Let me try a different email address... I am trying to implement CONFIG_LOGBUFFER and CONFIG_CMD_LOG on our ARM systems and I seem to have run into an endless loop. With loglevel=5 so we still see our console output, the printf at the end of logbuff_printk appears to create an endless loop. I had to replace that line with serial_puts(msg); Have I missed some other solution or do the systems that use this never set logbuffer higher than default_message_loglevel? It has been coming through. 4 times now. Give people some time to respond. http://lists.denx.de/pipermail/u-boot/2010-May/071107.html Best, Peter ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Endless loop in cmd_log.c?
Hi Dennis, On Thu, 2010-05-06 at 10:51 -0700, Dennis Ruffer wrote: Oh, sorry. I have the option turned on to send me my postings, but I have not gotten them. ;( I believe some email clients are smart enough to detect duplicate emails and filter accordingly. If I remember correctly I see the same thing when I use a gmail address to send patches. Sorry for spamming the list! No problem. Its best not to top-post here as well:) Best, Peter ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] NAND flash parameters.
On Thu, May 06, 2010 at 10:40:21AM +0100, Ayewin Oung wrote: How do I modify SLC NAND flash parameters for u-boot ? When I say nand parameters, I meant things like how many pages in a block, how many blocks and how big is each page, not timing. Is it per NAND controller implementation specific or is it more generic across u-boot? These parameters are dictated by the physical hardware. If you mean how do you tell U-Boot about how the hardare is laid out, typically it is automatically detected, but some things like bus width and page size need to be specified for certain drivers. The way to do this is specific to the controller driver, but typically involves defining certain symbols in the board config header. -Scott ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Pull request: u-boot-i2c
Dear Heiko Schocher, In message 4be25460.2090...@denx.de you wrote: Hello Wolfgang, please pull from u-boot-i2c The following changes since commit b88c5988db176a0f9de5598d5167ee2498637d40: Kim Phillips (1): configs: remove unused CONFIG_COMMAND_HISTORY are available in the git repository at: git://git.denx.de/u-boot-i2c.git master Mike Frysinger (1): Blackfin: TWI/I2C: implement multibus support drivers/i2c/bfin-twi_i2c.c | 169 1 files changed, 108 insertions(+), 61 deletions(-) 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 They weren't that important. They were merely at the top. The people who really run organizations are usually found several levels down, where it's still possible to get things done. - Terry Pratchett, _Small Gods_ ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] powerpc: Consolidate bootcount_{store|load} for PowerPC
Dear Stefan Roese, In message 127256-2502-1-git-send-email...@denx.de you wrote: This patch consolidates bootcount_{store|load} for PowerPC by implementing a common version in arch/powerpc/lib/bootcount.c. This code is now used by all PowerPC variants that currently have these functions implemented. The functions now use the proper IO-accessor functions to read/write the values. This code also supports two different bootcount versions: a) Use 2 seperate words (2 * 32bit) to store the bootcounter b) Use only 1 word (2 * 16bit) to store the bootcounter Version b) was already used by MPC5xxx. Signed-off-by: Stefan Roese s...@denx.de Acked-by: Detlev Zundel d...@denx.de Cc: Michael Zaidman michael.zaid...@gmail.com Cc: Wolfgang Denk w...@denx.de Cc: Kim Phillips kim.phill...@freescale.com Cc: Anatolij Gustschin ag...@denx.de --- v2: - Replace CONFIG_SYS_BOOTCOUNT_USE_32BIT with CONFIG_SYS_BOOTCOUNT_SINGLEWORD as suggested by Detlev - Use CONFIG_8xx for MPC8xx define section - Replace CONFIG_BOOTCOUNT_ADDR with CONFIG_SYS_BOOTCOUNT_ADDR arch/powerpc/cpu/mpc5xxx/cpu.c | 20 arch/powerpc/cpu/mpc8260/commproc.c | 24 - arch/powerpc/cpu/mpc83xx/cpu.c | 30 arch/powerpc/cpu/mpc8xx/commproc.c | 26 -- arch/powerpc/cpu/ppc4xx/commproc.c | 24 - arch/powerpc/lib/Makefile |1 + arch/powerpc/lib/bootcount.c| 90 +++ 7 files changed, 91 insertions(+), 124 deletions(-) create mode 100644 arch/powerpc/lib/bootcount.c 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 There are some good people in it, but the orchestra as a whole is equivalent to a gang bent on destruction. - John Cage, composer ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] cmd_usb.c: show cmd usage if no args given
Dear Serge Ziryukin, In message 1272220356-1024-1-git-send-email-ftrvxm...@gmail.com you wrote: Signed-off-by: Serge Ziryukin ftrvxm...@gmail.com --- common/cmd_usb.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) Applied. Note that the old code already printed a usage message when called without arguments, but only after USB had been started, so your code is indeed an improvement. 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 When a program is being tested, it is too late to make design changes. -- Geoffrey James, The Tao of Programming ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V2] POST cleanup V2 (incremental)
Dear Michael Zaidman, In message 1272384468-20573-1-git-send-email-michael.zaid...@gmail.com you wrote: The patch implements step#3 of the POST framework cleanup suggested by Wolfgang Denk in the http://lists.denx.de/pipermail/u-boot/2010-April/070400.html This is an incremental patch, should be applied above its initial version. http://lists.denx.de/pipermail/u-boot/2010-April/070559.html Now that Stefan's version of the first patch is in mainline, could you please rebase and squash your two incremental patches and re-submit as a new one? 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 Q: How do you spell onomatopoeia? A: The way it sounds. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3] POST cleanup v3 (incremental)
Dear Michael Zaidman, In message a0610faf1d39c14a57163f3639145e832a2399f6.1272794305.git.michael.zaid...@gmail.com you wrote: Incremental patch. Should be applied above its v2: http://lists.denx.de/pipermail/u-boot/2010-April/070729.html (Sorry for inconvenience. I will use --in-reply-to option next time) Please move any such comments which are not supposed to become part of the commit message *below* the --- line. Thanks. See previous message - please combine all your remaining patches into one and resubmit. 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 Peace was the way. -- Kirk, The City on the Edge of Forever, stardate unknown ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] Fixup native builds on powerpc
Dear Kumar Gala, In message 1272385744-15094-1-git-send-email-ga...@kernel.crashing.org you wrote: When we changed ARCH from ppc to powerpc we need to treat HOSTARCH the same way. We use HOSTARCH == ARCH to determine if a build is native. Signed-off-by: Kumar Gala ga...@kernel.crashing.org --- * Added ppc - powerpc per Scott W. Makefile |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) 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 Don't you know anything? I should have thought anyone knows that who knows anything about anything... - Terry Pratchett, _Soul Music_ ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Read-only env variables
Dear Joe Hershberger, In message h2j4b538921004271907naebeb396t3928a9f41cc32...@mail.gmail.com you wrote: I see u-boot supports readonly serial# and ethaddr, but I have a few other variables that I need to be read-only. I'm planning to implement a generic list of variables that cannot be changed or deleted. Good idea, and thanks in advance! I'm interested to know what sort of specification people would find most appropriate. My current thought is to follow the same delimiter as the env itself, i.e. null separated list with double null terminator. This list would then be defined in the board config header. It also seems that you should be able to specify simple access rules for each variable name perhaps using =val after each var name where val could have constants (probably numbers for performance, but could be string literals) to define modes. Right now I'm thinking read-only, create-only, change-default, and change-only (i.e no delete) are the modes that make sense. You might also go one step further and define variable types - numeric, string, MAC addr, IP addr, ... On the other hand I wonder if a compile-time defined, static list is such a good idea. Why not putting this list in a variable itself? Then users could use this feature to add their own r/o variables, or protect already existing definitiins, etc. etc. [Note that you could still prevent users from editing the list by including a reference to itself.] I'm also interested if anyone would be opposed to simply using this new specification of readonly vars to implement the serial# and ethaddr protection. The CONFIG_HAS_UID is a bit odd... should that be available in general for read-only vars? If we had such a feature, then all special handling of serial# and ethaddr should go away, of course (this would also allow to fix the inconsistent behaviour of ethaddr (read-only) versus ethNaddr (writable). Regarding CONFIG_HAS_UID - I never understood what it was intended for, and it is completely undocumented, and davinci_schmoogie and MVSMR are the only boards that actually use it. It should be removed from common code. Sergey, Andre - comments? 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 You get a wonderful view from the point of no return. - Terry Pratchett, _Making_Money_ ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3] Fixup native builds on powerpc
Dear Kumar Gala, In message 1272441122-27976-1-git-send-email-ga...@kernel.crashing.org you wrote: When we changed ARCH from ppc to powerpc we need to treat HOSTARCH the same way. We use HOSTARCH == ARCH to determine if a build is native. Signed-off-by: Kumar Gala ga...@kernel.crashing.org --- * Put the ppc64 case first otherwise we get powerpc64 Makefile |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Undid v2, applied this one instead. Kumar, could you please add proper In-reply-to:/References: headers to postings that obsolete earlier patches, so the new versions show up in the thread? 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 Doubt is a pain too lonely to know that faith is his twin brother. - Kahlil Gibran ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 3/3] TI: DaVinci: Create configuration file for da850 EVM
Dear Sudhakar Rajashekhara, In message 1272445230-427-1-git-send-email-sudhakar@ti.com you wrote: Provides initial support for TI OMAP-L138/DA850 SoC devices on a Logic PD EVM board. Signed-off-by: Sudhakar Rajashekhara sudhakar@ti.com --- MAINTAINERS|4 + MAKEALL|1 + Makefile |3 + include/configs/da850evm.h | 135 4 files changed, 143 insertions(+), 0 deletions(-) create mode 100644 include/configs/da850evm.h Patches 2 and 3 should be merged into one, please. diff --git a/MAINTAINERS b/MAINTAINERS index a5d5835..c52803d 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -758,6 +758,10 @@ Nick Thompson nick.thomp...@gefanuc.com da830evmARM926EJS (DA830/OMAP-L137) +Sudhakar Rajashekhara sudhakar@ti.com + + da850evmARM926EJS (DA850/OMAP-L138) + Albin Tonnerre albin.tonne...@free-electrons.com Please keep list sorted. diff --git a/Makefile b/Makefile index 393b180..0f21db6 100644 --- a/Makefile +++ b/Makefile @@ -2913,6 +2913,9 @@ cp922_XA10_config \ cp1026_config: unconfig @board/armltd/integrator/split_by_variant.sh cp $@ +da850evm_config: unconfig + @$(MKCONFIG) $(@:_config=) arm arm926ejs da8xxevm davinci davinci + da830evm_config: unconfig @$(MKCONFIG) $(@:_config=) arm arm926ejs da8xxevm davinci davinci Please keep list sorted, and use just a single entry, i. e.: da830evm_config \ da850evm_config:unconfig @$(MKCONFIG) $(@:_config=) arm arm926ejs da8xxevm davinci davinci diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h new file mode 100644 index 000..2fcc76d --- /dev/null +++ b/include/configs/da850evm.h ... +/* + * Memory Info + */ +#define CONFIG_SYS_MALLOC_LEN(0x1 + 1*1024*1024) /* malloc() len */ +#define CONFIG_SYS_GBL_DATA_SIZE 128 /* reserved for initial data */ +#define PHYS_SDRAM_1 DAVINCI_DDR_EMIF_DATA_BASE /* DDR Start */ +#define PHYS_SDRAM_1_SIZE(64 20) /* SDRAM size 64MB */ +#define CONFIG_SYS_MEMTEST_START PHYS_SDRAM_1 + 0x200 /* memtest start addr */ +#define CONFIG_SYS_MEMTEST_END (PHYS_SDRAM_1 + 0x200 + 16*1024*1024) /* 16MB test */ Line too long. 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 reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man. - George Bernard Shaw ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/3] mmc: add find_mmc_device_quiet that doesnt print not found message
Dear Thomas Chou, In message 1272848085-10698-3-git-send-email-tho...@wytron.com.tw you wrote: We need to query mmc devices in mmc_spi subcommand and don't want the Device not found message. Your subject line is way too long. Signed-off-by: Thomas Chou tho...@wytron.com.tw --- drivers/mmc/mmc.c | 14 +++--- include/mmc.h |1 + 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index cf4ea16..55ab13e 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -60,7 +60,7 @@ int mmc_set_blocklen(struct mmc *mmc, int len) return mmc_send_cmd(mmc, cmd, NULL); } -struct mmc *find_mmc_device(int dev_num) +struct mmc *find_mmc_device_quiet(int dev_num) { struct mmc *m; struct list_head *entry; @@ -72,11 +72,19 @@ struct mmc *find_mmc_device(int dev_num) return m; } - printf(MMC Device %d not found\n, dev_num); - return NULL; } +struct mmc *find_mmc_device(int dev_num) +{ + struct mmc *m = find_mmc_device_quiet(dev_num); + + if (!m) + printf(MMC Device %d not found\n, dev_num); + + return m; +} + Instead of creating a new function please consider using an argument instead? 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 While money can't buy happiness, it certainly lets you choose your own form of misery. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] update include/asm/ gitignore after move
Dear Mike Frysinger, In message 1272392134-13368-2-git-send-email-vap...@gentoo.org you wrote: With the cpu include paths moved, the gitignore paths need updating. Signed-off-by: Mike Frysinger vap...@gentoo.org --- arch/.gitignore|2 ++ include/.gitignore |2 -- 2 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 arch/.gitignore 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 F u cn rd ths u cnt spl wrth a dm! ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] [PATCH V4]Save environment data to mmc.
Dear Terry Lv, In message 12730401491046-git-send-email-r65...@freescale.com you wrote: This patch is to save environment data to mmc card. It uses interfaces defined in generic mmc. Signed-off-by: Terry Lv r65...@freescale.com --- arch/arm/lib/board.c | 14 +++-- arch/powerpc/lib/board.c | 16 +++-- common/Makefile |1 + common/cmd_nvedit.c |3 +- common/env_mmc.c | 154 ++ 5 files changed, 176 insertions(+), 12 deletions(-) create mode 100644 common/env_mmc.c diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c index f5660a9..b7174ea 100644 --- a/arch/arm/lib/board.c +++ b/arch/arm/lib/board.c @@ -347,6 +347,15 @@ void start_armboot (void) dataflash_print_info(); #endif +#ifdef CONFIG_GENERIC_MMC +/* MMC initialization is called before relocating env. + Thus It is required that operations like pin multiplexer + be put in board_init. +*/ Incorrect multiline comment style. Please fix globally. diff --git a/common/env_mmc.c b/common/env_mmc.c new file mode 100644 index 000..c9a9415 --- /dev/null +++ b/common/env_mmc.c Hm... I see a tendency to add more and more such files that all deal with one sort of a block oriented storage device or another. Should we not try to generalize this? 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 My play was a complete success. The audience was a failure. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] serial: punt unused serial_addr()
Dear Mike Frysinger, In message 1273048363-26005-1-git-send-email-vap...@gentoo.org you wrote: Only one file apparently defines this function, and it merely stubs it out. So if no one is defining/calling it, punt it. Signed-off-by: Mike Frysinger vap...@gentoo.org --- board/barco/barco.c |4 include/common.h|1 - 2 files changed, 0 insertions(+), 5 deletions(-) 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 Pig: An animal (Porcus omnivorous) closely allied to the human race by the splendor and vivacity of its appetite, which, however, is in- ferior in scope, for it balks at pig.- Ambrose Bierce ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 00/26] [x86] 'Comming of Age'
Dear Graeme Russ, In message 4be22bcf.2030...@gmail.com you wrote: Hm.. wouldn't it make sense to add you as custodian for x86? What do you think? I actually mentioned that idea previously - What needs to be done to arrange this? I understand I need a PGP key at least which I need to figure out how to do No. I need your _SSH_ public key. 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 Anyone who doesn't believe in miracles is not a realist. - David Ben Gurion ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 04/17] SPEAr : Placing ethaddr write and read within CONFIG_CMD_NET
Dear Vipin KUMAR, In message 4be24179.6010...@st.com you wrote: I get your point. Though, I believe, educating the user about the mac id storage behavior is the solution in this case. Moreover, ethaddr is not set in environment variables by default. So, Yes, it is. Please see the docs. the decision remains with the user as to where he wants to store the ethaddr environment. This command has been introduced to report and save mac id in i2c memory. I would add a section regarding mac id storage and reporting in README.spear Please don't create any special behaviour. Do like everybody else. 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 COBOL is for morons. -- E.W. Dijkstra ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] U-Boot public API example desired
I appreciate the answer, I think this topic has been discussed several times, so thanks for spending time re-visiting it once again. I have looked at both the examples/standalone code and the README.standalone. I have also seen 1) http://old.nabble.com/-U-Boot--How-to-get-GPL-free-standalone-programs-with-u-boot-td27182861.html [1] 2) http://lists.denx.de/pipermail/u-boot/2009-August/058650.html [2] 3) http://osdir.com/ml/boot-loaders.u-boot/2003-11/msg00072.html [3] 4) http://osdir.com/ml/freebsd.embedded/2008-01/msg00019.html [4] 5) http://old.nabble.com/Re%3A--U-Boot--How-to-get-GPL-free-standalone-programs-with-u-boot-p27338654.html [5] Some of these are forums, rather that mailing lists, I apologize for not being specific in my previous message. The part that is not clear to me is if a conclusion has ever been reached as to the availability of a set of GPL-free headers that can be included in a stand-alone application. I think the GPL is quite valuable, but there are situations involving closed-source software where GPL licensed source files must be avoided (I'm sure this is news to nobody). Has such a set of GPL-free headers been developed, or must I develop them myself if I want to use them? In 5) above, you write In message you wrote: I have a question concerning standalone programs based on u-boot and GPL, since I'm not really sure whether the way how the u-boot source files are set up allows GPL free standalone programs. This is the intention; if the current code or documentation should conflict with this intention, it should be fixed. and exports.h should be added to the allowed file list; there should be no need to include common.h. Eventually this needs fixing. Patches are welcome. In the latest U-Boot sources, this issue seems to still exist; headers available for inclusion in stand-alone application seem to include the GPL license language. I can't find equivalent headers that are GPL-free, but maybe I am looking in the wrong place. This last comment includes mention of the allowed file list; I can't locate anything of this nature either. Again, thank you for your time and best regards, Jim Original message: Subject: Re: [U-Boot] U-Boot public API example desired Date: Thu, 06 May 2010 19:42:50 +0200 From: Wolfgang Denk To: j...@sdateam.com [7] CC: u-boot@lists.denx.de [8] References: Dear j...@sdateam.com [10], In message you wrote: Is there an example available of the use of the U-Boot public API or of a stand-alone application, that can be, or is, sanctioned by someone who would definitely know (for example, Wolfgang Denk) as being not a derived work? The code in the examples/standalone/ is supposed to provide example code, and doc/README.standalone is supposed to provide documentation. I've seen several discussions in various mailing lists about these interfaces but I have not seen a definite example that qualifies. It What are these various mailing lists, and what exactluy is not clear to you? 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 [12] People with narrow minds usually have broad tongues. -- James E. Chargin Jr. Sierra Design Associates(530) 478-6689 117 New Mohawk Rd, Suite H j...@sdateam.com [13] Nevada City, CA 95959 USA http:\www.sdateam.com [14] Links: -- [1] http://old.nabble.com/-U-Boot--How-to-get-GPL-free-standalone-programs-with-u-boot-td27182861.html [2] http://lists.denx.de/pipermail/u-boot/2009-August/058650.html [3] http://osdir.com/ml/boot-loaders.u-boot/2003-11/msg00072.html [4] http://osdir.com/ml/freebsd.embedded/2008-01/msg00019.html [5] http://old.nabble.com/Re%3A--U-Boot--How-to-get-GPL-free-standalone-programs-with-u-boot-p27338654.html [6] mailto:w...@denx.de [7] mailto:j...@sdateam.com [8] mailto:u-boot@lists.denx.de [9] mailto:8139.1273161...@sdateam.com [10] mailto:j...@sdateam.com [11] mailto:8139.1273161...@sdateam.com [12] mailto:w...@denx.de [13] mailto:j...@sdateam.com [14] http://www.sdateam.com/ ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Endless loop in cmd_log.c?
Hi Dennis, On Wed, 2010-05-05 at 12:22 -0700, Dennis Ruffer wrote: I am trying to implement CONFIG_LOGBUFFER and CONFIG_CMD_LOG on our ARM systems and I seem to have run into an endless loop. With loglevel=5 so we still see our console output, the printf at the end of logbuff_printk appears to create an endless loop. I had to replace that line with serial_puts(msg); Have I missed some other solution or do the systems that use this never set logbuffer higher than default_message_loglevel? I see the same issue you describe when enabling CONFIG_LOGBUFFER. It looks like only a few boards have CONFIG_LOGBUFFER enabled, and many of them also have CONFIG_SYS_CONSOLE_IS_IN_ENV defined. When CONFIG_SYS_CONSOLE_IS_IN_ENV is defined I believe the behavior is changed so that the the stdout/stderr/stdin values are read from the environment, with a default fallback of 'serial'. My guess is most of the boards with CONFIG_LOGBUFFER defined have their 'stdout' value set to 'serial', so they don't actually utilize the logbuffer, and thus don't run into the issue you found. In any case, I think its a bug and your suggested workaround sounds good to me. Have any interest in submitting a patch to fix it? Best, Peter ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] logbuff: Change default console loglevel to 8
Previously, a default of 3 was assigned to the console loglevel while standard messages had a level of 4. This resulted in U-Boot's console disappearing if a user enabled CONFIG_LOGBUFFER but didn't manually set the 'loglevel' environment variable to a value greater than 4. Setting the default console loglevel to 8 causes all messages to be printed to the console, which is standard U-Boot operation. Users can then reduce the console loglevel if they want using the 'loglevel' environment variable. Signed-off-by: Peter Tyser pty...@xes-inc.com --- common/cmd_log.c |8 ++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/common/cmd_log.c b/common/cmd_log.c index 3653fe1..e3ebe96 100644 --- a/common/cmd_log.c +++ b/common/cmd_log.c @@ -55,8 +55,12 @@ static int logbuff_printk(const char *line); static char buf[1024]; -/* This combination will not print messages with the default loglevel */ -static unsigned console_loglevel = 3; +/* + * This combination will print all messages to the console by default. A user + * can reduce the console_loglevel via the loglevel environment variable if + * needed. + */ +static unsigned console_loglevel = 8; static unsigned default_message_loglevel = 4; static unsigned log_version = 1; #ifdef CONFIG_ALT_LB_ADDR -- 1.6.2.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Endless loop in cmd_log.c?
Peter, reply inline below... -Original Message- From: Peter Tyser [mailto:pty...@xes-inc.com] Sent: Thursday, May 06, 2010 4:27 PM To: Dennis Ruffer Cc: u-boot@lists.denx.de Subject: Re: [U-Boot] Endless loop in cmd_log.c? Hi Dennis, On Wed, 2010-05-05 at 12:22 -0700, Dennis Ruffer wrote: I am trying to implement CONFIG_LOGBUFFER and CONFIG_CMD_LOG on our ARM systems and I seem to have run into an endless loop. With loglevel=5 so we still see our console output, the printf at the end of logbuff_printk appears to create an endless loop. I had to replace that line with serial_puts(msg); Have I missed some other solution or do the systems that use this never set logbuffer higher than default_message_loglevel? I see the same issue you describe when enabling CONFIG_LOGBUFFER. It looks like only a few boards have CONFIG_LOGBUFFER enabled, and many of them also have CONFIG_SYS_CONSOLE_IS_IN_ENV defined. When CONFIG_SYS_CONSOLE_IS_IN_ENV is defined I believe the behavior is changed so that the the stdout/stderr/stdin values are read from the environment, with a default fallback of 'serial'. My guess is most of the boards with CONFIG_LOGBUFFER defined have their 'stdout' value set to 'serial', so they don't actually utilize the logbuffer, and thus don't run into the issue you found. In any case, I think its a bug and your suggested workaround sounds good to me. Have any interest in submitting a patch to fix it? Best, Peter I'm hoping to get setup to submit patches eventually, but I'm not there yet and it's not on my critical path at the moment. I'm just glad to hear I hadn't missed some critical setup piece. Thanks for verifying it! DaR ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Endless loop in cmd_log.c?
snip I'm hoping to get setup to submit patches eventually, but I'm not there yet and it's not on my critical path at the moment. I'm just glad to hear I hadn't missed some critical setup piece. Thanks for verifying it! Thanks for finding it. I'll go ahead and submit a patch fixing the bug - let me know if you have any issues with this. Best, Peter ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/3] mmc: add find_mmc_device_quiet that doesnt print not found message
Dear Wolfgang, On 05/07/2010 06:14 AM, Wolfgang Denk wrote: Dear Thomas Chou, In message1272848085-10698-3-git-send-email-tho...@wytron.com.tw you wrote: We need to query mmc devices in mmc_spi subcommand and don't want the Device not found message. Your subject line is way too long. I will resubmit with a shorter subject. Instead of creating a new function please consider using an argument instead? I will add an argument, int verbose. Thanks. Best regards, Thomas ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] logbuff: Prevent an infinite loop for console output
When using 'logbuff' as stdout and the console loglevel is greater than a message's loglevel it is supposed to be both logged, and printed to the console. The logbuff_printk() function is responsible for both logging and displaying the message. However, logbuff_printk() previously used printf() to print the message to the console. The printf() call would eventually end up back in logbuff_printk(), and an infinite loop would occur which would hang a board. Using serial_puts() instead of printf() in logbuff_printk() avoids the recursion and resolves the issue. Signed-off-by: Peter Tyser pty...@xes-inc.com Reported-by: Dennis Ruffer daruf...@gmail.com --- common/cmd_log.c |7 --- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/common/cmd_log.c b/common/cmd_log.c index e3ebe96..baffeb1 100644 --- a/common/cmd_log.c +++ b/common/cmd_log.c @@ -313,9 +313,10 @@ static int logbuff_printk(const char *line) break; } } - if (msg_level console_loglevel) { - printf(%s, msg); - } + + if (msg_level console_loglevel) + serial_puts(msg); + if (line_feed) msg_level = -1; } -- 1.6.2.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/3 v2] mmc: control message print in find_mmc_device
An argument, verbose, is added to enable/disable the Device not found message. Because we need to query mmc devices in mmc_spi subcommand and don't want the message. Signed-off-by: Thomas Chou tho...@wytron.com.tw --- v2: add an argument instead of add a new func, per Wolfgang. common/cmd_mmc.c |8 drivers/mmc/mmc.c | 11 ++- include/mmc.h |2 +- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/common/cmd_mmc.c b/common/cmd_mmc.c index c67c9cf..9736e5a 100644 --- a/common/cmd_mmc.c +++ b/common/cmd_mmc.c @@ -124,7 +124,7 @@ int do_mmcinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) else dev_num = simple_strtoul(argv[1], NULL, 0); - mmc = find_mmc_device(dev_num); + mmc = find_mmc_device(dev_num, 1); if (mmc) { mmc_init(mmc); @@ -148,7 +148,7 @@ int do_mmcops(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) case 3: if (strcmp(argv[1], rescan) == 0) { int dev = simple_strtoul(argv[2], NULL, 10); - struct mmc *mmc = find_mmc_device(dev); + struct mmc *mmc = find_mmc_device(dev, 1); if (!mmc) return 1; @@ -177,7 +177,7 @@ int do_mmcops(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) u32 cnt = simple_strtoul(argv[5], NULL, 16); u32 n; u32 blk = simple_strtoul(argv[4], NULL, 16); - struct mmc *mmc = find_mmc_device(dev); + struct mmc *mmc = find_mmc_device(dev, 1); if (!mmc) return 1; @@ -200,7 +200,7 @@ int do_mmcops(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) void *addr = (void *)simple_strtoul(argv[3], NULL, 16); u32 cnt = simple_strtoul(argv[5], NULL, 16); u32 n; - struct mmc *mmc = find_mmc_device(dev); + struct mmc *mmc = find_mmc_device(dev, 1); int blk = simple_strtoul(argv[4], NULL, 16); diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index cf4ea16..42e7937 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -60,7 +60,7 @@ int mmc_set_blocklen(struct mmc *mmc, int len) return mmc_send_cmd(mmc, cmd, NULL); } -struct mmc *find_mmc_device(int dev_num) +struct mmc *find_mmc_device(int dev_num, int verbose) { struct mmc *m; struct list_head *entry; @@ -72,7 +72,8 @@ struct mmc *find_mmc_device(int dev_num) return m; } - printf(MMC Device %d not found\n, dev_num); + if (verbose) + printf(MMC Device %d not found\n, dev_num); return NULL; } @@ -84,7 +85,7 @@ mmc_bwrite(int dev_num, ulong start, lbaint_t blkcnt, const void*src) struct mmc_data data; int err; int stoperr = 0; - struct mmc *mmc = find_mmc_device(dev_num); + struct mmc *mmc = find_mmc_device(dev_num, 1); int blklen; if (!mmc) @@ -214,7 +215,7 @@ static ulong mmc_bread(int dev_num, ulong start, lbaint_t blkcnt, void *dst) { int err; int i; - struct mmc *mmc = find_mmc_device(dev_num); + struct mmc *mmc = find_mmc_device(dev_num, 1); if (!mmc) return 0; @@ -860,7 +861,7 @@ int mmc_register(struct mmc *mmc) block_dev_desc_t *mmc_get_dev(int dev) { - struct mmc *mmc = find_mmc_device(dev); + struct mmc *mmc = find_mmc_device(dev, 1); return mmc ? mmc-block_dev : NULL; } diff --git a/include/mmc.h b/include/mmc.h index 8973bc7..0903491 100644 --- a/include/mmc.h +++ b/include/mmc.h @@ -270,7 +270,7 @@ int mmc_register(struct mmc *mmc); int mmc_initialize(bd_t *bis); int mmc_init(struct mmc *mmc); int mmc_read(struct mmc *mmc, u64 src, uchar *dst, int size); -struct mmc *find_mmc_device(int dev_num); +struct mmc *find_mmc_device(int dev_num, int verbose); void print_mmc_devices(char separator); int board_mmc_getcd(u8 *cd, struct mmc *mmc); -- 1.6.6.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 3/3 v7] mmc: add generic mmc spi driver
This patch supports mmc/sd card with spi interface. It is based on the generic mmc framework. It works with SDHC and supports write. The crc checksum on data packet is enabled with the def, #define CONFIG_MMC_SPI_CRC_ON There is a subcomamnd mmc_spi to setup spi bus and cs at run time. Signed-off-by: Thomas Chou tho...@wytron.com.tw --- v7: use find_mmc_device(dev, verbose), per Wolfgang. v6: add constant macros, crc check on data, per Andy. v5: remove dev_num limit to search. v4: change mmc_spi subcommand to search and create new mmc dev. v3: add mmc_spi_init() proto to mmc_spi.h. v2: add crc7, use cmd58 to read ocr, add subcommand mmc_spi. common/Makefile |1 + common/cmd_mmc_spi.c | 115 ++ drivers/mmc/Makefile |1 + drivers/mmc/mmc_spi.c | 393 + include/mmc_spi.h | 27 5 files changed, 537 insertions(+), 0 deletions(-) create mode 100644 common/cmd_mmc_spi.c create mode 100644 drivers/mmc/mmc_spi.c create mode 100644 include/mmc_spi.h diff --git a/common/Makefile b/common/Makefile index dbf7a05..ee23e2f 100644 --- a/common/Makefile +++ b/common/Makefile @@ -118,6 +118,7 @@ COBJS-$(CONFIG_CMD_MII) += miiphyutil.o COBJS-$(CONFIG_CMD_MII) += cmd_mii.o COBJS-$(CONFIG_CMD_MISC) += cmd_misc.o COBJS-$(CONFIG_CMD_MMC) += cmd_mmc.o +COBJS-$(CONFIG_CMD_MMC_SPI) += cmd_mmc_spi.o COBJS-$(CONFIG_MP) += cmd_mp.o COBJS-$(CONFIG_CMD_MTDPARTS) += cmd_mtdparts.o COBJS-$(CONFIG_CMD_NAND) += cmd_nand.o diff --git a/common/cmd_mmc_spi.c b/common/cmd_mmc_spi.c new file mode 100644 index 000..cb33457 --- /dev/null +++ b/common/cmd_mmc_spi.c @@ -0,0 +1,115 @@ +/* + * Command for mmc_spi setup. + * + * Copyright (C) 2010 Thomas Chou tho...@wytron.com.tw + * Licensed under the GPL-2 or later. + */ + +#include common.h +#include malloc.h +#include mmc.h +#include spi.h +#include mmc_spi.h + +#ifndef CONFIG_MMC_SPI_BUS +# define CONFIG_MMC_SPI_BUS 0 +#endif +#ifndef CONFIG_MMC_SPI_CS +# define CONFIG_MMC_SPI_CS 1 +#endif +#ifndef CONFIG_MMC_SPI_SPEED +# define CONFIG_MMC_SPI_SPEED 3000 +#endif +#ifndef CONFIG_MMC_SPI_MODE +# define CONFIG_MMC_SPI_MODE SPI_MODE_3 +#endif + +static void print_mmc_spi(struct mmc *mmc) +{ + struct mmc_spi_priv *priv = mmc-priv; + printf(%s: %d at %u:%u %u %u\n, mmc-name, mmc-block_dev.dev, + priv-bus, priv-cs, priv-speed, priv-mode); +} + +static int do_mmc_spi(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +{ + int dev_num = -1; + uint bus = CONFIG_MMC_SPI_BUS; + uint cs = CONFIG_MMC_SPI_CS; + uint speed = CONFIG_MMC_SPI_SPEED; + uint mode = CONFIG_MMC_SPI_MODE; + char *endp; + struct mmc *mmc; + struct mmc_spi_priv *priv; + + if (argc 2) { + while (1) { + mmc = find_mmc_device(++dev_num, 0); + if (!mmc) + break; + if (strcmp(mmc-name, MMC_SPI) == 0) + print_mmc_spi(mmc); + } + return 0; + } + + cs = simple_strtoul(argv[1], endp, 0); + if (*argv[1] == 0 || (*endp != 0 *endp != ':')) + goto usage; + if (*endp == ':') { + if (endp[1] == 0) + goto usage; + bus = cs; + cs = simple_strtoul(endp + 1, endp, 0); + if (*endp != 0) + goto usage; + } + if (argc = 3) { + speed = simple_strtoul(argv[2], endp, 0); + if (*argv[2] == 0 || *endp != 0) + goto usage; + } + if (argc = 4) { + mode = simple_strtoul(argv[3], endp, 16); + if (*argv[3] == 0 || *endp != 0) + goto usage; + } + if (!spi_cs_is_valid(bus, cs)) { + printf(Invalid SPI bus %u cs %u\n, bus, cs); + return 1; + } + + while (1) { + mmc = find_mmc_device(++dev_num, 0); + if (!mmc) + break; + if (strcmp(mmc-name, MMC_SPI) == 0) { + priv = mmc-priv; + if (priv-bus == bus priv-cs == cs) { + printf(SPI bus and cs in use\n); + print_mmc_spi(mmc); + return 1; + } + } + } + + printf(Create MMC Device\n); + mmc = mmc_spi_init(bus, cs, speed, mode); + if (!mmc) { + printf(Failed to create MMC Device\n); + return 1; + } + print_mmc_spi(mmc); + return 0; + +usage: + cmd_usage(cmdtp); + return 1; +} + +U_BOOT_CMD( + mmc_spi,4, 0, do_mmc_spi, + mmc_spi setup, + [bus:][cs] [hz] [mode] - setup mmc_spi device on given\n +
Re: [U-Boot] [PATCH] [PATCH V4]Save environment data to mmc.
Hi Wolfgang Denk, Though a block offset macros is more suitable for a block device, block size can be changed. Thus I think a size offset is better to describe the offset. What do you think? Thanks~~ Yours Terry -Original Message- From: Wolfgang Denk [mailto:w...@denx.de] Sent: 2010年5月7日 6:22 To: Lv Terry-R65388 Cc: u-boot@lists.denx.de Subject: Re: [U-Boot] [PATCH] [PATCH V4]Save environment data to mmc. Dear Terry Lv, In message 12730401491046-git-send-email-r65...@freescale.com you wrote: This patch is to save environment data to mmc card. It uses interfaces defined in generic mmc. Signed-off-by: Terry Lv r65...@freescale.com --- arch/arm/lib/board.c | 14 +++-- arch/powerpc/lib/board.c | 16 +++-- common/Makefile |1 + common/cmd_nvedit.c |3 +- common/env_mmc.c | 154 ++ 5 files changed, 176 insertions(+), 12 deletions(-) create mode 100644 common/env_mmc.c diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c index f5660a9..b7174ea 100644 --- a/arch/arm/lib/board.c +++ b/arch/arm/lib/board.c @@ -347,6 +347,15 @@ void start_armboot (void) dataflash_print_info(); #endif +#ifdef CONFIG_GENERIC_MMC +/* MMC initialization is called before relocating env. + Thus It is required that operations like pin multiplexer + be put in board_init. +*/ Incorrect multiline comment style. Please fix globally. diff --git a/common/env_mmc.c b/common/env_mmc.c new file mode 100644 index 000..c9a9415 --- /dev/null +++ b/common/env_mmc.c Hm... I see a tendency to add more and more such files that all deal with one sort of a block oriented storage device or another. Should we not try to generalize this? 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 My play was a complete success. The audience was a failure. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] Blackfin: nand: drain the write buffer before returning
From: Andrew Caldwell andrew.caldw...@analog.com The current Blackfin nand write function fills up the write buffer but returns before it has had a chance to drain. On faster systems, this isn't a problem as the operation finishes before the ECC registers are read, but on slower systems the ECC may be incomplete when the core tries to read it. So wait for the buffer to drain once we're doing writing to it. Signed-off-by: Andrew Caldwell andrew.caldw...@analog.com Signed-off-by: Mike Frysinger vap...@gentoo.org --- drivers/mtd/nand/bfin_nand.c |7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/drivers/mtd/nand/bfin_nand.c b/drivers/mtd/nand/bfin_nand.c index f134ef1..13a509d 100644 --- a/drivers/mtd/nand/bfin_nand.c +++ b/drivers/mtd/nand/bfin_nand.c @@ -75,7 +75,7 @@ static void bfin_nfc_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl) int bfin_nfc_devready(struct mtd_info *mtd) { pr_stamp(); - return (bfin_read_NFC_STAT() NBUSY ? 1 : 0); + return (bfin_read_NFC_STAT() NBUSY) ? 1 : 0; } /* @@ -132,6 +132,11 @@ static void bfin_nfc_write_buf(struct mtd_info *mtd, const uint8_t *buf, int len bfin_write_NFC_DATA_WR(buf[i]); } + + /* Wait for the buffer to drain before we return */ + while (bfin_read_NFC_STAT() WB_EMPTY) + if (ctrlc()) + return; } /* -- 1.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] [PATCH v5]Save environment data to mmc.
This patch is to save environment data to mmc card. It uses interfaces defined in generic mmc. Signed-off-by: Terry Lv r65...@freescale.com --- arch/arm/lib/board.c | 15 +++-- arch/powerpc/lib/board.c | 17 +++-- common/Makefile |1 + common/cmd_nvedit.c |3 +- common/env_mmc.c | 154 ++ 5 files changed, 178 insertions(+), 12 deletions(-) create mode 100644 common/env_mmc.c diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c index f5660a9..9ef37d0 100644 --- a/arch/arm/lib/board.c +++ b/arch/arm/lib/board.c @@ -347,6 +347,16 @@ void start_armboot (void) dataflash_print_info(); #endif +#ifdef CONFIG_GENERIC_MMC +/* + * MMC initialization is called before relocating env. + * Thus It is required that operations like pin multiplexer + * be put in board_init. + */ + puts (MMC: ); + mmc_initialize (gd-bd); +#endif + /* initialize environment */ env_relocate (); @@ -419,11 +429,6 @@ extern void davinci_eth_set_mac_addr (const u_int8_t *addr); board_late_init (); #endif -#ifdef CONFIG_GENERIC_MMC - puts (MMC: ); - mmc_initialize (gd-bd); -#endif - #ifdef CONFIG_BITBANGMII bb_miiphy_init(); #endif diff --git a/arch/powerpc/lib/board.c b/arch/powerpc/lib/board.c index 7b09fb5..6850633 100644 --- a/arch/powerpc/lib/board.c +++ b/arch/powerpc/lib/board.c @@ -783,6 +783,17 @@ void board_init_r (gd_t *id, ulong dest_addr) nand_init();/* go init the NAND */ #endif +#ifdef CONFIG_GENERIC_MMC +/* + * MMC initialization is called before relocating env. + * Thus It is required that operations like pin multiplexer + * be put in board_init. + */ + WATCHDOG_RESET (); + puts (MMC: ); + mmc_initialize (bd); +#endif + /* relocate environment function pointers etc. */ env_relocate (); @@ -939,12 +950,6 @@ void board_init_r (gd_t *id, ulong dest_addr) scsi_init (); #endif -#ifdef CONFIG_GENERIC_MMC - WATCHDOG_RESET (); - puts (MMC: ); - mmc_initialize (bd); -#endif - #if defined(CONFIG_CMD_DOC) WATCHDOG_RESET (); puts (DOC: ); diff --git a/common/Makefile b/common/Makefile index dbf7a05..2c37073 100644 --- a/common/Makefile +++ b/common/Makefile @@ -58,6 +58,7 @@ COBJS-$(CONFIG_ENV_IS_IN_FLASH) += env_embedded.o COBJS-$(CONFIG_ENV_IS_IN_NVRAM) += env_embedded.o COBJS-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o COBJS-$(CONFIG_ENV_IS_IN_MG_DISK) += env_mgdisk.o +COBJS-$(CONFIG_ENV_IS_IN_MMC) += env_mmc.o COBJS-$(CONFIG_ENV_IS_IN_NAND) += env_nand.o COBJS-$(CONFIG_ENV_IS_IN_NVRAM) += env_nvram.o COBJS-$(CONFIG_ENV_IS_IN_ONENAND) += env_onenand.o diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c index eb89e9e..57dc288 100644 --- a/common/cmd_nvedit.c +++ b/common/cmd_nvedit.c @@ -59,13 +59,14 @@ DECLARE_GLOBAL_DATA_PTR; !defined(CONFIG_ENV_IS_IN_FLASH)\ !defined(CONFIG_ENV_IS_IN_DATAFLASH)\ !defined(CONFIG_ENV_IS_IN_MG_DISK) \ +!defined(CONFIG_ENV_IS_IN_MMC) \ !defined(CONFIG_ENV_IS_IN_NAND) \ !defined(CONFIG_ENV_IS_IN_NVRAM)\ !defined(CONFIG_ENV_IS_IN_ONENAND) \ !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|NOWHERE} +SPI_FLASH|MG_DISK|NVRAM|MMC|NOWHERE} #endif #define XMK_STR(x) #x diff --git a/common/env_mmc.c b/common/env_mmc.c new file mode 100644 index 000..c9a9415 --- /dev/null +++ b/common/env_mmc.c @@ -0,0 +1,154 @@ +/* + * (C) Copyright 2008-2010 Freescale Semiconductor, Inc. + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +/* #define DEBUG */ + +#include common.h + +#include command.h +#include environment.h +#include linux/stddef.h +#include malloc.h +#include mmc.h + +/* references to names in env_common.c */ +extern uchar default_environment[]; + +char *env_name_spec = MMC; + +#ifdef ENV_IS_EMBEDDED +extern uchar environment[]; +env_t *env_ptr = (env_t *)(environment[0]); +#else /* ! ENV_IS_EMBEDDED */ +env_t *env_ptr = NULL; +#endif /* ENV_IS_EMBEDDED */ + +/* local
Re: [U-Boot] [PATCH v3] Fixup native builds on powerpc
On May 6, 2010, at 5:01 PM, Wolfgang Denk wrote: Dear Kumar Gala, In message 1272441122-27976-1-git-send-email-ga...@kernel.crashing.org you wrote: When we changed ARCH from ppc to powerpc we need to treat HOSTARCH the same way. We use HOSTARCH == ARCH to determine if a build is native. Signed-off-by: Kumar Gala ga...@kernel.crashing.org --- * Put the ppc64 case first otherwise we get powerpc64 Makefile |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Undid v2, applied this one instead. Kumar, could you please add proper In-reply-to:/References: headers to postings that obsolete earlier patches, so the new versions show up in the thread? Thanks. How do you do that with git send-email? - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot