Re: [U-Boot] IRQ in realmode and sleep()
Hello, Scott Wood wrote: On Tue, Jun 29, 2010 at 10:03:53AM +0200, Reinhard Arlt wrote: Hello, the data cache is disabled on the CPCI750 board for the SDRAM by the DBAT entry for the SDRAM, but the data cache is enabled for most 74xx_7xx boards in cpu/74xx_7xx/start.S together with the translation. The decrementer irq is executed in real mode with translation disabled. Now in the irq routine, the processor writes the data into the cache, and the sleep() reads directly from RAM, and do not see the timer running. A good solution would be to have translation on for the irq's too, but a simple solution is to put an '#if !(defined CPCI750)' around the routine, that enables the l1 data cache. Sounds like the right solution is to change the DBAT to be cacheable. due to a bug in the MV64360, the data structures for the MPSC (serial port) must be in not cacheable ram. In operating systems, this is done by a page table entry, but i do not want to start with a page table in u-boot. The question is: Is it O.K., that the irq routines run in real mode, with all your I/O locations are cacheable, for example. -Scott Reinhard ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3] ppc4xx: Add T3COPR board support (PPC460GT based)
This patch adds support for the T3CORP board, based on the AppliedMicro (APM) PPC460GT. Signed-off-by: Stefan Roese s...@denx.de --- v3: - Changed AMCC to APM - Removed unnecessary code for 128MiB flash - Changed spelling: FLASH - flash v2: - Fixed spelling: fibre - fiber - Rebased on next, no changes to toplevel Makefile needed anymore MAINTAINERS|1 + MAKEALL|1 + board/t3corp/Makefile | 53 + board/t3corp/chip_config.c | 59 + board/t3corp/config.mk | 39 board/t3corp/init.S| 99 board/t3corp/t3corp.c | 193 boards.cfg |1 + include/configs/t3corp.h | 544 9 files changed, 990 insertions(+), 0 deletions(-) create mode 100644 board/t3corp/Makefile create mode 100644 board/t3corp/chip_config.c create mode 100644 board/t3corp/config.mk create mode 100644 board/t3corp/init.S create mode 100644 board/t3corp/t3corp.c create mode 100644 include/configs/t3corp.h diff --git a/MAINTAINERS b/MAINTAINERS index d7aec98..9485070 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -392,6 +392,7 @@ Stefan Roese s...@denx.de rainier PPC440GRx sequoia PPC440EPx sycamorePPC405GPr + t3corp PPC460GT taishan PPC440GX walnut PPC405GP yellowstone PPC440GR diff --git a/MAKEALL b/MAKEALL index d6d5f5b..51de8fc 100755 --- a/MAKEALL +++ b/MAKEALL @@ -262,6 +262,7 @@ LIST_4xx= \ sc3 \ sequoia \ sequoia_nand\ + t3corp \ taihu \ taishan \ v5fx30teval \ diff --git a/board/t3corp/Makefile b/board/t3corp/Makefile new file mode 100644 index 000..e2bb546 --- /dev/null +++ b/board/t3corp/Makefile @@ -0,0 +1,53 @@ +# +# (C) Copyright 2010 +# Stefan Roese, DENX Software Engineering, s...@denx.de. +# +# See file CREDITS for list of people who contributed to this +# project. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# + +include $(TOPDIR)/config.mk + +LIB= $(obj)lib$(BOARD).a + +COBJS-y:= $(BOARD).o +COBJS-$(CONFIG_CMD_CHIP_CONFIG) += chip_config.o +SOBJS := init.o + +COBJS := $(COBJS-y) +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS := $(addprefix $(obj),$(SOBJS)) + +$(LIB):$(OBJS) $(SOBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS) + +clean: + rm -f $(SOBJS) $(OBJS) + +distclean: clean + rm -f $(LIB) core *.bak $(obj).depend + +# + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +# diff --git a/board/t3corp/chip_config.c b/board/t3corp/chip_config.c new file mode 100644 index 000..c00bf16 --- /dev/null +++ b/board/t3corp/chip_config.c @@ -0,0 +1,59 @@ +/* + * (C) Copyright 2010 + * Stefan Roese, DENX Software Engineering, s...@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 common.h +#include asm/ppc4xx_config.h + +struct ppc4xx_config ppc4xx_config_val[] = { + { + 600, CPU: 600 PLB: 200 OPB: 100 EBC: 100, + { + 0x86, 0x80, 0xce, 0x1f, 0x79, 0x80, 0x00, 0xa0, + 0x40, 0x08, 0x23, 0x50, 0x0d, 0x05, 0x00, 0x00 + } +
Re: [U-Boot] IRQ in realmode and sleep()
Dear Reinhard Arlt, In message 4c2aec16.9080...@t-online.de you wrote: The question is: Is it O.K., that the irq routines run in real mode, with all your I/O locations are cacheable, for example. I expect to see problems when you enable data cache for I/O; there are many drivers in U-Boot which are not prepared for such conditions. 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 borrow money from a pessimist; they don't expect to be paid back. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [STATUS] U-Boot v2010.06 released - Merge Window OPEN
Hello all, U-Boot v2010.06 has been released and is available from the git repository and the FTP server. The next branch has been pulled into mainline (master branch) and has been removed afterward. The Merge Window for the next release (v2010.09) is open until Sat Jul 17, 2010, 23:59:59 CET = 17 days remaining. The next release v2010.09 is scheduled for September 12, 2010. See http://www.denx.de/wiki/U-Boot/ReleaseCycle for details, including guestimates for the next releases after that. A little statistics [1] - changes since release v2020.03: Processed 447 csets from 101 developers 29 employers found A total of 42309 lines added, 22806 removed (delta 19503) Developers with the most changesets Thomas Chou 28 (6.3%) Graeme Russ 26 (5.8%) Wolfgang Denk 23 (5.1%) Peter Tyser 22 (4.9%) Stefano Babic 19 (4.3%) Kumar Gala 16 (3.6%) Frans Meulenbroeks 16 (3.6%) Anatolij Gustschin 14 (3.1%) Mike Frysinger 14 (3.1%) TsiChung Liew 13 (2.9%) ... Developers with the most changed lines Thomas Chou 12324 (21.4%) Wolfgang Denk 5002 (8.7%) Cyril Chemparathy 4714 (8.2%) Vaibhav Hiremath 2844 (4.9%) Graeme Russ 2562 (4.5%) Anatolij Gustschin2373 (4.1%) Stefan Roese 2211 (3.8%) Minkyu Kang 1595 (2.8%) Albert Aribaud1534 (2.7%) Wolfgang Wegner 1375 (2.4%) ... Developers with the most lines removed Thomas Chou 8029 (35.2%) Detlev Zundel 1280 (5.6%) Scott McNutt 435 (1.9%) Fabio Estevam 68 (0.3%) Michal Simek64 (0.3%) Mike Frysinger 44 (0.2%) Mahavir Jain 7 (0.0%) Matthias Kaehlcke4 (0.0%) Harald Krapfenbauer 3 (0.0%) Guennadi Liakhovetski2 (0.0%) ... Developers with the most signoffs (total 649) Scott McNutt52 (8.0%) Kumar Gala 52 (8.0%) Ben Warren 45 (6.9%) Sandeep Paulraj 44 (6.8%) Thomas Chou 28 (4.3%) Stefan Roese26 (4.0%) Graeme Russ 26 (4.0%) Peter Tyser 22 (3.4%) Mike Frysinger 20 (3.1%) Kim Phillips20 (3.1%) Stefano Babic 19 (2.9%) ... Developers with the most reviews (total 4) Wolfgang Denk4 (100.0%) Developers with the most test credits (total 30) Ian Abbott 8 (26.7%) Ben Gardiner 4 (13.3%) Wolfgang Denk2 (6.7%) Thomas Chou 2 (6.7%) Peter Tyser 2 (6.7%) Anatolij Gustschin 2 (6.7%) Heiko Schocher 2 (6.7%) Prafulla Wadaskar2 (6.7%) Tom 2 (6.7%) Magnus Lilja 2 (6.7%) ... Developers who gave the most tested-by credits (total 30) Wolfgang Denk 16 (53.3%) Thomas Chou 4 (13.3%) Ben Warren 3 (10.0%) Delio Brignoli 2 (6.7%) Mike Frysinger 1 (3.3%) Stefano Babic1 (3.3%) Ed Swarthout 1 (3.3%) Vitaly Kuzmichev 1 (3.3%) Felix Radensky 1 (3.3%) Developers with the most report credits (total 4) Haiying Wang 2 (50.0%) Peter Meerwald 2 (50.0%) Developers who gave the most report credits (total 4) Wolfgang Denk2 (50.0%) Mike Frysinger 1 (25.0%) Kim Phillips 1 (25.0%) Top changeset contributors by employer (Unknown) 117 (26.2%) DENX Software Engineering 79 (17.7%) Freescale 53 (11.9%) Graeme Russ 26 (5.8%) Extreme Engineering Solutions 24 (5.4%) Texas Instruments 20 (4.5%) Analog Devices 16 (3.6%) Samsung 14 (3.1%) MontaVista 8 (1.8%) Psyent 8 (1.8%) ... Top lines changed by employer (Unknown) 24344 (42.3%) DENX Software Engineering 12948 (22.5%) Texas Instruments 7921 (13.8%) Graeme Russ 3048 (5.3%) Samsung 1802 (3.1%) Extreme Engineering Solutions 1366 (2.4%) Freescale 1253 (2.2%) Matrix Vision 1095 (1.9%) Psyent1051 (1.8%) Wind River 974 (1.7%) ... Employers with the most signoffs (total 649) (Unknown) 162 (25.0%) Freescale 126 (19.4%) DENX Software Engineering 82 (12.6%) Texas Instruments 72 (11.1%) Psyent 52 (8.0%) Samsung 33 (5.1%) Graeme Russ 26 (4.0%) Extreme Engineering Solutions 24 (3.7%) Analog Devices 22 (3.4%) MontaVista 8 (1.2%) ... [1] See http://www.denx.de/wiki/U-Boot/UbootStat_2010_06
Re: [U-Boot] [PATCH] Fix typo inside atmel_mci driver
2010/6/22 Claudio Mignanti c.migna...@gmail.com: The function get_mci_clk_rate is used inside atmel_mci driver but never defined. Fix this typo. No comment on this topic. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Mettre à niveau votre compte immédiat ement
Ceci est pour vous informer que vous avez dépassé votre quota de courriel limite de 425 Mo et vous avez besoin pour augmenter votre limite de quota de courriel parce que dans moins de 48 heures de votre e-mail sera désactiver. Augmentation votre limite de quota de courriel et de continuer à utiliser votre compte webmail. Pour augmenter votre limite de quota de courriel à 2,5 Go, cliquez sur le lien ci-dessous: http://www.emailmeform.com/builder/form/756283 Nous vous remercions de votre compréhension. Copyright © 2010 Centre Webmail Helpdest Support ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V6 02/10] drivers/usb/host/ohci-hcd: undef readl/writel before redefining
On Jun 25, 2010, at 2:52 PM, Remy Bohmer wrote: Hi Becky, 2010/6/17 Becky Bruce bec...@kernel.crashing.org: This avoids a build warning that you see if anyone in the header chain has included io.h (which is coming shortly). I also move this to the ohci.h header file in the same dir, which is cleaner. As mentioned before, I do not like the undef's. Probably this would result in a cleaner patch: sed -i 's...@writel@ohci_wri...@g;s...@readl@ohci_re...@g' drivers/usb/host/ohci-hcd.c Kind regards, Remy Signed-off-by: Becky Bruce bec...@kernel.crashing.org --- drivers/usb/host/ohci-hcd.c | 11 --- drivers/usb/host/ohci.h | 13 + 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c index b03a600..3ffdc9d 100644 --- a/drivers/usb/host/ohci-hcd.c +++ b/drivers/usb/host/ohci-hcd.c @@ -83,17 +83,6 @@ #define OHCI_CONTROL_INIT \ (OHCI_CTRL_CBSR 0x3) | OHCI_CTRL_IE | OHCI_CTRL_PLE -/* - * e.g. PCI controllers need this - */ -#ifdef CONFIG_SYS_OHCI_SWAP_REG_ACCESS -# define readl(a) __swap_32(*((volatile u32 *)(a))) -# define writel(a, b) (*((volatile u32 *)(b)) = __swap_32((volatile u32)a)) -#else -# define readl(a) (*((volatile u32 *)(a))) -# define writel(a, b) (*((volatile u32 *)(b)) = ((volatile u32)a)) -#endif /* CONFIG_SYS_OHCI_SWAP_REG_ACCESS */ - #define min_t(type, x, y) \ ({ type __x = (x); type __y = (y); __x __y ? __x: __y; }) diff --git a/drivers/usb/host/ohci.h b/drivers/usb/host/ohci.h index 79aa79d..fa4ecc8 100644 --- a/drivers/usb/host/ohci.h +++ b/drivers/usb/host/ohci.h @@ -7,6 +7,19 @@ * usb-ohci.h */ +/* + * e.g. PCI controllers need this + */ +#undef readl +#undef writel +#ifdef CONFIG_SYS_OHCI_SWAP_REG_ACCESS +# define readl(a) __swap_32(*((volatile u32 *)(a))) +# define writel(a, b) (*((volatile u32 *)(b)) = __swap_32((volatile u32)a)) +#else +# define readl(a) (*((volatile u32 *)(a))) +# define writel(a, b) (*((volatile u32 *)(b)) = ((volatile u32)a)) +#endif /* CONFIG_SYS_OHCI_SWAP_REG_ACCESS */ + /* functions for doing board or CPU specific setup/cleanup */ extern int usb_board_init(void); extern int usb_board_stop(void); -- 1.6.0.6 Becky, You plan on updating this patch? - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] fdt: move fsl specific code from common fdt area to mpc8xxx/fdt.c
On Apr 27, 2010, at 12:23 PM, Kim Phillips wrote: Signed-off-by: Kim Phillips kim.phill...@freescale.com --- unnecessarily introducing mpc83xx-specific conditions in the mpc8xxx Makefile due to current development logistics is ugly IMHO, but it sounds like this is what the people want anyway. Makefile |1 + arch/powerpc/cpu/mpc8xxx/Makefile |7 ++- arch/powerpc/cpu/mpc8xxx/fdt.c| 133 - common/fdt_support.c | 129 --- 4 files changed, 138 insertions(+), 132 deletions(-) applied to 85xx - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] powerpc/8xxx: Distinguish between incompatible SEC h/w types
On Jun 9, 2010, at 11:46 PM, Kumar Gala wrote: From: Kim Phillips kim.phill...@freescale.com CONFIG_SYS_FSL_SEC_COMPAT is set to 2 for the SEC 2.x and SEC 3.x. Parts with newer SEC h/w versions will increment the number to accomodate incompatible code changes. Signed-off-by: Kim Phillips kim.phill...@freescale.com Signed-off-by: Kumar Gala ga...@kernel.crashing.org --- arch/powerpc/cpu/mpc8xxx/fdt.c|6 +++--- arch/powerpc/include/asm/config.h |7 +++ include/fdt_support.h |2 +- 3 files changed, 11 insertions(+), 4 deletions(-) applied to 85xx - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] powerpc/8xxx: Add base support for the SEC4
On Jun 9, 2010, at 11:46 PM, Kumar Gala wrote: From: Kim Phillips kim.phill...@freescale.com Signed-off-by: Kim Phillips kim.phill...@freescale.com Signed-off-by: Kumar Gala ga...@kernel.crashing.org --- arch/powerpc/cpu/mpc8xxx/fdt.c|6 + arch/powerpc/include/asm/config.h |4 ++- arch/powerpc/include/asm/immap_85xx.h | 38 + 3 files changed, 47 insertions(+), 1 deletions(-) applied to 85xx - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] mpc8xxx: Remove cpu-handles for cpus we delete
On Jun 9, 2010, at 1:17 PM, Kumar Gala wrote: We may have cpu-handles pointing to the cpu nodes we delete. If so we should delete the handles as well. Signed-off-by: Kumar Gala ga...@kernel.crashing.org --- arch/powerpc/cpu/mpc8xxx/fdt.c | 36 ++-- 1 files changed, 30 insertions(+), 6 deletions(-) applied to 85xx - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] powerpc/8xxx: Add is_core_disabled to remove disabled cores from dtb
On Jun 9, 2010, at 11:17 PM, Kumar Gala wrote: If we explicitly disabled a core remove it from the dtb we pass on to the kernel. Signed-off-by: Kumar Gala ga...@kernel.crashing.org --- * Fix issues reported by Timur arch/powerpc/cpu/mpc85xx/mp.c | 23 +++ arch/powerpc/cpu/mpc86xx/mp.c | 17 + arch/powerpc/cpu/mpc8xxx/fdt.c |3 ++- arch/powerpc/include/asm/mp.h |3 ++- 4 files changed, 44 insertions(+), 2 deletions(-) applied to 85xx - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] powerpc/85xx: Add command to report errata workarounds
On Jun 9, 2010, at 11:18 PM, Kumar Gala wrote: Add 'errata' command to report what errata we workaround Signed-off-by: Kumar Gala ga...@kernel.crashing.org --- arch/powerpc/cpu/mpc85xx/Makefile |1 + arch/powerpc/cpu/mpc85xx/cmd_errata.c | 35 + 2 files changed, 36 insertions(+), 0 deletions(-) create mode 100644 arch/powerpc/cpu/mpc85xx/cmd_errata.c applied to 85xx - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] powerpc/85xx: Report workaround of errata SATA-A001
On Jun 9, 2010, at 11:18 PM, Kumar Gala wrote: Signed-off-by: Kumar Gala ga...@kernel.crashing.org --- arch/powerpc/cpu/mpc85xx/cmd_errata.c | 14 ++ 1 files changed, 14 insertions(+), 0 deletions(-) applied to 85xx - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] powerpc/85xx: Add recognition of e5500 core
Signed-off-by: Kumar Gala ga...@kernel.crashing.org --- arch/powerpc/cpu/mpc85xx/cpu.c | 20 ++-- 1 files changed, 10 insertions(+), 10 deletions(-) diff --git a/arch/powerpc/cpu/mpc85xx/cpu.c b/arch/powerpc/cpu/mpc85xx/cpu.c index fddeb2f..25fb25c 100644 --- a/arch/powerpc/cpu/mpc85xx/cpu.c +++ b/arch/powerpc/cpu/mpc85xx/cpu.c @@ -93,18 +93,18 @@ int checkcpu (void) minor = PVR_MIN(pvr); printf(Core: ); - switch (fam) { - case PVR_FAM(PVR_85xx): - puts(E500); - break; - default: - puts(Unknown); - break; + if (PVR_FAM(PVR_85xx)) { + if(PVR_MEM(pvr) = 0x3) { + puts(E500); + if (PVR_MEM(pvr) == 0x03) + puts(MC); + } else { + puts(E5500); + } + } else { + puts(Unknown); } - if (PVR_MEM(pvr) == 0x03) - puts(MC); - printf(, Version: %d.%d, (0x%08x)\n, major, minor, pvr); get_sys_info(sysinfo); -- 1.6.0.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] powerpc/85xx: Add support for link stack STAC on e5500
The e5500 has a link register stack and segment target address cache. Its safe to enable these bits on older e500 cores as the bits are implemented in the register. Signed-off-by: Kumar Gala ga...@kernel.crashing.org --- arch/powerpc/include/asm/processor.h |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/include/asm/processor.h b/arch/powerpc/include/asm/processor.h index 9ec319a..844552c 100644 --- a/arch/powerpc/include/asm/processor.h +++ b/arch/powerpc/include/asm/processor.h @@ -534,9 +534,11 @@ #define SPRN_MCSRR00x23a /* Machine Check Save and Restore Register 0 */ #define SPRN_MCSRR10x23b /* Machine Check Save and Restore Register 1 */ #define SPRN_BUCSR 0x3f5 /* Branch Control and Status Register */ +#define BUCSR_STAC_EN 0x0100 /* Segment target addr cache enable */ +#define BUCSR_LS_EN 0x0040 /* Link stack enable */ #define BUCSR_BBFI0x0200 /* Branch buffer flash invalidate */ #define BUCSR_BPEN0x0001 /* Branch prediction enable */ -#define BUCSR_ENABLE (BUCSR_BBFI|BUCSR_BPEN) +#define BUCSR_ENABLE (BUCSR_STAC_EN|BUCSR_LS_EN|BUCSR_BBFI|BUCSR_BPEN) #define SPRN_BBEAR 0x201 /* Branch Buffer Entry Address Register */ #define SPRN_BBTAR 0x202 /* Branch Buffer Target Address Register */ #define SPRN_PID1 0x279 /* Process ID Register 1 */ -- 1.6.0.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] ppc/85xx: Add a structure defn for PIXIS registers
On May 24, 2010, at 1:48 PM, Kumar Gala wrote: The various boards that have PIXIS FPGAs have slightly different register definitions, however there is some common functionality (like reset, ICS307 clk control, etc) that can be shared. The struct definition exists for MPC8536DS, MPC8544DS, MPC8572DS, MPC8610HPCD, and MPC8641HPCN boards. Also fixed ngpixis to be __packed__ instead of aligned. Signed-off-by: Kumar Gala ga...@kernel.crashing.org --- * Changed alignged attribute to packed * Fixed ngpixis as well - k applied to 85xx - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] ppc/85xx: Convert MPC8572DS to using board common ICS307 code
Signed-off-by: Kumar Gala ga...@kernel.crashing.org --- board/freescale/common/Makefile |1 + board/freescale/mpc8572ds/mpc8572ds.c | 145 + include/configs/MPC8572DS.h | 14 +-- 3 files changed, 7 insertions(+), 153 deletions(-) diff --git a/board/freescale/common/Makefile b/board/freescale/common/Makefile index d18445b..3498638 100644 --- a/board/freescale/common/Makefile +++ b/board/freescale/common/Makefile @@ -42,6 +42,7 @@ COBJS-$(CONFIG_MPC8541CDS)+= cds_pci_ft.o COBJS-$(CONFIG_MPC8548CDS) += cds_pci_ft.o COBJS-$(CONFIG_MPC8555CDS) += cds_pci_ft.o +COBJS-$(CONFIG_MPC8572DS) += ics307_clk.o COBJS-$(CONFIG_P2020DS)+= ics307_clk.o SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c) diff --git a/board/freescale/mpc8572ds/mpc8572ds.c b/board/freescale/mpc8572ds/mpc8572ds.c index 6029a51..81d481a 100644 --- a/board/freescale/mpc8572ds/mpc8572ds.c +++ b/board/freescale/mpc8572ds/mpc8572ds.c @@ -1,5 +1,5 @@ /* - * Copyright 2007-2009 Freescale Semiconductor, Inc. + * Copyright 2007-2010 Freescale Semiconductor, Inc. * * See file CREDITS for list of people who contributed to this * project. @@ -284,149 +284,6 @@ int board_early_init_r(void) return 0; } -#ifdef CONFIG_GET_CLK_FROM_ICS307 -/* decode S[0-2] to Output Divider (OD) */ -static unsigned char ics307_S_to_OD[] = { - 10, 2, 8, 4, 5, 7, 3, 6 -}; - -/* Calculate frequency being generated by ICS307-02 clock chip based upon - * the control bytes being programmed into it. */ -/* XXX: This function should probably go into a common library */ -static unsigned long -ics307_clk_freq (unsigned char cw0, unsigned char cw1, unsigned char cw2) -{ - const unsigned long InputFrequency = CONFIG_ICS307_REFCLK_HZ; - unsigned long VDW = ((cw1 1) 0x1FE) + ((cw2 7) 1); - unsigned long RDW = cw2 0x7F; - unsigned long OD = ics307_S_to_OD[cw0 0x7]; - unsigned long freq; - - /* CLK1Frequency = InputFrequency * 2 * (VDW + 8) / ((RDW + 2) * OD) */ - - /* cw0: C1 C0 TTL F1 F0 S2 S1 S0 -* cw1: V8 V7 V6 V5 V4 V3 V2 V1 -* cw2: V0 R6 R5 R4 R3 R2 R1 R0 -* -* R6:R0 = Reference Divider Word (RDW) -* V8:V0 = VCO Divider Word (VDW) -* S2:S0 = Output Divider Select (OD) -* F1:F0 = Function of CLK2 Output -* TTL = duty cycle -* C1:C0 = internal load capacitance for cyrstal -*/ - - /* Adding 1 to get a nicely rounded number, but this needs -* more tweaking to get a properly rounded number. */ - - freq = 1 + (InputFrequency * 2 * (VDW + 8) / ((RDW + 2) * OD)); - - debug(ICS307: CW[0-2]: %02X %02X %02X = %u Hz\n, cw0, cw1, cw2, - freq); - return freq; -} - -unsigned long get_board_sys_clk(ulong dummy) -{ - u8 *pixis_base = (u8 *)PIXIS_BASE; - - return ics307_clk_freq ( - in_8(pixis_base + PIXIS_VSYSCLK0), - in_8(pixis_base + PIXIS_VSYSCLK1), - in_8(pixis_base + PIXIS_VSYSCLK2) - ); -} - -unsigned long get_board_ddr_clk(ulong dummy) -{ - u8 *pixis_base = (u8 *)PIXIS_BASE; - - return ics307_clk_freq ( - in_8(pixis_base + PIXIS_VDDRCLK0), - in_8(pixis_base + PIXIS_VDDRCLK1), - in_8(pixis_base + PIXIS_VDDRCLK2) - ); -} -#else -unsigned long get_board_sys_clk(ulong dummy) -{ - u8 i; - ulong val = 0; - u8 *pixis_base = (u8 *)PIXIS_BASE; - - i = in_8(pixis_base + PIXIS_SPD); - i = 0x07; - - switch (i) { - case 0: - val = ; - break; - case 1: - val = 4000; - break; - case 2: - val = 5000; - break; - case 3: - val = ; - break; - case 4: - val = 8333; - break; - case 5: - val = 1; - break; - case 6: - val = 1; - break; - case 7: - val = 1; - break; - } - - return val; -} - -unsigned long get_board_ddr_clk(ulong dummy) -{ - u8 i; - ulong val = 0; - u8 *pixis_base = (u8 *)PIXIS_BASE; - - i = in_8(pixis_base + PIXIS_SPD); - i = 0x38; - i = 3; - - switch (i) { - case 0: - val = ; - break; - case 1: - val = 4000; - break; - case 2: - val = 5000; -
[U-Boot] [PATCH] ppc/85xx: Convert MPC8536DS to using board common ICS307 code
Signed-off-by: Kumar Gala ga...@kernel.crashing.org --- board/freescale/common/Makefile |1 + board/freescale/mpc8536ds/mpc8536ds.c | 148 - include/configs/MPC8536DS.h | 14 +-- 3 files changed, 6 insertions(+), 157 deletions(-) diff --git a/board/freescale/common/Makefile b/board/freescale/common/Makefile index 3498638..bd6a09d 100644 --- a/board/freescale/common/Makefile +++ b/board/freescale/common/Makefile @@ -42,6 +42,7 @@ COBJS-$(CONFIG_MPC8541CDS)+= cds_pci_ft.o COBJS-$(CONFIG_MPC8548CDS) += cds_pci_ft.o COBJS-$(CONFIG_MPC8555CDS) += cds_pci_ft.o +COBJS-$(CONFIG_MPC8536DS) += ics307_clk.o COBJS-$(CONFIG_MPC8572DS) += ics307_clk.o COBJS-$(CONFIG_P2020DS)+= ics307_clk.o diff --git a/board/freescale/mpc8536ds/mpc8536ds.c b/board/freescale/mpc8536ds/mpc8536ds.c index 1968106..50ca3ca 100644 --- a/board/freescale/mpc8536ds/mpc8536ds.c +++ b/board/freescale/mpc8536ds/mpc8536ds.c @@ -350,154 +350,6 @@ int board_early_init_r(void) return 0; } -#ifdef CONFIG_GET_CLK_FROM_ICS307 -/* decode S[0-2] to Output Divider (OD) */ -static unsigned char -ics307_S_to_OD[] = { - 10, 2, 8, 4, 5, 7, 3, 6 -}; - -/* Calculate frequency being generated by ICS307-02 clock chip based upon - * the control bytes being programmed into it. */ -/* XXX: This function should probably go into a common library */ -static unsigned long -ics307_clk_freq (unsigned char cw0, unsigned char cw1, unsigned char cw2) -{ - const unsigned long long InputFrequency = CONFIG_ICS307_REFCLK_HZ; - unsigned long VDW = ((cw1 1) 0x1FE) + ((cw2 7) 1); - unsigned long RDW = cw2 0x7F; - unsigned long OD = ics307_S_to_OD[cw0 0x7]; - unsigned long freq; - - /* CLK1Frequency = InputFrequency * 2 * (VDW + 8) / ((RDW + 2) * OD) */ - - /* cw0: C1 C0 TTL F1 F0 S2 S1 S0 -* cw1: V8 V7 V6 V5 V4 V3 V2 V1 -* cw2: V0 R6 R5 R4 R3 R2 R1 R0 -* -* R6:R0 = Reference Divider Word (RDW) -* V8:V0 = VCO Divider Word (VDW) -* S2:S0 = Output Divider Select (OD) -* F1:F0 = Function of CLK2 Output -* TTL = duty cycle -* C1:C0 = internal load capacitance for cyrstal -*/ - - /* Adding 1 to get a nicely rounded number, but this needs -* more tweaking to get a properly rounded number. */ - - freq = 1 + (InputFrequency * 2 * (VDW + 8) / ((RDW + 2) * OD)); - - debug(ICS307: CW[0-2]: %02X %02X %02X = %u Hz\n, cw0, cw1, cw2, - freq); - return freq; -} - -unsigned long -get_board_sys_clk(ulong dummy) -{ - u8 *pixis_base = (u8 *)PIXIS_BASE; - - return ics307_clk_freq ( - in_8(pixis_base + PIXIS_VSYSCLK0), - in_8(pixis_base + PIXIS_VSYSCLK1), - in_8(pixis_base + PIXIS_VSYSCLK2) - ); -} - -unsigned long -get_board_ddr_clk(ulong dummy) -{ - u8 *pixis_base = (u8 *)PIXIS_BASE; - - return ics307_clk_freq ( - in_8(pixis_base + PIXIS_VDDRCLK0), - in_8(pixis_base + PIXIS_VDDRCLK1), - in_8(pixis_base + PIXIS_VDDRCLK2) - ); -} -#else -unsigned long -get_board_sys_clk(ulong dummy) -{ - u8 i; - ulong val = 0; - u8 *pixis_base = (u8 *)PIXIS_BASE; - - i = in_8(pixis_base + PIXIS_SPD); - i = 0x07; - - switch (i) { - case 0: - val = ; - break; - case 1: - val = 4000; - break; - case 2: - val = 5000; - break; - case 3: - val = ; - break; - case 4: - val = 8333; - break; - case 5: - val = 1; - break; - case 6: - val = 1; - break; - case 7: - val = 1; - break; - } - - return val; -} - -unsigned long -get_board_ddr_clk(ulong dummy) -{ - u8 i; - ulong val = 0; - u8 *pixis_base = (u8 *)PIXIS_BASE; - - i = in_8(pixis_base + PIXIS_SPD); - i = 0x38; - i = 3; - - switch (i) { - case 0: - val = ; - break; - case 1: - val = 4000; - break; - case 2: - val = 5000; - break; - case 3: - val = ; - break; - case 4: - val = 8333; - break; - case 5: - val = 1; - break; - case 6: - val = 1; - break; - case 7: - val = 1; - break; - } - return val; -} -#endif - int board_eth_init(bd_t *bis) { #ifdef CONFIG_TSEC_ENET diff --git a/include/configs/MPC8536DS.h b/include/configs/MPC8536DS.h index
Re: [U-Boot] [PATCH v3] Move ICS CLK chip frequenty calculation code into a common board library
On May 24, 2010, at 3:09 PM, Kumar Gala wrote: We have several boards that use the same ICS307 CLK chip to drive the System clock and DDR clock. Move the code into a common location so we share it. Convert the P2020DS board as the first to use the new common ICS307 code. Signed-off-by: Kumar Gala ga...@kernel.crashing.org --- * unsigned char - u8 * remove 1 + applied to 85xx - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] eSPI and Intel E1000 support for P1/P2 RDB
On Jun 23, 2010, at 8:56 AM, Poonam Aggrwal wrote: This patch enables the eSPI configuration to use the Spansion Flash on P1 and P2 RDB Platforms This also enables the Intel Pro/1000 PT Gb Ethernet PCI-E Network Adapter configuration support Signed-off-by: Poonam Aggrwal poonam.aggr...@freescale.com --- include/configs/P1_P2_RDB.h | 15 +++ 1 files changed, 15 insertions(+), 0 deletions(-) applied to 85xx - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] 85xx/p1_p2_rdb: enable hwconfig
On Jun 23, 2010, at 9:08 AM, Poonam Aggrwal wrote: Signed-off-by: Vivek Mahajan vivek.maha...@freescale.com --- include/configs/P1_P2_RDB.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) applied to 85xx - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 RESEND] OMAP: mmc: add support for second and third mmc channels
This patch adds support for the second and third mmc channels on OMAP3 processors Boards wishing to use this feature should define CONFIG_SYS_MMC_SET_DEV in the board config Tested on Overo Signed-off-by: Steve Sakoman st...@sakoman.com Tested-by: Philip Balister phi...@opensdr.com Thanks There were checkpatch erros. I took care of it. Applying to u-boot-ti ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v5 00/18] Network support for spear platforms and SPEAr1300
Tom, Wolfgang, THis time everything should be ok. Thks for your attention, Arm Vipin KUMAR wrote: Dear Wolfgang, Tom, The following set of patches is the fifth iteration of patches for the following changes - Network device driver for synopsys designware peripheral - SPEAr1300 SoC support - A few other misc changes and bugfixes These also include the feedbacks given by Tom and Ben These set of patches are rebased on e5ed138a23923ebe61843244748d98d3dbc04777 Please include these changes in the mainline u-boot Regards Vipin Vipin KUMAR (18): 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 | 28 +- 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 | 32 +- 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| 18 +- board/spear/spear310/config.mk | 11 - board/spear/spear310/spear310.c| 35 ++- board/spear/spear320/config.mk | 11 - board/spear/spear320/spear320.c| 23 +- board/spear/spear600/config.mk | 11 - board/spear/spear600/spear600.c| 18 +- 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
Re: [U-Boot] [PATCH] [v3] powerpc: add support for the Freescale P1022DS reference board
Kumar, please don't forget this patch. On Mon, Jun 14, 2010 at 3:28 PM, Timur Tabi ti...@freescale.com wrote: Add basic suport for the Freescale P1022DS reference board. Specifics: 1) 36-bit only 2) Booting from NOR flash only 3) Environment stored in NOR flash only 4) No SPI support 5) No DIU support Signed-off-by: Timur Tabi ti...@freescale.com -- Timur Tabi Linux kernel developer at Freescale ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] [v3] powerpc: add support for the Freescale P1022DS reference board
On Jun 30, 2010, at 8:55 AM, Timur Tabi wrote: Kumar, please don't forget this patch. On Mon, Jun 14, 2010 at 3:28 PM, Timur Tabi ti...@freescale.com wrote: Add basic suport for the Freescale P1022DS reference board. Specifics: 1) 36-bit only 2) Booting from NOR flash only 3) Environment stored in NOR flash only 4) No SPI support 5) No DIU support Signed-off-by: Timur Tabi ti...@freescale.com -- Timur Tabi Linux kernel developer at Freescale Sure, can you update against 85xx upstream tree. Some Makefile changes will break this patch. - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] [v3] powerpc: add support for the Freescale P1022DS reference board
On Wed, Jun 30, 2010 at 9:02 AM, Kumar Gala ga...@kernel.crashing.org wrote: On Jun 30, 2010, at 8:55 AM, Timur Tabi wrote: Kumar, please don't forget this patch. It applies against Wolfgang's 'next' branch. Have you updated your branch to pull in the new Makefile code? -- Timur Tabi Linux kernel developer at Freescale ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] [v3] powerpc: add support for the Freescale P1022DS reference board
On Jun 30, 2010, at 9:02 AM, Kumar Gala wrote: On Jun 30, 2010, at 8:55 AM, Timur Tabi wrote: Kumar, please don't forget this patch. On Mon, Jun 14, 2010 at 3:28 PM, Timur Tabi ti...@freescale.com wrote: Add basic suport for the Freescale P1022DS reference board. Specifics: 1) 36-bit only 2) Booting from NOR flash only 3) Environment stored in NOR flash only 4) No SPI support 5) No DIU support Signed-off-by: Timur Tabi ti...@freescale.com -- Timur Tabi Linux kernel developer at Freescale Sure, can you update against 85xx upstream tree. Some Makefile changes will break this patch. Ignore me. I realized once I started looking further you had already made this patch against 'next'. - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v6] POST cleanup.
- Revives POST for blackfin arch; - Removes redundant code: arch/blackfin/lib/post.c board/ssv/common/post.c arch/powerpc/cpu/ppc4xx/commproc.c arch/powerpc/cpu/mpc512x/common.c - fixes up the post_word_{load|store} usage; Signed-off-by: Michael Zaidman michael.zaid...@gmail.com Acked-by: Detlev Zundel d...@denx.de Tested-by: Anatolij Gustschin ag...@denx.de List of the maintainers of the affected by patch boards: Cc: Stephan Linz l...@li-pro.net Cc: Denis Peter d.pe...@mpl.ch Cc: Matthias Fuchs matthias.fu...@esd-electronics.com Cc: Peter Tyser pty...@xes-inc.com Cc: Stefan Roese s...@denx.de Cc: Mike Frysinger vap...@gentoo.org Cc: Niklaus Giger niklaus.gi...@netstal.com Cc: Larry Johnson l...@acm.org Cc: Feng Kan f...@amcc.com --- arch/blackfin/lib/Makefile |2 +- arch/blackfin/lib/board.c |1 - arch/blackfin/lib/post.c| 421 --- arch/powerpc/cpu/mpc512x/common.c | 25 -- arch/powerpc/cpu/mpc8260/commproc.c | 20 -- arch/powerpc/cpu/mpc85xx/commproc.c | 20 -- arch/powerpc/cpu/mpc8xx/commproc.c | 20 -- arch/powerpc/cpu/ppc4xx/Makefile|1 - arch/powerpc/cpu/ppc4xx/commproc.c | 53 - board/barco/barco.c |9 - board/bc3450/bc3450.c | 20 -- board/bf537-stamp/Makefile |2 +- board/bf537-stamp/post.c| 14 -- board/cm5200/cm5200.c | 16 -- board/tqc/tqm5200/tqm5200.c | 19 -- board/xes/xpedite1000/xpedite1000.c | 16 -- include/common.h|5 +- include/configs/KAREF.h |3 +- include/configs/METROBOX.h |3 +- include/configs/MIP405.h|4 - include/configs/PMC440.h|3 +- include/configs/TB5200.h|2 +- include/configs/XPEDITE1000.h |3 +- include/configs/alpr.h |3 +- include/configs/barco.h |2 + include/configs/bf537-stamp.h |1 + include/configs/bfin_adi_common.h |1 + include/configs/hcu4.h |3 +- include/configs/hcu5.h |5 +- include/configs/hmi1001.h |6 +- include/configs/icon.h |3 +- include/configs/inka4x0.h |6 +- include/configs/katmai.h|3 +- include/configs/kilauea.h |3 +- include/configs/korat.h |3 +- include/configs/lwmon5.h|2 +- include/configs/makalu.h|3 +- include/configs/mcu25.h |3 +- include/configs/mpc5121-common.h|3 +- include/configs/ocotea.h|3 +- include/configs/redwood.h |3 +- include/configs/sequoia.h |3 +- include/configs/taishan.h |3 +- include/configs/yucca.h |3 +- include/configs/zeus.h |7 +- include/post.h | 57 +- post/Makefile |3 +- 47 files changed, 101 insertions(+), 713 deletions(-) delete mode 100644 arch/blackfin/lib/post.c delete mode 100644 arch/powerpc/cpu/mpc512x/common.c delete mode 100644 arch/powerpc/cpu/ppc4xx/commproc.c diff --git a/arch/blackfin/lib/Makefile b/arch/blackfin/lib/Makefile index 3bdba75..a18bbd6 100644 --- a/arch/blackfin/lib/Makefile +++ b/arch/blackfin/lib/Makefile @@ -46,7 +46,7 @@ COBJS-y += clocks.o COBJS-$(CONFIG_CMD_CACHE_DUMP) += cmd_cache_dump.o COBJS-$(CONFIG_CMD_KGDB) += kgdb.o COBJS-y+= muldi3.o -COBJS-$(CONFIG_POST) += post.o tests.o +COBJS-$(CONFIG_POST_ALT_LIST) += tests.o COBJS-y+= string.o SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c) diff --git a/arch/blackfin/lib/board.c b/arch/blackfin/lib/board.c index 4e9bb19..00a2041 100644 --- a/arch/blackfin/lib/board.c +++ b/arch/blackfin/lib/board.c @@ -321,7 +321,6 @@ void board_init_r(gd_t * id, ulong dest_addr) #if defined(CONFIG_POST) post_output_backlog(); - post_reloc(); #endif /* initialize malloc() area */ diff --git a/arch/blackfin/lib/post.c b/arch/blackfin/lib/post.c deleted file mode 100644 index faf6b96..000 --- a/arch/blackfin/lib/post.c +++ /dev/null @@ -1,421 +0,0 @@ -/* - * (C) Copyright 2002 - * Wolfgang Denk, DENX Software Engineering, w...@denx.de. - * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along
[U-Boot] [PATCH] drivers/usb/host/ohci-hcd: rename readl/writel to ohci_readl/ohci_writel
This avoids a build warning that you see if anyone in the header chain has included io.h (which is coming shortly). The previous code redefined readl/writel; this patch renames it to be specific to ohci. The defines are also moved from ohci-hcd.c to ohci.h. Signed-off-by: Becky Bruce bec...@kernel.crashing.org --- Remy, My apologies - I totally zoned out on this. Anyway, hopefully this is better. I changed readl/writel to ohci_readl/writel as you suggest. There are a few other minor changes to avoid going over 80 characters per line. I've built and booted this on 8641HPCN. Cheers, Becky drivers/usb/host/ohci-hcd.c | 150 +-- drivers/usb/host/ohci.h | 15 - 2 files changed, 85 insertions(+), 80 deletions(-) diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c index b03a600..3f76c4e 100644 --- a/drivers/usb/host/ohci-hcd.c +++ b/drivers/usb/host/ohci-hcd.c @@ -83,17 +83,6 @@ #define OHCI_CONTROL_INIT \ (OHCI_CTRL_CBSR 0x3) | OHCI_CTRL_IE | OHCI_CTRL_PLE -/* - * e.g. PCI controllers need this - */ -#ifdef CONFIG_SYS_OHCI_SWAP_REG_ACCESS -# define readl(a) __swap_32(*((volatile u32 *)(a))) -# define writel(a, b) (*((volatile u32 *)(b)) = __swap_32((volatile u32)a)) -#else -# define readl(a) (*((volatile u32 *)(a))) -# define writel(a, b) (*((volatile u32 *)(b)) = ((volatile u32)a)) -#endif /* CONFIG_SYS_OHCI_SWAP_REG_ACCESS */ - #define min_t(type, x, y) \ ({ type __x = (x); type __y = (y); __x __y ? __x: __y; }) @@ -147,13 +136,13 @@ struct ohci_device ohci_dev; struct usb_device *devgone; static inline u32 roothub_a(struct ohci *hc) - { return readl(hc-regs-roothub.a); } + { return ohci_readl(hc-regs-roothub.a); } static inline u32 roothub_b(struct ohci *hc) - { return readl(hc-regs-roothub.b); } + { return ohci_readl(hc-regs-roothub.b); } static inline u32 roothub_status(struct ohci *hc) - { return readl(hc-regs-roothub.status); } + { return ohci_readl(hc-regs-roothub.status); } static inline u32 roothub_portstatus(struct ohci *hc, int i) - { return readl(hc-regs-roothub.portstatus[i]); } + { return ohci_readl(hc-regs-roothub.portstatus[i]); } /* forward declaration */ static int hc_interrupt(void); @@ -302,11 +291,11 @@ static void ohci_dump_status(ohci_t *controller) struct ohci_regs*regs = controller-regs; __u32 temp; - temp = readl(regs-revision) 0xff; + temp = ohci_readl(regs-revision) 0xff; if (temp != 0x10) dbg(spec %d.%d, (temp 4), (temp 0x0f)); - temp = readl(regs-control); + temp = ohci_readl(regs-control); dbg(control: 0x%08x%s%s%s HCFS=%s%s%s%s%s CBSR=%d, temp, (temp OHCI_CTRL_RWE) ? RWE : , (temp OHCI_CTRL_RWC) ? RWC : , @@ -319,7 +308,7 @@ static void ohci_dump_status(ohci_t *controller) temp OHCI_CTRL_CBSR ); - temp = readl(regs-cmdstatus); + temp = ohci_readl(regs-cmdstatus); dbg(cmdstatus: 0x%08x SOC=%d%s%s%s%s, temp, (temp OHCI_SOC) 16, (temp OHCI_OCR) ? OCR : , @@ -328,18 +317,20 @@ static void ohci_dump_status(ohci_t *controller) (temp OHCI_HCR) ? HCR : ); - ohci_dump_intr_mask(intrstatus, readl(regs-intrstatus)); - ohci_dump_intr_mask(intrenable, readl(regs-intrenable)); + ohci_dump_intr_mask(intrstatus, ohci_readl(regs-intrstatus)); + ohci_dump_intr_mask(intrenable, ohci_readl(regs-intrenable)); - maybe_print_eds(ed_periodcurrent, readl(regs-ed_periodcurrent)); + maybe_print_eds(ed_periodcurrent, + ohci_readl(regs-ed_periodcurrent)); - maybe_print_eds(ed_controlhead, readl(regs-ed_controlhead)); - maybe_print_eds(ed_controlcurrent, readl(regs-ed_controlcurrent)); + maybe_print_eds(ed_controlhead, ohci_readl(regs-ed_controlhead)); + maybe_print_eds(ed_controlcurrent, + ohci_readl(regs-ed_controlcurrent)); - maybe_print_eds(ed_bulkhead, readl(regs-ed_bulkhead)); - maybe_print_eds(ed_bulkcurrent, readl(regs-ed_bulkcurrent)); + maybe_print_eds(ed_bulkhead, ohci_readl(regs-ed_bulkhead)); + maybe_print_eds(ed_bulkcurrent, ohci_readl(regs-ed_bulkcurrent)); - maybe_print_eds(donehead, readl(regs-donehead)); + maybe_print_eds(donehead, ohci_readl(regs-donehead)); } static void ohci_dump_roothub(ohci_t *controller, int verbose) @@ -518,11 +509,11 @@ static inline int sohci_return_job(struct ohci *hc, urb_priv_t *urb) /* implicitly requeued */ if (urb-dev-irq_handle (urb-dev-irq_act_len = urb-actual_length)) { - writel(OHCI_INTR_WDH, regs-intrenable); - readl(regs-intrenable); /* PCI posting flush
Re: [U-Boot] AT91: Apply for the owner of AT91 custodian tree
Dear Hong, In message 0f5f73e36031fd46ad3f2e6948f0c0a0205...@frimb01.corp.atmel.com you wrote: We noticed that the AT91 custodian tree has been left orphaned for a period of time. We're going to take care of AT91 custodian tree and continue bug fixing, patch review, and new board support. Thanks for volunteering, and welcome aboard. 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 all is said and done, more is said than done. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 3/6] ARMV7: Restructure OMAP mmc driver to allow code sharing between OMAP3 and OMAP4
Subject: [U-Boot] [PATCH v4 3/6] ARMV7: Restructure OMAP mmc driver to allow code sharing between OMAP3 and OMAP4 The architecture independent header is moved to drivers/mmc, and the architecture dependent headers reside in asm/arch-omap3 and asm/arch-omap4 Signed-off-by: Steve Sakoman st...@sakoman.com --- This patch did not apply clean. I have fixed it. Pushed to u-boot-ti ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 4/6] ARMV7: Restructure OMAP i2c driver to allow code sharing between OMAP3 and OMAP4
Subject: [U-Boot] [PATCH v4 4/6] ARMV7: Restructure OMAP i2c driver to allow code sharing between OMAP3 and OMAP4 This patch modifies the omap24xx driver so that it will also work with OMAP4. Signed-off-by: Steve Sakoman st...@sakoman.com --- IIRC you already had an ACK for this change from Heiko Pushed to u-boot-ti Thanks, Sandeep ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 0/6] Add support for TI OMAP4 SDP and Panda
This is version 4, which takes into account all feedback to date, and has been rebased on the next branch. The folowing series adds support for two boards based upon the TI OMAP4430. The OMAP4430 is a Cortex-A9 based SOC from TI. The first patch in this series renames the cpu arm_cortexa8 to armv7 so that the existing cortex A8 code can be shared with cortex A9. Both A8 and A9 are based on ARMV7 architecture. The 2nd patch adds basic OMAP4 architecture support. The 3rd patch restructures the OMAP mmc driver code so that it can be shared by both OMAP3 and OMAP4 boards. This patch depends on a previously submitted patch (OMAP: mmc: add support for second and third mmc channel): http://www.mail-archive.com/u-boot@lists.denx.de/msg31765.html The 4th patch restructures the OMAP i2c code so that it can be shared by both OMAP3 and OMAP4 boards. And, finally, the 5th and 6th patches add board support for Panda and SDP. I build tested each step of the series for all ARMV7 boards (devkit8000 mx51evk omap3_beagle omap3_overo omap3_evm omap3_pandora omap3_sdp3430 omap3_zoom1 omap3_zoom2 smdkc100) I did a run test at each step of the series for Overo to verify no regressions on an existing board. Of couse I also run test the final two steps of the series on SDP and Panda. --- Steve Sakoman (6): ARM: Rename arch/arm/cpu/arm_cortexa8 to armv7 ARMV7: Add basic support for TI OMAP4 ARMV7: Restructure OMAP mmc driver to allow code sharing between OMAP3 and OMAP4 ARMV7: Restructure OMAP i2c driver to allow code sharing between OMAP3 and OMAP4 ARMV7: Add support for TI OMAP4430 SDP ARMV7: Add support for TI OMAP4 Panda I ran MAKEALL for ARMV7 and I got several compile errors. I have setup a testing branch for you(u-boot-ti/testing) with all the patches applied. Please fix and resubmit. Thanks, Sandeep ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Pull request: u-boot-usb
The following changes since commit 39ddd10b046fb791f47281ffb2100be01909ad72: Wolfgang Denk (1): Merge branch 'master' of ssh://gemini/home/wd/git/u-boot/master are available in the git repository at: git://git.denx.de/u-boot-usb.git master Ajay Kumar Gupta (4): musb: Use name based initialization for musb_config musb: Add Phy programming for using external Vbus omap3evm: Add board revision function musb: Program extvbus for OMAP3EVM Rev = E Becky Bruce (1): drivers/usb/host/ohci-hcd: rename readl/writel to ohci_readl/ohci_writel Sergey Matyukevich (1): USB OHCI support for at91sam9g45 SoC arch/arm/include/asm/arch-at91/at91_pmc.h | 14 ++- board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c | 13 ++ board/ti/evm/evm.c | 43 +++ board/ti/evm/evm.h | 14 ++ drivers/usb/host/ohci-at91.c| 14 ++ drivers/usb/host/ohci-hcd.c | 150 +++ drivers/usb/host/ohci.h | 15 ++- drivers/usb/musb/da8xx.c|6 +- drivers/usb/musb/davinci.c |6 +- drivers/usb/musb/musb_core.c|7 + drivers/usb/musb/musb_core.h| 30 +- drivers/usb/musb/omap3.c|9 +- drivers/usb/musb/omap3.h|4 + 13 files changed, 233 insertions(+), 92 deletions(-) ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] orion5x: edminiv2: add libata support
Signed-off-by: Albert Aribaud albert.arib...@free.fr --- This patch: - adds support in libata for the orion5x MVSATAHC controller; - enables orion5x MVSTAHC port 1 on the edmini board; - adds IDE and EXT2 commands to the edminiv2 command set. arch/arm/include/asm/arch-orion5x/orion5x.h | 20 ++- board/LaCie/edminiv2/config.mk |6 - board/LaCie/edminiv2/edminiv2.c | 22 + common/cmd_ide.c| 14 +++--- include/configs/edminiv2.h | 35 +- 5 files changed, 88 insertions(+), 9 deletions(-) diff --git a/arch/arm/include/asm/arch-orion5x/orion5x.h b/arch/arm/include/asm/arch-orion5x/orion5x.h index 4008c84..2724a70 100644 --- a/arch/arm/include/asm/arch-orion5x/orion5x.h +++ b/arch/arm/include/asm/arch-orion5x/orion5x.h @@ -38,7 +38,7 @@ #if defined(CONFIG_FEROCEON) #include asm/arch/cpu.h -/* SOC specific definations */ +/* SOC specific definitions */ #define ORION5X_REGISTER(x)(ORION5X_REGS_PHY_BASE + x) /* Documented registers */ @@ -54,7 +54,23 @@ #define ORION5X_REG_PCIE_BASE (ORION5X_REGISTER(0x4)) #define ORION5X_USB20_PORT0_BASE (ORION5X_REGISTER(0x5)) #define ORION5X_USB20_PORT1_BASE (ORION5X_REGISTER(0xA)) -#define ORION5X_EGIGA_BASE (ORION5X_REGISTER(0x72000)) +#define ORION5X_SATA_BASE (ORION5X_REGISTER(0x8)) +#define ORION5X_SATA_PORT0_OFFSET 0x2000 +#define ORION5X_SATA_PORT1_OFFSET 0x4000 + +/* + * SATA definitions needed for controller initialization + */ +/* SControl register address */ +#define ORION5X_SATA_PORT1_SCONTROL_REG \ + (ORION5X_SATA_BASE+ORION5X_SATA_PORT1_OFFSET+0x308) +/* Mask and values for device DETection and link initialization */ +#define ORION5X_SATA_SCONTROL_DET_MASK 0x000F +#define ORION5X_SATA_SCONTROL_DET_NONE 0x +#define ORION5X_SATA_SCONTROL_DET_INIT 0x0001 +/* Mask and values for device Interface Power Management */ +#define ORION5X_SATA_SCONTROL_IMP_MASK 0x0F00 +#define ORION5X_SATA_SCONTROL_IMP_NO_LP_ALLOWED0x0300 #define CONFIG_MAX_RAM_BANK_SIZE (64*1024*1024) diff --git a/board/LaCie/edminiv2/config.mk b/board/LaCie/edminiv2/config.mk index 3dec1aa..1606cca 100644 --- a/board/LaCie/edminiv2/config.mk +++ b/board/LaCie/edminiv2/config.mk @@ -24,4 +24,8 @@ # MA 02110-1301 USA # -TEXT_BASE = 0x0010 +# As the Linux kernel will load from 8000 up and we cannot tell +# how big it can be, let U-Boot run in the topmost megabyte of the +# ED Mini V2 64 megabyte DRAM. + +TEXT_BASE = 0x03F0 diff --git a/board/LaCie/edminiv2/edminiv2.c b/board/LaCie/edminiv2/edminiv2.c index 54c0ffe..6b4f0e5 100644 --- a/board/LaCie/edminiv2/edminiv2.c +++ b/board/LaCie/edminiv2/edminiv2.c @@ -80,13 +80,35 @@ ulong board_flash_get_legacy(ulong base, int banknum, flash_info_t *info) } #endif /* CONFIG_SYS_FLASH_CFI */ +/* ED Mini V2 uses SATA PORT1. Initialize this port and disable + * disable low power on it + */ + /* mask for isolating IPM and DET fields in SControl register */ +#define EDMINIV2_SCONTROL_MASK (ORION5X_SATA_SCONTROL_DET_MASK \ + || ORION5X_SATA_SCONTROL_IMP_MASK) +/* IPM and DET values for initializing link */ +#define EDMINIV2_PORT_INIT (ORION5X_SATA_SCONTROL_DET_INIT \ + || ORION5X_SATA_SCONTROL_IMP_NO_LP_ALLOWED) +/* IPM and DET values to use link once initialized */ +#define EDMINIV2_PORT_USE (ORION5X_SATA_SCONTROL_DET_NONE \ + || ORION5X_SATA_SCONTROL_IMP_NO_LP_ALLOWED) + int board_init(void) { + u32 reg; + /* arch number of board */ gd-bd-bi_arch_number = MACH_TYPE_EDMINI_V2; /* boot parameter start at 256th byte of RAM base */ gd-bd-bi_boot_params = gd-bd-bi_dram[0].start + 0x100; + /* reset port 1 of SATAHC controller */ + reg = readl(ORION5X_SATA_PORT1_SCONTROL_REG); + reg = (reg ~EDMINIV2_SCONTROL_MASK) | EDMINIV2_PORT_INIT; + writel(reg, ORION5X_SATA_PORT1_SCONTROL_REG); + reg = (reg ~EDMINIV2_SCONTROL_MASK) | EDMINIV2_PORT_USE; + writel(reg, ORION5X_SATA_PORT1_SCONTROL_REG); + return 0; } diff --git a/common/cmd_ide.c b/common/cmd_ide.c index 8bd8920..08ebbf6 100644 --- a/common/cmd_ide.c +++ b/common/cmd_ide.c @@ -45,6 +45,10 @@ #include mpc5xxx.h #endif +#ifdef CONFIG_ORION5X +#include asm/arch/orion5x.h +#endif + #include ide.h #include ata.h @@ -854,7 +858,8 @@ input_swap_data(int dev, ulong *sect_buf, int words) #endif /* __LITTLE_ENDIAN || CONFIG_AU1X00 */ -#if defined(__PPC__) || defined(CONFIG_PXA_PCMCIA) || defined(CONFIG_SH) +#if defined(__PPC__) || defined(CONFIG_PXA_PCMCIA) || defined(CONFIG_SH) \ + || defined(__ARM__) static void output_data(int dev, ulong *sect_buf, int words) { @@ -906,7
Re: [U-Boot] [PATCH v3] NAND: environment offset in OOB (CONFIG_ENV_OFFSET_OOB)
Dear Ben Gardiner, In message 1277933528-8335-1-git-send-email-bengardi...@nanometrics.ca you wrote: This is a re-submission of the patch by Harald Welte lafo...@openmoko.org with minor modifications for rebase and changes as suggested by Scott Wood scottw...@freescale.com [1] [2]. This patch enables the environment partition to have a run-time dynamic location (offset) in the NAND flash. The reason for this is simply that all NAND flashes have factory-default bad blocks, and a fixed compile time offset would mean that sometimes the environment partition would live inside factory bad blocks. Since the number of factory default blocks can be quite high (easily 1.3MBytes in current standard components), it is not economic to keep that many spare blocks inside the environment partition. With this patch and CONFIG_ENV_OFFSET_OOB enabled, the location of the environment partition is stored in the out-of-band (OOB) data of the first block in flash. Since the first block is where most systems boot from, the vendors guarantee that the first block is not a factory default block. Does this work with redundant environment in NAND? Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de One of the advantages of being a captain is being able to ask for ad- vice without necessarily having to take it. -- Kirk, Dagger of the Mind, stardate 2715.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] orion5x: edminiv2: add libata support
Le 30/06/2010 23:30, Albert Aribaud a écrit : This patch: - adds support in libata for the orion5x MVSATAHC controller; - enables orion5x MVSTAHC port 1 on the edmini board; - adds IDE and EXT2 commands to the edminiv2 command set. Note: commands ide, esxt2ls and ext2load have been successfully tested. Command diskboot was not tested but should work as it requires no specific support wrt other disk-related commands. Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Pull request: u-boot-usb
Dear Remy Bohmer, In message aanlktimycjiwrswqxb6jmhxauzjthydwvbce364xi...@mail.gmail.com you wrote: The following changes since commit 39ddd10b046fb791f47281ffb2100be01909ad72: Wolfgang Denk (1): Merge branch 'master' of ssh://gemini/home/wd/git/u-boot/master are available in the git repository at: git://git.denx.de/u-boot-usb.git master Ajay Kumar Gupta (4): musb: Use name based initialization for musb_config musb: Add Phy programming for using external Vbus omap3evm: Add board revision function musb: Program extvbus for OMAP3EVM Rev = E Becky Bruce (1): drivers/usb/host/ohci-hcd: rename readl/writel to ohci_readl/ohci_writel Sergey Matyukevich (1): USB OHCI support for at91sam9g45 SoC arch/arm/include/asm/arch-at91/at91_pmc.h | 14 ++- board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c | 13 ++ board/ti/evm/evm.c | 43 +++ board/ti/evm/evm.h | 14 ++ drivers/usb/host/ohci-at91.c| 14 ++ drivers/usb/host/ohci-hcd.c | 150 +++ drivers/usb/host/ohci.h | 15 ++- drivers/usb/musb/da8xx.c|6 +- drivers/usb/musb/davinci.c |6 +- drivers/usb/musb/musb_core.c|7 + drivers/usb/musb/musb_core.h| 30 +- drivers/usb/musb/omap3.c|9 +- drivers/usb/musb/omap3.h|4 + 13 files changed, 233 insertions(+), 92 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 Speculation is always more interesting than facts. - 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] orion5x: edminiv2: add libata support
Hi Wolfgang, Le 30/06/2010 23:39, Wolfgang Denk a écrit : Dear Albert Aribaud, In message1277933418-682-1-git-send-email-albert.arib...@free.fr you wrote: Signed-off-by: Albert Aribaudalbert.arib...@free.fr --- This patch: - adds support in libata for the orion5x MVSATAHC controller; - enables orion5x MVSTAHC port 1 on the edmini board; - adds IDE and EXT2 commands to the edminiv2 command set. What exactly do you mean by libata? Do we have something like this in U-Boot? My mistake: I meant ide. I'd started this work looking into the libata.c block driver but realized later that it wasn't what I needed, but the term stuck in my mind. I'll fix references to mention IDE instead. +/* ED Mini V2 uses SATA PORT1. Initialize this port and disable + * disable low power on it + */ + /* mask for isolating IPM and DET fields in SControl register */ Incorrect multiline comment style. Will this be ok? /* * ED Mini V2 [...] * disable [...] */ /* mask for [...] */ -#if defined(__PPC__) || defined(CONFIG_PXA_PCMCIA) || defined(CONFIG_SH) +#if defined(__PPC__) || defined(CONFIG_PXA_PCMCIA) || defined(CONFIG_SH) \ +|| defined(__ARM__) Please do not add to this mess of tests, but introduce a single feature-specific #define instead. Will do. Would CONFIG_IDE_USE_INSW_OUTSW do? Basically, that's what the test is for: either use outsw()/insw() or use outw()/inw() within a loop. Note that this change does not relate per se to my patch and requires addition of this #define to a lot of config header files. Wouldn't it be better if I submitted it as an independent atomic patch? +/* Debugging features */ + +/* #define the following if u-boot will boot from RAM */ +/* #undef it if u-boot will boot from FLASH */ +#undef CONFIG_SKIP_LOWLEVEL_INIT/* disable board lowlevel_init */ + This seems to be an unrelated change (like someother, smaller ones). Please make sure to split your patches into independent parts. I'll put them in two separate patches, one for fixing typos and one for adding the CONFIG_SKIP_LOWLEVEL_INIT comments and line. Best regards, Wolfgang Denk Thanks for the feedback. Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Drop support for GTH board
Dear Wolfgang, On 2010-06-29 22:06, Wolfgang Denk wrote: The board maintainer states: The GTH board is obsolete and has not been manufactured for several years. To my knowledge, no recent U-Boot build has been tested on that card. So drop support for this board. Signed-off-by: Wolfgang Denkw...@denx.de Cc: Thomas Langetho...@corelatus.se --- MAINTAINERS |4 - MAKEALL |1 - board/gth/Makefile| 44 board/gth/README | 18 -- board/gth/config.mk | 40 --- board/gth/ee_access.c | 335 - board/gth/ee_access.h | 16 -- board/gth/ee_dev.h| 85 --- board/gth/flash.c | 649 - board/gth/gth.c | 595 - board/gth/pcmcia.c| 93 --- board/gth/u-boot.lds | 127 -- boards.cfg|1 - 13 files changed, 0 insertions(+), 2008 deletions(-) delete mode 100644 board/gth/Makefile delete mode 100644 board/gth/README delete mode 100644 board/gth/config.mk delete mode 100644 board/gth/ee_access.c delete mode 100644 board/gth/ee_access.h delete mode 100644 board/gth/ee_dev.h delete mode 100644 board/gth/flash.c delete mode 100644 board/gth/gth.c delete mode 100644 board/gth/pcmcia.c delete mode 100644 board/gth/u-boot.lds ... This patch does not remove all references to the GTH board. file include/configs/GTH.h remains. CONFIG_GTH define is used in cpu/mpc8xx/cpu_init.c include/commproc.h common/env_common.c Regards, /Thomas ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] cmd_ide: Convert to [read,write][b,w]
Dne Čt 24. června 2010 02:36:00 Marek Vasut napsal(a): Dne St 23. června 2010 22:51:28 Wolfgang Denk napsal(a): Dear Marek Vasut, In message 1277320683-2057-1-git-send-email-marek.va...@gmail.com you wrote: Signed-off-by: Marek Vasut marek.va...@gmail.com --- common/cmd_ide.c | 22 +- 1 files changed, 13 insertions(+), 9 deletions(-) I don't see the big advantage of this patch yet. It won't compile at least on ARM. Same case as with the dm9000 ethernet adapter. #ifndef CONFIG_SYS_ATA_PORT_ADDR @@ -526,7 +526,7 @@ __ide_outb(int dev, int port, unsigned char val) { debug (ide_outb (dev= %d, port= 0x%x, val= 0x%02x) : @ 0x%08lx\n, dev, port, val, (ATA_CURR_BASE(dev)+CONFIG_SYS_ATA_PORT_ADDR(port))); - outb(val, (ATA_CURR_BASE(dev)+CONFIG_SYS_ATA_PORT_ADDR(port))); + writeb(val, (ATA_CURR_BASE(dev)+CONFIG_SYS_ATA_PORT_ADDR(port))); So we replace outb() = writeb(), but the function where this is used is still __ide_outb() ? The __ide_outb() = outb() mapping looks more logical to me. See above. -output_data(int dev, ulong *sect_buf, int words) +output_data(int dev, uint16_t *sect_buf, int words) { - outsw(ATA_CURR_BASE(dev)+ATA_DATA_REG, sect_buf, words1); + int i; + for (i = 0; i (words 1); i++) + writew(sect_buf[i], ATA_CURR_BASE(dev)+ATA_DATA_REG); And here the code size is growing, too. Possibly, I was unsure if there is some implementation of writesw/readsw elsewhere then on PPC. What are the exact advantages of your version? That it actually compiles and works on other architectures than ppc. Best regards, Wolfgang Denk Cheers Any updates ? ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] orion5x: edminiv2: add libata support
This patch is superseded by a new patch set. Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/4] orion5x: edminiv2: add CMD_IDE support
Signed-off-by: Albert Aribaud albert.arib...@free.fr --- arch/arm/include/asm/arch-orion5x/orion5x.h | 20 ++ board/LaCie/edminiv2/config.mk |6 - board/LaCie/edminiv2/edminiv2.c | 26 include/configs/edminiv2.h | 29 +- 4 files changed, 78 insertions(+), 3 deletions(-) diff --git a/arch/arm/include/asm/arch-orion5x/orion5x.h b/arch/arm/include/asm/arch-orion5x/orion5x.h index 4008c84..11de968 100644 --- a/arch/arm/include/asm/arch-orion5x/orion5x.h +++ b/arch/arm/include/asm/arch-orion5x/orion5x.h @@ -55,6 +55,26 @@ #define ORION5X_USB20_PORT0_BASE (ORION5X_REGISTER(0x5)) #define ORION5X_USB20_PORT1_BASE (ORION5X_REGISTER(0xA)) #define ORION5X_EGIGA_BASE (ORION5X_REGISTER(0x72000)) +#define ORION5X_SATA_BASE (ORION5X_REGISTER(0x8)) +#define ORION5X_SATA_PORT0_OFFSET 0x2000 +#define ORION5X_SATA_PORT1_OFFSET 0x4000 + +/* + * SATA definitions needed for controller initialization + */ +/* SControl register address */ +#define ORION5X_SATA_PORT1_SCONTROL_REG \ + (ORION5X_SATA_BASE+ORION5X_SATA_PORT1_OFFSET+0x308) +/* Mask and values for device DETection and link initialization */ +#define ORION5X_SATA_SCONTROL_DET_MASK 0x000F +#define ORION5X_SATA_SCONTROL_DET_NONE 0x +#define ORION5X_SATA_SCONTROL_DET_INIT 0x0001 +/* Mask and values for device Interface Power Management */ +#define ORION5X_SATA_SCONTROL_IMP_MASK 0x0F00 +#define ORION5X_SATA_SCONTROL_IMP_NO_LP_ALLOWED0x0300 + +/* Orion5x will need byte-swapping if using ATA registers */ +#define CONFIG_IDE_SWAP_IO #define CONFIG_MAX_RAM_BANK_SIZE (64*1024*1024) diff --git a/board/LaCie/edminiv2/config.mk b/board/LaCie/edminiv2/config.mk index 3dec1aa..1606cca 100644 --- a/board/LaCie/edminiv2/config.mk +++ b/board/LaCie/edminiv2/config.mk @@ -24,4 +24,8 @@ # MA 02110-1301 USA # -TEXT_BASE = 0x0010 +# As the Linux kernel will load from 8000 up and we cannot tell +# how big it can be, let U-Boot run in the topmost megabyte of the +# ED Mini V2 64 megabyte DRAM. + +TEXT_BASE = 0x03F0 diff --git a/board/LaCie/edminiv2/edminiv2.c b/board/LaCie/edminiv2/edminiv2.c index 54c0ffe..84375c2 100644 --- a/board/LaCie/edminiv2/edminiv2.c +++ b/board/LaCie/edminiv2/edminiv2.c @@ -80,13 +80,39 @@ ulong board_flash_get_legacy(ulong base, int banknum, flash_info_t *info) } #endif /* CONFIG_SYS_FLASH_CFI */ +/* + * ED Mini V2 uses SATA PORT1. Initialize this port and + * disable low power on it. + */ + +/* mask for isolating IPM and DET fields in SControl register */ +#define EDMINIV2_SCONTROL_MASK (ORION5X_SATA_SCONTROL_DET_MASK \ + || ORION5X_SATA_SCONTROL_IMP_MASK) + +/* IPM and DET values for initializing link */ +#define EDMINIV2_PORT_INIT (ORION5X_SATA_SCONTROL_DET_INIT \ + || ORION5X_SATA_SCONTROL_IMP_NO_LP_ALLOWED) + +/* IPM and DET values to use link once initialized */ +#define EDMINIV2_PORT_USE (ORION5X_SATA_SCONTROL_DET_NONE \ + || ORION5X_SATA_SCONTROL_IMP_NO_LP_ALLOWED) + int board_init(void) { + u32 reg; + /* arch number of board */ gd-bd-bi_arch_number = MACH_TYPE_EDMINI_V2; /* boot parameter start at 256th byte of RAM base */ gd-bd-bi_boot_params = gd-bd-bi_dram[0].start + 0x100; + /* reset port 1 of SATAHC controller */ + reg = readl(ORION5X_SATA_PORT1_SCONTROL_REG); + reg = (reg ~EDMINIV2_SCONTROL_MASK) | EDMINIV2_PORT_INIT; + writel(reg, ORION5X_SATA_PORT1_SCONTROL_REG); + reg = (reg ~EDMINIV2_SCONTROL_MASK) | EDMINIV2_PORT_USE; + writel(reg, ORION5X_SATA_PORT1_SCONTROL_REG); + return 0; } diff --git a/include/configs/edminiv2.h b/include/configs/edminiv2.h index c3d95a0..5c328c8 100644 --- a/include/configs/edminiv2.h +++ b/include/configs/edminiv2.h @@ -52,6 +52,12 @@ #define CONFIG_SYS_HZ 1000 /* + * __io is necessary for cmd_ide to compile + */ + +#define __io + +/* * Board-specific values for Orion5x MPP low level init: * - MPPs 12 to 15 are SATA LEDs (mode 5) * - Others are GPIO/unused (mode 3 for MPP0, mode 5 for @@ -60,7 +66,7 @@ #define ORION5X_MPP0_7 0x0003 #define ORION5X_MPP8_150x -#define ORION5X_MPP16_23 0x +#define ORION5X_MPP16_23 0x /* * Board-specific values for Orion5x GPIO low level init: @@ -74,7 +80,6 @@ */ #define ORION5X_GPIO_OUT_ENABLE0x03fc -#define ORION5X_GPIO_OUT_VALUE 0x03fc /* * NS16550 Configuration @@ -131,6 +136,7 @@ * Commands configuration - using default command set for now */ #include config_cmd_default.h + /* * Disabling some default commands for staggered bring-up */ @@ -139,6 +145,25 @@ #undef CONFIG_CMD_NFS /* no NFS
[U-Boot] [PATCH 3/4] orion5x: fix typo in comment
Signed-off-by: Albert Aribaud albert.arib...@free.fr --- arch/arm/include/asm/arch-orion5x/orion5x.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/arm/include/asm/arch-orion5x/orion5x.h b/arch/arm/include/asm/arch-orion5x/orion5x.h index 11de968..2009ac5 100644 --- a/arch/arm/include/asm/arch-orion5x/orion5x.h +++ b/arch/arm/include/asm/arch-orion5x/orion5x.h @@ -38,7 +38,7 @@ #if defined(CONFIG_FEROCEON) #include asm/arch/cpu.h -/* SOC specific definations */ +/* SOC specific definitions */ #define ORION5X_REGISTER(x)(ORION5X_REGS_PHY_BASE + x) /* Documented registers */ -- 1.6.4.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 4/4] edminiv2: inttroduce CONFIG_SKIP_LOWLEVEL_INIT
Signed-off-by: Albert Aribaud albert.arib...@free.fr --- include/configs/edminiv2.h |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/include/configs/edminiv2.h b/include/configs/edminiv2.h index 5c328c8..923cca9 100644 --- a/include/configs/edminiv2.h +++ b/include/configs/edminiv2.h @@ -194,4 +194,10 @@ #define CONFIG_SYS_RESET_ADDRESS 0x #define CONFIG_SYS_MAXARGS 16 +/* Debugging features */ + +/* #define the following if u-boot will boot from RAM */ +/* #undef it if u-boot will boot from FLASH */ +#undef CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */ + #endif /* _CONFIG_EDMINIV2_H */ -- 1.6.4.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] cmd_ide: Convert to [read,write][b,w]
Le 01/07/2010 02:09, Marek Vasut a écrit : common/cmd_ide.c | 22 +- 1 files changed, 13 insertions(+), 9 deletions(-) I don't see the big advantage of this patch yet. It won't compile at least on ARM. Same case as with the dm9000 ethernet adapter. What are the exact advantages of your version? That it actually compiles and works on other architectures than ppc. Any updates ? Actually I've compiled cmd_ide.c for ARM -- I just sent a patchset for this. Required me to #define __io in my board's config, and also to #define CONFIG_IDE_SWAP_IO, a new configuration option which replaces the complex conditionals on __PPC__ et al. Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V6 01/10] powerpc: Update configs to properly set FSL_ELBC
On Jun 17, 2010, at 11:37 AM, Becky Bruce wrote: Some parts that have an Enhanced Local Bus Controller weren't setting CONFIG_FSL_ELBC. Fix this so we can use this define properly going forward (currently it's only used if PHYS_64BIT is set, which meant not all platforms needed to have it set correctly). Signed-off-by: Becky Bruce bec...@kernel.crashing.org Acked-by: Kim Phillips kim.phill...@freescale.com --- include/configs/MPC8313ERDB.h |1 + include/configs/MPC8315ERDB.h |1 + include/configs/MPC837XEMDS.h |1 + include/configs/MPC837XERDB.h |1 + include/configs/SIMPC8313.h |1 + include/configs/XPEDITE5370.h |1 + 6 files changed, 6 insertions(+), 0 deletions(-) applied to 85xx - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V6 06/10] drivers/misc/fsl_law.c: Rearrange code to avoid duplication
On Jun 17, 2010, at 11:37 AM, Becky Bruce wrote: The current code redefines functions based on FSL_CORENET_ vs not - create macros/inlines instead that hide the differences. Signed-off-by: Becky Bruce bec...@kernel.crashing.org --- arch/powerpc/include/asm/fsl_law.h |1 + drivers/misc/fsl_law.c | 125 ++-- 2 files changed, 49 insertions(+), 77 deletions(-) applied to 85xx - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V6 08/10] mpc85xx: Add reginfo command
On Jun 17, 2010, at 11:37 AM, Becky Bruce wrote: The new command dumps the TLBCAM, the LAWs, and the BR/OR regs. Add CONFIG_CMD_REGINFO to the config for all MPC85xx parts. Signed-off-by: Becky Bruce bec...@kernel.crashing.org --- arch/powerpc/cpu/mpc85xx/cpu.c | 13 + common/cmd_reginfo.c |5 + include/configs/MPC8536DS.h|1 + include/configs/MPC8540EVAL.h |1 + include/configs/MPC8541CDS.h |1 + include/configs/MPC8544DS.h|1 + include/configs/MPC8548CDS.h |1 + include/configs/MPC8555CDS.h |1 + include/configs/MPC8560ADS.h |1 + include/configs/MPC8568MDS.h |1 + include/configs/MPC8569MDS.h |1 + include/configs/MPC8572DS.h|1 + include/configs/P1_P2_RDB.h|1 + include/configs/P2020DS.h |1 + include/configs/PM854.h|1 + include/configs/PM856.h|1 + include/configs/SBC8540.h |1 + include/configs/TQM85xx.h |1 + include/configs/XPEDITE5200.h |1 + include/configs/XPEDITE5370.h |1 + include/configs/sbc8548.h |1 + include/configs/sbc8560.h |1 + include/configs/socrates.h |1 + include/configs/stxgp3.h |1 + include/configs/stxssa.h |1 + 25 files changed, 41 insertions(+), 0 deletions(-) applied to 85xx - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V6 09/10] powerpc 83xx/85xx: Merge lbc upmconfig code
On Jun 17, 2010, at 11:37 AM, Becky Bruce wrote: Each platform had its own version of the upmconfig, despite the init process being identical. Now that we have a spot for common lbc code, create a common upmconfig() there. Signed-off-by: Becky Bruce bec...@kernel.crashing.org Acked-by: Kim Phillips kim.phill...@freescale.com --- arch/powerpc/cpu/mpc83xx/cpu.c | 66 arch/powerpc/cpu/mpc85xx/cpu.c | 61 - arch/powerpc/cpu/mpc8xxx/fsl_lbc.c | 50 +++ arch/powerpc/include/asm/fsl_lbc.h |3 ++ 4 files changed, 53 insertions(+), 127 deletions(-) diff --git a/arch/powerp applied to 85xx - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V6 03/10] 83xx/85xx/86xx: LBC register cleanup
On Jun 17, 2010, at 11:37 AM, Becky Bruce wrote: Currently, 83xx, 86xx, and 85xx have a lot of duplicated code dedicated to defining and manipulating the LBC registers. Merge this into a single spot. To do this, we have to decide on a common name for the data structure that holds the lbc registers - it will now be known as fsl_lbc_t, and we adopt a common name for the immap layouts that include the lbc - this was previously known as either im_lbc or lbus; use the former. In addition, create accessors for the BR/OR regs that use in/out_be32 and use those instead of the mismash of access methods currently in play. I have done a successful ppc build all and tested a board or two from each processor family. Signed-off-by: Becky Bruce bec...@kernel.crashing.org Acked-by: Kim Phillips kim.phill...@freescale.com --- Makefile |1 + arch/powerpc/cpu/mpc83xx/cpu.c | 12 ++-- arch/powerpc/cpu/mpc83xx/cpu_init.c| 53 ++-- arch/powerpc/cpu/mpc83xx/nand_init.c |4 +- arch/powerpc/cpu/mpc83xx/speed.c |2 +- arch/powerpc/cpu/mpc85xx/cpu.c | 12 +-- arch/powerpc/cpu/mpc85xx/cpu_init.c| 58 + arch/powerpc/cpu/mpc85xx/cpu_init_nand.c |6 +- arch/powerpc/cpu/mpc85xx/speed.c |5 +- arch/powerpc/cpu/mpc86xx/cpu.c | 15 +--- arch/powerpc/cpu/mpc86xx/cpu_init.c| 55 + arch/powerpc/cpu/mpc86xx/speed.c |5 +- arch/powerpc/cpu/mpc8xxx/Makefile |3 + arch/powerpc/cpu/mpc8xxx/fsl_lbc.c | 84 ++ arch/powerpc/include/asm/config.h |6 ++ arch/powerpc/include/asm/fsl_lbc.h | 109 ++-- arch/powerpc/include/asm/immap_83xx.h | 13 ++-- arch/powerpc/include/asm/immap_85xx.h | 46 +-- arch/powerpc/include/asm/immap_86xx.h | 49 +-- board/atum8548/atum8548.c |2 +- board/esd/vme8349/vme8349.c|2 +- board/freescale/mpc8313erdb/sdram.c|2 +- board/freescale/mpc8349emds/mpc8349emds.c |2 +- board/freescale/mpc8349itx/mpc8349itx.c|7 +- board/freescale/mpc8360emds/mpc8360emds.c |6 +- board/freescale/mpc8360erdk/nand.c |6 +- board/freescale/mpc8540ads/mpc8540ads.c|8 +- board/freescale/mpc8541cds/mpc8541cds.c| 13 +-- board/freescale/mpc8544ds/mpc8544ds.c |2 +- board/freescale/mpc8548cds/mpc8548cds.c| 13 +-- board/freescale/mpc8555cds/mpc8555cds.c| 12 +-- board/freescale/mpc8560ads/mpc8560ads.c|8 +- board/freescale/mpc8568mds/mpc8568mds.c| 11 +-- board/freescale/mpc8569mds/mpc8569mds.c|2 +- board/mpc8540eval/mpc8540eval.c|6 +- board/pm854/pm854.c|2 +- board/pm856/pm856.c|2 +- board/sbc8349/sbc8349.c|2 +- board/sbc8548/sbc8548.c| 20 ++--- board/sbc8560/sbc8560.c|6 +- board/sheldon/simpc8313/sdram.c|2 +- board/sheldon/simpc8313/simpc8313.c|2 +- board/socrates/socrates.c | 31 +++ board/tqc/tqm834x/tqm834x.c|8 +- board/tqc/tqm85xx/nand.c | 12 ++-- board/tqc/tqm85xx/tqm85xx.c| 35 board/xes/xpedite5170/xpedite5170.c| 10 +-- board/xes/xpedite5200/xpedite5200.c| 11 +-- board/xes/xpedite5370/xpedite5370.c|9 +- drivers/mtd/nand/fsl_elbc_nand.c | 18 ++--- include/mpc85xx.h |2 - nand_spl/board/freescale/mpc8536ds/nand_boot.c |5 +- nand_spl/nand_boot_fsl_elbc.c |4 +- 53 files changed, 321 insertions(+), 500 deletions(-) create mode 100644 arch/powerpc/cpu/mpc8xxx/fsl_lbc.c applied to 85xx - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V6 04/10] mpc85xx: tlb.c cleanups
On Jun 17, 2010, at 11:37 AM, Becky Bruce wrote: Extract the operation to read a tlb into a function - we will need this later to print out the tlbs, and there's no point in duplicating the code. Create a TSIZE_TO_BYTES macro to deal with the conversion from the MAS field to an actual size instead of duplicating this in code. There are a few misc other minor cleanups. Signed-off-by: Becky Bruce bec...@kernel.crashing.org --- arch/powerpc/cpu/mpc85xx/tlb.c | 50 +++ arch/powerpc/include/asm/mmu.h |1 + 2 files changed, 25 insertions(+), 26 deletions(-) applied to 85xx - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 0/3] spi flash updates for v2010.09
These have been posted in the past and shouldn't be any pending issues. Mike Frysinger (1): sf: move useful messages from debug to printf Thomas Chou (1): spi_flash: support old STMicro parts with RES Wolfgang Wegner (1): add redundant environment for env_sf.c common/env_sf.c | 232 +++ drivers/mtd/spi/atmel.c |7 +- drivers/mtd/spi/macronix.c |5 +- drivers/mtd/spi/spansion.c |5 +- drivers/mtd/spi/spi_flash.c |5 +- drivers/mtd/spi/sst.c |5 +- drivers/mtd/spi/stmicro.c | 26 +- drivers/mtd/spi/winbond.c |7 +- 8 files changed, 276 insertions(+), 16 deletions(-) ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/3] add redundant environment for env_sf.c
From: Wolfgang Wegner w.weg...@astro-kom.de This patch adds redundant environment for environment in SPI flash. I took env_flash.c as an example and slightly modified it. Apart from adapting things to SF, I also slightly changed the decision logic to use area 2 as a default in case the flags are wrong because not having a default path worried me. I did not add a section for CONFIG_ENV_IS_IN_SPI_FLASH in environment.h because I did not understand if this is desired and/or needed. So to use the feature, one has to set CONFIG_ENV_OFFSET_REDUND _and_ CONFIG_SYS_REDUNDAND_ENVIRONMENT. I checked it by powering off my board several times during flash erase or write, because I do not know if there are other stress test scenarios. Signed-off-by: Wolfgang Wegner w.weg...@astro-kom.de Acked-by: Mike Frysinger vap...@gentoo.org --- common/env_sf.c | 232 +++ 1 files changed, 232 insertions(+), 0 deletions(-) diff --git a/common/env_sf.c b/common/env_sf.c index 6575b6d..4391d61 100644 --- a/common/env_sf.c +++ b/common/env_sf.c @@ -43,6 +43,14 @@ # define CONFIG_ENV_SPI_MODE SPI_MODE_3 #endif +#ifdef CONFIG_ENV_OFFSET_REDUND +static ulong env_offset = CONFIG_ENV_OFFSET; +static ulong env_new_offset = CONFIG_ENV_OFFSET_REDUND; + +#define ACTIVE_FLAG 1 +#define OBSOLETE_FLAG 0 +#endif /* CONFIG_ENV_ADDR_REDUND */ + DECLARE_GLOBAL_DATA_PTR; /* references to names in env_common.c */ @@ -58,6 +66,229 @@ uchar env_get_char_spec(int index) return *((uchar *)(gd-env_addr + index)); } +#if defined(CONFIG_ENV_OFFSET_REDUND) +void swap_env(void) +{ + ulong tmp_offset = env_offset; + + env_offset = env_new_offset; + env_new_offset = tmp_offset; +} + +int saveenv(void) +{ + u32 saved_size, saved_offset; + char *saved_buffer = NULL; + u32 sector = 1; + int ret; + char flag = OBSOLETE_FLAG, new_flag = ACTIVE_FLAG; + + if (!env_flash) { + puts(Environment SPI flash not initialized\n); + return 1; + } + + /* Is the sector larger than the env (i.e. embedded) */ + if (CONFIG_ENV_SECT_SIZE CONFIG_ENV_SIZE) { + saved_size = CONFIG_ENV_SECT_SIZE - CONFIG_ENV_SIZE; + saved_offset = env_new_offset + CONFIG_ENV_SIZE; + saved_buffer = malloc(saved_size); + if (!saved_buffer) { + ret = 1; + goto done; + } + ret = spi_flash_read(env_flash, saved_offset, + saved_size, saved_buffer); + if (ret) + goto done; + } + + if (CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE) { + sector = CONFIG_ENV_SIZE / CONFIG_ENV_SECT_SIZE; + if (CONFIG_ENV_SIZE % CONFIG_ENV_SECT_SIZE) + sector++; + } + + puts(Erasing SPI flash...); + ret = spi_flash_erase(env_flash, env_new_offset, + sector * CONFIG_ENV_SECT_SIZE); + if (ret) + goto done; + + puts(Writing to SPI flash...); + ret = spi_flash_write(env_flash, + env_new_offset + offsetof(env_t, data), + sizeof(env_ptr-data), env_ptr-data); + if (ret) + goto done; + + ret = spi_flash_write(env_flash, + env_new_offset + offsetof(env_t, crc), + sizeof(env_ptr-crc), env_ptr-crc); + if (ret) + goto done; + + ret = spi_flash_write(env_flash, + env_offset + offsetof(env_t, flags), + sizeof(env_ptr-flags), flag); + if (ret) + goto done; + + ret = spi_flash_write(env_flash, + env_new_offset + offsetof(env_t, flags), + sizeof(env_ptr-flags), new_flag); + if (ret) + goto done; + + if (CONFIG_ENV_SECT_SIZE CONFIG_ENV_SIZE) { + ret = spi_flash_write(env_flash, saved_offset, + saved_size, saved_buffer); + if (ret) + goto done; + } + + swap_env(); + + ret = 0; + puts(done\n); + + done: + if (saved_buffer) + free(saved_buffer); + return ret; +} + +void env_relocate_spec(void) +{ + int ret; + int crc1_ok = 0, crc2_ok = 0; + env_t *tmp_env1 = NULL; + env_t *tmp_env2 = NULL; + uchar flag1, flag2; + /* current_env is set only in case both areas are valid! */ + int current_env = 0; + + tmp_env1 = (env_t *)malloc(CONFIG_ENV_SIZE); + if (!tmp_env1) { + puts(*** Warning: could not init environment, +using defaults\n\n); + goto out; + } + + tmp_env2 = (env_t *)malloc(CONFIG_ENV_SIZE); + if (!tmp_env2) { + puts(*** Warning: could not init environment, +
[U-Boot] [PATCH 3/3] sf: move useful messages from debug to printf
At the moment, the default SPI flash subsystem is quite terse. Errors and successes both result in a generic message. So move the useful errors and useful successes to printf output by default. While we're here, also convert the messages to use print_size(). Signed-off-by: Mike Frysinger vap...@gentoo.org --- drivers/mtd/spi/atmel.c |7 --- drivers/mtd/spi/macronix.c |5 +++-- drivers/mtd/spi/spansion.c |5 +++-- drivers/mtd/spi/spi_flash.c |4 ++-- drivers/mtd/spi/sst.c |5 +++-- drivers/mtd/spi/stmicro.c |5 +++-- drivers/mtd/spi/winbond.c |7 --- 7 files changed, 22 insertions(+), 16 deletions(-) diff --git a/drivers/mtd/spi/atmel.c b/drivers/mtd/spi/atmel.c index 8306c00..8d02169 100644 --- a/drivers/mtd/spi/atmel.c +++ b/drivers/mtd/spi/atmel.c @@ -467,7 +467,7 @@ out: struct spi_flash *spi_flash_probe_atmel(struct spi_slave *spi, u8 *idcode) { const struct atmel_spi_flash_params *params; - unsigned long page_size; + unsigned page_size; unsigned int family; struct atmel_spi_flash *asf; unsigned int i; @@ -540,8 +540,9 @@ struct spi_flash *spi_flash_probe_atmel(struct spi_slave *spi, u8 *idcode) * params-blocks_per_sector * params-nr_sectors; - debug(SF: Detected %s with page size %lu, total %u bytes\n, - params-name, page_size, asf-flash.size); + printf(SF: Detected %s with page size %u, total , + params-name, page_size); + print_size(asf-flash.size, \n); return asf-flash; diff --git a/drivers/mtd/spi/macronix.c b/drivers/mtd/spi/macronix.c index fe1310b..76d5284 100644 --- a/drivers/mtd/spi/macronix.c +++ b/drivers/mtd/spi/macronix.c @@ -330,8 +330,9 @@ struct spi_flash *spi_flash_probe_macronix(struct spi_slave *spi, u8 *idcode) mcx-flash.size = params-page_size * params-pages_per_sector * params-sectors_per_block * params-nr_blocks; - printf(SF: Detected %s with page size %u, total %u bytes\n, - params-name, params-page_size, mcx-flash.size); + printf(SF: Detected %s with page size %u, total , + params-name, params-page_size); + print_size(mcx-flash.size, \n); return mcx-flash; } diff --git a/drivers/mtd/spi/spansion.c b/drivers/mtd/spi/spansion.c index fdb7917..d6c1a5f 100644 --- a/drivers/mtd/spi/spansion.c +++ b/drivers/mtd/spi/spansion.c @@ -343,8 +343,9 @@ struct spi_flash *spi_flash_probe_spansion(struct spi_slave *spi, u8 *idcode) spsn-flash.size = params-page_size * params-pages_per_sector * params-nr_sectors; - debug(SF: Detected %s with page size %u, total %u bytes\n, - params-name, params-page_size, spsn-flash.size); + printf(SF: Detected %s with page size %u, total , + params-name, params-page_size); + print_size(spsn-flash.size, \n); return spsn-flash; } diff --git a/drivers/mtd/spi/spi_flash.c b/drivers/mtd/spi/spi_flash.c index dd0dbbf..ea875dc 100644 --- a/drivers/mtd/spi/spi_flash.c +++ b/drivers/mtd/spi/spi_flash.c @@ -106,7 +106,7 @@ struct spi_flash *spi_flash_probe(unsigned int bus, unsigned int cs, spi = spi_setup_slave(bus, cs, max_hz, spi_mode); if (!spi) { - debug(SF: Failed to set up slave\n); + printf(SF: Failed to set up slave\n); return NULL; } @@ -157,7 +157,7 @@ struct spi_flash *spi_flash_probe(unsigned int bus, unsigned int cs, break; #endif default: - debug(SF: Unsupported manufacturer %02X\n, idcode[0]); + printf(SF: Unsupported manufacturer %02X\n, idcode[0]); flash = NULL; break; } diff --git a/drivers/mtd/spi/sst.c b/drivers/mtd/spi/sst.c index 50e9299..2557891 100644 --- a/drivers/mtd/spi/sst.c +++ b/drivers/mtd/spi/sst.c @@ -364,8 +364,9 @@ spi_flash_probe_sst(struct spi_slave *spi, u8 *idcode) stm-flash.read = sst_read_fast; stm-flash.size = SST_SECTOR_SIZE * params-nr_sectors; - debug(SF: Detected %s with page size %u, total %u bytes\n, - params-name, SST_SECTOR_SIZE, stm-flash.size); + printf(SF: Detected %s with page size %u, total , + params-name, SST_SECTOR_SIZE); + print_size(stm-flash.size, \n); /* Flash powers up read-only, so clear BP# bits */ sst_unlock(stm-flash); diff --git a/drivers/mtd/spi/stmicro.c b/drivers/mtd/spi/stmicro.c index 21e9b00..3134027 100644 --- a/drivers/mtd/spi/stmicro.c +++ b/drivers/mtd/spi/stmicro.c @@ -365,8 +365,9 @@ struct spi_flash *spi_flash_probe_stmicro(struct spi_slave *spi, u8 * idcode) stm-flash.size = params-page_size * params-pages_per_sector * params-nr_sectors; - debug(SF: Detected %s with page size %u, total %u bytes\n, - params-name,
[U-Boot] Pull request u-boot-blackfin.git (sf branch)
The following changes since commit 39ddd10b046fb791f47281ffb2100be01909ad72: Merge branch 'master' of ssh://gemini/home/wd/git/u-boot/master (2010-06-30 10:10:32 +0200) are available in the git repository at: git://www.denx.de/git/u-boot-blackfin.git sf Mike Frysinger (1): sf: move useful messages from debug to printf Thomas Chou (1): spi_flash: support old STMicro parts with RES Wolfgang Wegner (1): add redundant environment for env_sf.c common/env_sf.c | 232 +++ drivers/mtd/spi/atmel.c |7 +- drivers/mtd/spi/macronix.c |5 +- drivers/mtd/spi/spansion.c |5 +- drivers/mtd/spi/spi_flash.c |5 +- drivers/mtd/spi/sst.c |5 +- drivers/mtd/spi/stmicro.c | 26 +- drivers/mtd/spi/winbond.c |7 +- 8 files changed, 276 insertions(+), 16 deletions(-) ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3] NAND: environment offset in OOB (CONFIG_ENV_OFFSET_OOB)
On Wed, Jun 30, 2010 at 5:41 PM, Wolfgang Denk w...@denx.de wrote: Dear Ben Gardiner, In message 1277933528-8335-1-git-send-email-bengardi...@nanometrics.ca you wrote: This is a re-submission of the patch by Harald Welte lafo...@openmoko.org with minor modifications for rebase and changes as suggested by Scott Wood scottw...@freescale.com [1] [2]. This patch enables the environment partition to have a run-time dynamic location (offset) in the NAND flash. The reason for this is simply that all NAND flashes have factory-default bad blocks, and a fixed compile time offset would mean that sometimes the environment partition would live inside factory bad blocks. Since the number of factory default blocks can be quite high (easily 1.3MBytes in current standard components), it is not economic to keep that many spare blocks inside the environment partition. With this patch and CONFIG_ENV_OFFSET_OOB enabled, the location of the environment partition is stored in the out-of-band (OOB) data of the first block in flash. Since the first block is where most systems boot from, the vendors guarantee that the first block is not a factory default block. Does this work with redundant environment in NAND? Currently the use of CONFIG_ENV_OFFSET_OOB and CONFIG_ENV_OFFSET_REDUND is disabled. I think it could work when the env is in its own NAND partition (i.e. !ENV_IS_EMBEDDED and !CONFIG_NAND_ENV_DST). We could require that the redundant env is CONFIG_ENV_SIZE after the offset specified in the OOB or that two offsets are store in the OOB area. The latter requires that the OOB size is large enough to store two offsets. The former requires that CONFIG_ENV_SIZE is a multiple of the erase block size and perhaps additional skip-if-bad-block behaviour. Furthermore, to implement env.oob compatibility with redundant environments I believe that the use of the CONFIG_ENV_OFFSET_REDUND macro needs to be split into a 'use redundant env' macro and a 'value of redundant env offset' macro so that we don't have to redefine CONFIG_ENV_OFFSET_REDUND. For instance, I would change saveenv in env_nand.c to look something like: --- #ifdef CONFIG_USE_ENV_REDUND int saveenv(void) { ... ret = writeenv(CONFIG_ENV_OFFSET_REDUND, (u_char *) env_ptr); --- I see that compatibility of this feature with redundant environments would definitely increase its utility. Can I put that into a second patch series and leave this patch as-is to be considered for inclusion? Would you prefer that I re-spin this patch into a series that includes support for redundant environment? Best Regards, Ben Gardiner -- Nanometrics Inc. +1 (613) 592-6776 x239 http://www.nanometrics.ca ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3] NAND: environment offset in OOB (CONFIG_ENV_OFFSET_OOB)
On Wed, Jun 30, 2010 at 11:37 PM, Vipin KUMAR vipin.ku...@st.com wrote: Hello Ben, This is a nice idea. I see that the logic needs 8bytes at offset 0 in block 0 oob area. This means that it would also overwrite the offset 5 (which is the bad block marker in case of small page devices) and offset 0 (bad block marker in large page devs) Am I missing something here I can't take credit for the idea -- it is Harald's. The original patch from Harald Welte wrote the env offset to bytes 8..15 explicitly. The location in the OOB to which the env offset is written was made implicit when I ported to write_oob using struct mtd_oob_ops with mode MTD_OOB_AUTO as suggested by Scott Wood in the review of Harald's patch [1]. With MTD_OOB_AUTO the reads+writes should be performed automatically in the 'free' region of the OOB (specified by the .oobfree member of nand_ecclayout). At least that's what is supposed to be happening... I welcome any further concerns that you may have. Best Regards, Ben Gardiner [1] http://article.gmane.org/gmane.comp.boot-loaders.u-boot/43916 -- Nanometrics Inc. +1 (613) 592-6776 x239 http://www.nanometrics.ca ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot