arm926ej-s: Invalidate instruction cache in flush_cache
Subsystems (5)
PATCH 1/8 arm926ej-s: Invalidate instruction cache in flush_cache
If U-Boot is loaded from RAM and the OS is loaded into an overlapping region, the instruction cache is not coherent when that OS is started. We must therefore invalidate the instruction cache in addition to cleaning the data cache.
--- arch/arm/lib/cache.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/lib/cache.c +2 -0
@@ -37,6 +37,8 @@ void flush_cache (unsigned long dummy1, unsigned long dummy2) asm("0: mrc p15, 0, r15, c7, c10, 3\n\t" "bne 0b\n" : : :"memory" );/* disable write buffer as well (page 2-22) */ asm("mcr p15, 0, %0, c7, c10, 4" : :"r" (0 )); +/* invalidate icache for coherence with cleaned dcache */ + asm("mcr p15, 0, %0, c7, c5, 0" : :"r" (0 ));#endif #ifdef CONFIG_OMAP34XX void v7_flush_cache_all (void );
Signature · 1 line
1.7.2.3
PATCH 2/8 orion5x: Fix wrong address in orion5x_sdram_bar
This code intends to read the SDRAM controller base address registers but is instead reading the CPU window base address registers.
--- arch/arm/cpu/arm926ejs/orion5x/dram.c | 2 +- arch/arm/include/asm/arch-orion5x/orion5x.h | 1 + 2 files changed, 2 insertions(+), 1 deletions(-)
arch/arm/cpu/arm926ejs/orion5x/dram.c +1 -1
@@ -38,7 +38,7 @@ u32 orion5x_sdram_bar(enum memory_bank bank) {struct orion5x_ddr_addr_decode_registers *winregs = (struct orion5x_ddr_addr_decode_registers *) -ORION5X_CPU_WIN_BASE ; +ORION5X_SDRAM_CTRL_BASE ;u32 result =0 ;u32 enable =0x01 & winregs[bank].size;
arch/arm/include/asm/arch-orion5x/orion5x.h +1 -0
@@ -42,6 +42,7 @@#define ORION5X_REGISTER (x) (ORION5X_REGS_PHY_BASE + x)/* Documented registers */ +#define ORION5X_SDRAM_CTRL_BASE (ORION5X_REGISTER(0x01500))#define ORION5X_TWSI_BASE (ORION5X_REGISTER(0x11000))#define ORION5X_UART0_BASE (ORION5X_REGISTER(0x12000))#define ORION5X_UART1_BASE (ORION5X_REGISTER(0x12100))
Signature · 1 line
1.7.2.3
PATCH 2/8 orion5x: Fix wrong address in orion5x_sdram_bar
Hi Michael,
Le 29/01/2011 02:00, Michael Spang a ?crit :
Quoted 2 lines
This code intends to read the SDRAM controller base address registers but is instead reading the CPU window base address registers.
Side note: IIUC this change is not required since the CPU Window registers match the SDRAM controller registers on orion5x in U-boot; but it is fine if only for the sake of correctness, and assuming it works for other orion5x boards (testing underway for edminiv2).
Quoted 11 lines
Signed-off-by Michael Spang<[email protected]>--- arch/arm/cpu/arm926ejs/orion5x/dram.c | 2 +- arch/arm/include/asm/arch-orion5x/orion5x.h | 1 + 2 files changed, 2 insertions(+), 1 deletions(-)arch/arm/cpu/arm926ejs/orion5x/dram.c +0
-0
arch/arm/cpu/arm926ejs/orion5x/dram.c u32 orion5x_sdram_bar(enum memory_bank bank) · line 40
Quoted 3 lines
arch/arm/cpu/arm926ejs/orion5x/dram.c +0
-0@@ -38,7 +38,7 @@ u32 orion5x_sdram_bar(enum memory_bank bank) {struct orion5x_ddr_addr_decode_registers *winregs = (struct orion5x_ddr_addr_decode_registers *)
Please remove the 'ddr_' part of the struct name while you're at it:
this struct is not DDR specific, it also covers CPU window register.
Quoted 10 lines
arch/arm/cpu/arm926ejs/orion5x/dram.c +1
-1-ORION5X_CPU_WIN_BASE ; +ORION5X_SDRAM_CTRL_BASE ;u32 result =0 ;u32 enable =0x01 & winregs[bank].size;arch/arm/include/asm/arch-orion5x/orion5x.h +0
-0
arch/arm/include/asm/arch-orion5x/orion5x.h line 48
Quoted 7 lines
arch/arm/include/asm/arch-orion5x/orion5x.h +1
-0@@ -42,6 +42,7 @@#define ORION5X_REGISTER (x) (ORION5X_REGS_PHY_BASE + x)/* Documented registers */ +#define ORION5X_SDRAM_CTRL_BASE (ORION5X_REGISTER(0x01500))#define ORION5X_TWSI_BASE (ORION5X_REGISTER(0x11000))#define ORION5X_UART0_BASE (ORION5X_REGISTER(0x12000))#define ORION5X_UART1_BASE (ORION5X_REGISTER(0x12100))
Amicalement,
Signature · 1 line
Albert.
PATCH 2/8 orion5x: Fix wrong address in orion5x_sdram_bar
Quoted 4 lines · Albert ARIBAUD
Quoted 4 lines
arch/arm/cpu/arm926ejs/orion5x/dram.c +0
-1--- a/arch/arm/cpu/arm926ejs/orion5x/dram.c
Quoted 8 lines
Quoted 5 lines
+++
b/arch/arm/cpu/arm926ejs/orion5x/dram.carch/arm/cpu/arm926ejs/orion5x/dram.c +0
-0@@ -38,7 +38,7 @@ u32 orion5x_sdram_bar(enum memory_bank bank) ?{? ? ? ?struct
orion5x_ddr_addr_decode_registers*winregs = ? ? ? ? ? ? ? ?(structorion5x_ddr_addr_decode_registers*)Please remove the '
ddr_' part of the struct name while you're at it: this struct is not DDR specific, it also covers CPU window register.
Done.
Michael
PATCH 2/8 orion5x: Fix wrong address in orion5x_sdram_bar
In reply to Albert ARIBAUDQuoted 10 lines · Albert ARIBAUD
Hi Michael,
Le 29/01/2011 02:00, Michael Spang a ?crit :
Quoted 2 lines
This code intends to read the SDRAM controller base address registers but is instead reading the CPU window base address registers.
Side note: IIUC this change is not required since the CPU Window registers match the SDRAM controller registers on orion5x in U-boot; but it is fine if only for the sake of correctness, and assuming it works for other orion5x boards (testing underway for edminiv2).
I have this same change in my patch set for the DNS323, for what it is worth. I must have needed it, but I can't remember exactly what the behaviour was without it. :-)
Rogan
PATCH 2/8 orion5x: Fix wrong address in orion5x_sdram_bar
Quoted 12 lines · Rogan Dawes
Quoted 10 lines · Albert ARIBAUD
Hi Michael,
Le 29/01/2011 02:00, Michael Spang a ?crit :
Quoted 2 lines
This code intends to read the SDRAM controller base address registers but is instead reading the CPU window base address registers.
Side note: IIUC this change is not required since the CPU Window registers match the SDRAM controller registers on orion5x in U-boot; but it is fine if only for the sake of correctness, and assuming it works for other orion5x boards (testing underway for edminiv2).
Quoted 6 lines
I have this same change in my patch set for the DNS323, for what it is worth. I must have needed it, but I can't remember exactly what the behaviour was without it. :-)
Rogan
I was having trouble remembering what was wrong as well. It turns out the CPU window registers are not actually laid out in the way that the structure and code expect. The "cpu address map registers" have the layout
struct {
u32 control;
u32 base;
};which is not the same as the SD-RAM registers:
struct {
u32 base;
u32 size;
};The result is that the test to see if the window is enabled fails, even though it is enabled. This works by coincidence for the TS-7800, because the window being disabled causes the correct base address of 0 to be returned.
Michael
PATCH 3/8 orion5x: Increase maximum bank size to 128M
In reply to Michael SpangThe TS-7800 has one 128M RAM bank, so the maximum must be increased.
--- arch/arm/include/asm/arch-orion5x/orion5x.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/include/asm/arch-orion5x/orion5x.h +1 -1
@@ -64,7 +64,7 @@#define MAX_MVGBE_DEVS 1#define MVGBE0_BASE ORION5X_EGIGA_BASE -#define CONFIG_MAX_RAM_BANK_SIZE (64*1024*1024) +#define CONFIG_MAX_RAM_BANK_SIZE (128*1024*1024)/* include here SoC variants. 5181, 5281, 6183 should go here when adding support for them, and this comment should then be updated. */
Signature · 1 line
1.7.2.3
PATCH 3/8 orion5x: Increase maximum bank size to 128M
Le 29/01/2011 02:00, Michael Spang a ?crit :
Quoted 12 lines
The TS-7800 has one 128M RAM bank, so the maximum must be increased.
Signed-off-by Michael Spang<[email protected]>--- arch/arm/include/asm/arch-orion5x/orion5x.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)arch/arm/include/asm/arch-orion5x/orion5x.h +0
-0
arch/arm/include/asm/arch-orion5x/orion5x.h line 70
Quoted 8 lines
arch/arm/include/asm/arch-orion5x/orion5x.h +1
-1@@ -64,7 +64,7 @@#define MAX_MVGBE_DEVS 1#define MVGBE0_BASE ORION5X_EGIGA_BASE -#define CONFIG_MAX_RAM_BANK_SIZE (64*1024*1024) +#define CONFIG_MAX_RAM_BANK_SIZE (128*1024*1024)/* include here SoC variants. 5181, 5281, 6183 should go here when adding support for them, and this comment should then be updated. */
I have a vague memory about trying this with edminiv2 and having issues with getting the right memory size, which probably means there is a bug in orion5x with unmapped memory accesses. Testing will tell.
Amicalement,
Signature · 1 line
Albert.
PATCH 4/8 orion5x: Allow SDRAM initialization to be omitted
In reply to Michael SpangFor the TS-7800, the FPGA contains a bootloader which handles the SDRAM initialization and loads a bootloader from RAM. We should not try to initialize RAM again while running from it.
--- arch/arm/cpu/arm926ejs/orion5x/lowlevel_init.S | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
arch/arm/cpu/arm926ejs/orion5x/lowlevel_init.S +4 -0
@@ -86,6 +86,8 @@ lowlevel_init: +#ifndef CONFIG_SKIP_SDRAM_INIT + /* Use 'r4 as the base for internal register accesses */ ldr r4, =ORION5X_REGS_PHY_BASE
@@ -289,5 +291,7 @@ lowlevel_init: orr r2, r2, r6 str r2, [r3, #0x484] +#endif + /* Return to U-boot via saved link register */ mov pc, lr
Signature · 1 line
1.7.2.3
PATCH 4/8 orion5x: Allow SDRAM initialization to be omitted
Le 29/01/2011 02:00, Michael Spang a ?crit :
Quoted 23 lines
For the TS-7800, the FPGA contains a bootloader which handles the SDRAM initialization and loads a bootloader from RAM. We should not try to initialize RAM again while running from it.
Signed-off-by Michael Spang<[email protected]>--- arch/arm/cpu/arm926ejs/orion5x/lowlevel_init.S | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)arch/arm/cpu/arm926ejs/orion5x/lowlevel_init.S +2
-0@@ -86,6 +86,8 @@ lowlevel_init: +#ifndef CONFIG_SKIP_SDRAM_INIT + /* Use 'r4 as the base for internal register accesses */ ldr r4, =ORION5X_REGS_PHY_BASE
arch/arm/cpu/arm926ejs/orion5x/lowlevel_init.S lowlevel_init: · line 297
Quoted 7 lines
arch/arm/cpu/arm926ejs/orion5x/lowlevel_init.S +2
-0@@ -289,5 +291,7 @@ lowlevel_init: orr r2, r2, r6 str r2, [r3, #0x484] +#endif + /* Return to U-boot via saved link register */ mov pc, lr
That's basically making lowlevel_init empty, so I would prefer that you put #ifdef/#endif around the call to lowlevel_init in start.S and modify the orion5x Makefile to include lowlevel_init.S only if CONFIG_SKIP_DRAM_INIT is not defined.
(come to think of it, CONFIG_SKIP_LOWLEVEL_INIT is a bit of a misnomer since it actually skips not only lowlevelinit but also cpu_init_crit. Possibly one could even go as far as renaming CONFIG_SKIP_LOWLEVEL_INIT to CONFIG_SKIP_CPU_INIT_CRIT, and then reuse CONFIG_SKIP_LOWLEVEL_INIT for lowlevel_init; but that can be a separate patch, with a nifty doc update.)
Amicalement,
Signature · 1 line
Albert.
PATCH 4/8 orion5x: Allow SDRAM initialization to be omitted
Quoted 39 lines · Albert ARIBAUD
Le 29/01/2011 02:00, Michael Spang a ?crit :
Quoted 30 lines
For the TS-7800, the FPGA contains a bootloader which handles the SDRAM initialization and loads a bootloader from RAM. We should not try to initialize RAM again while running from it.
Signed-off-by Michael Spang<[email protected]>---
?arch/arm/cpu/arm926ejs/orion5x/lowlevel_init.S | ? ?4 ++++ ?1 files changed, 4 insertions(+), 0 deletions(-)arch/arm/cpu/arm926ejs/orion5x/lowlevel_init.S +0
-0@@ -86,6 +86,8 @@?lowlevel_init:
arch/arm/cpu/arm926ejs/orion5x/lowlevel_init.S +2
-0+#ifndef CONFIG_SKIP_SDRAM_INIT +? ? ? ?/* Use 'r4 as the base for internal register accesses */ ? ? ? ?ldr ? ? r4, =ORION5X_REGS_PHY_BASE
arch/arm/cpu/arm926ejs/orion5x/lowlevel_init.S +0
-0@@ -289,5 +291,7 @@ lowlevel_init:? ? ? ?orr ? ? r2, r2, r6
? ? ? ?str ? ? r2, [r3, #0x484]arch/arm/cpu/arm926ejs/orion5x/lowlevel_init.S +2
-0+#endif +Quoted 2 lines
? ? ? ?/* Return to U-boot via saved link register */ ? ? ? ?mov ? ? pc, lr
That's basically making
lowlevel_initempty, so I would prefer that you put #ifdef/#endif around the call tolowlevel_initinstart.Sand modify the orion5xMakefileto includelowlevel_init.Sonly ifCONFIG_SKIP_DRAM_INITis not defined.
Quoted 5 lines
(come to think of it,
CONFIG_SKIP_LOWLEVEL_INITis a bit of a misnomer since it actually skips not only lowlevelinit but alsocpu_init_crit. Possibly one could even go as far as renamingCONFIG_SKIP_LOWLEVEL_INITtoCONFIG_SKIP_CPU_INIT_CRIT, and then reuseCONFIG_SKIP_LOWLEVEL_INITforlowlevel_init; but that can be a separate patch, with a nifty doc update.)
I've done the latter change. I thought about moving the call to lowlevel_init outside of cpu_init_crit, but I doubt it is useful to do board-specific initialization without also initializing the CPU.
I've also removed the annotation that CONFIG_SKIP_LOWLEVEL_INIT option is ARM-only, because there is one mips board (vct) that uses this option.
Michael
PATCH 5/8 mvgbe: Support preserving the existing MAC address
In reply to Michael SpangThe MVGBE driver either gets the MAC from the environment, or invents one. This allows the driver to leave the existing address alone in case it is initialized before U-Boot starts.
--- drivers/net/mvgbe.c | 20 ++++++++++++++++++++ 1 files changed, 20 insertions(+), 0 deletions(-)
drivers/net/mvgbe.c +20 -0
@@ -380,6 +380,22 @@ static void port_uc_addr_set(struct mvgbe_registers *regs, u8 * p_addr) }/* +* port_uc_addr_get - This function gets the port unicast address. +*/ +static void port_uc_addr_get (struct mvgbe_registers *regs,u8 * p_addr) +{ +u32 mac_l =MVGBE_REG_RD (regs->macal); +u32 mac_h =MVGBE_REG_RD (regs->macah); + + p_addr[0 ] = (mac_h >>24 ); + p_addr[1 ] = (mac_h >>16 ); + p_addr[2 ] = (mac_h >>8 ); + p_addr[3 ] = (mac_h >>0 ); + p_addr[4 ] = (mac_l >>8 ); + p_addr[5 ] = (mac_l >>0 ); +} + +/* * mvgbe_init_rx_desc_ring - Curve a Rx chain desc list and buffer in memory. */ static void mvgbe_init_rx_desc_ring (struct mvgbe_device *dmvgbe)
@@ -718,6 +734,9 @@ error1:return -1 ; } +#if defined(CONFIG_PRESERVE_LOCAL_MAC ) +port_uc_addr_get (dmvgbe->regs, dmvgbe->dev.enetaddr); +#else while (!eth_getenv_enetaddr (s, dev->enetaddr)) {/* Generate Private MAC addr if not set */ dev->enetaddr[0 ] =0x02 ;
@@ -736,6 +755,7 @@ error1:#endif eth_setenv_enetaddr(s, dev->enetaddr); } +#endif dev->init = (void *)mvgbe_init; dev->halt = (void *)mvgbe_halt;
Signature · 1 line
1.7.2.3
PATCH 6/8 Add board support for TS-7800
In reply to Michael SpangThe TS-7800 is an Orion5x implementation by Technologic Systems.
--- MAKEALL | 1 + board/technologic/ts7800/Makefile | 46 +++++++++++ board/technologic/ts7800/ts7800.c | 36 +++++++++ boards.cfg | 1 + include/configs/ts7800.h | 149 +++++++++++++++++++++++++++++++++++++ 5 files changed, 233 insertions(+), 0 deletions(-) create mode 100644 board/technologic/ts7800/Makefile create mode 100644 board/technologic/ts7800/ts7800.c create mode 100644 include/configs/ts7800.h
MAKEALL +1 -0
@@ -344,6 +344,7 @@ LIST_ARM9=" \ edb9315 \ edb9315a \ edminiv2 \ + ts7800 \ guruplug \ imx27lite \ jadecpu \
board/technologic/ts7800/Makefile new file +46 -0
46 lines not on this page · raw message
board/technologic/ts7800/ts7800.c new file +36 -0
@@ -0,0 +1,36 @@ +/* +* Copyright (C) 2010 Michael Spang <[email protected]> +* +* See file CREDITS for list of people who contributed to this +* project. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +* MA 02110-1301 USA +*/ + +#include <common.h> + +DECLARE_GLOBAL_DATA_PTR ; + +int board_init (void ) +{ +// Technologic's MBR uses machine type 526, however the mainline +// machine type is 1652. Technologic's kernel sources will need +// patching to boot from U-Boot. + gd->bd->bi_arch_number =MACH_TYPE_TS78XX ; + gd->bd->bi_boot_params =0x100 ; + +return 0 ; +}
boards.cfg +1 -0
@@ -104,6 +104,7 @@ imx27lite arm arm926ejs imx27lite logicpd magnesium arm arm926ejs imx27lite logicpd mx27 omap5912osk arm arm926ejs - ti omap edminiv2 arm arm926ejs - LaCie orion5x +ts7800 arm arm926ejs - technologic orion5x ca9x4_ct_vxp arm armv7 vexpress armltd mx51evk arm armv7 mx51evk freescale mx5 mx53evk arm armv7 mx53evk freescale mx5
include/configs/ts7800.h new file +149 -0
149 lines not on this page · raw message
Signature · 1 line
1.7.2.3
PATCH 6/8 Add board support for TS-7800
Le 29/01/2011 02:00, Michael Spang a ?crit :
Quoted 32 lines
The TS-7800 is an Orion5x implementation by Technologic Systems.
Signed-off-by Michael Spang<[email protected]>--- MAKEALL | 1 + board/technologic/ts7800/Makefile | 46 +++++++++++ board/technologic/ts7800/ts7800.c | 36 +++++++++ boards.cfg | 1 + include/configs/ts7800.h | 149 +++++++++++++++++++++++++++++++++++++ 5 files changed, 233 insertions(+), 0 deletions(-)create mode 100644 board/technologic/ts7800/Makefile create mode 100644
board/technologic/ts7800/ts7800.ccreate mode 100644include/configs/ts7800.hMAKEALL +1
-0@@ -344,6 +344,7 @@ LIST_ARM9=" \ edb9315 \ edb9315a \ edminiv2 \ + ts7800 \ guruplug \ imx27lite \ jadecpu \board/technologic/ts7800/Makefile new file +0
-0
board/technologic/ts7800/Makefile line 2
Quoted 2 lines
board/technologic/ts7800/Makefile new file +2
-0@@ -0,0 +1,46 @@ +# +# Copyright (C) 2010 Michael Spang<[email protected]>
Fix copyright year (holds for the whole patchset)
Quoted 70 lines
board/technologic/ts7800/Makefile new file +43
-0+# See file CREDITS for list of people who contributed to this +# project. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301 USA +# + +LIB = $(obj)lib$(BOARD).o + +COBJS := ts7800.o + +SRCS := $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) + +$(LIB): $(obj).depend $(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) + +clean: + rm -f $(OBJS) + +distclean: clean + rm -f $(LIB) core *.bak .depend + +######################################################################### + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +#########################################################################board/technologic/ts7800/ts7800.c new file +21
-0@@ -0,0 +1,36 @@ +/* +* Copyright (C) 2010 Michael Spang<[email protected]> +* +* See file CREDITS for list of people who contributed to this +* project. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +* MA 02110-1301 USA +*/
board/technologic/ts7800/ts7800.c line 31
Quoted 10 lines
board/technologic/ts7800/ts7800.c new file +10
-0+ +#include <common.h> + +DECLARE_GLOBAL_DATA_PTR ; + +int board_init (void ) +{ +// Technologic's MBR uses machine type 526, however the mainline +// machine type is 1652. Technologic's kernel sources will need +// patching to boot from U-Boot.
... or the machine type can be changed to 526 in the U-boot boot script before starting the Technologic modified Linux.
Quoted 162 lines
board/technologic/ts7800/ts7800.c new file +5
-0+ gd->bd->bi_arch_number =MACH_TYPE_TS78XX ; + gd->bd->bi_boot_params =0x100 ; + +return 0 ; +}boards.cfg +1
-0@@ -104,6 +104,7 @@ imx27lite arm arm926ejs imx27lite logicpd magnesium arm arm926ejs imx27lite logicpd mx27 omap5912osk arm arm926ejs - ti omap edminiv2 arm arm926ejs - LaCie orion5x +ts7800 arm arm926ejs - technologic orion5x ca9x4_ct_vxp arm armv7 vexpress armltd mx51evk arm armv7 mx51evk freescale mx5 mx53evk arm armv7 mx53evk freescale mx5include/configs/ts7800.h new file +139
-0@@ -0,0 +1,149 @@ +/* +* Copyright (C) 2010 Michael Spang<[email protected]> +* +* See file CREDITS for list of people who contributed to this +* project. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +* MA 02110-1301 USA +*/ + +#ifndef _CONFIG_TS7800_H +#define _CONFIG_TS7800_H + +/* +* User Interface Configuration +*/ + +#define CONFIG_IDENT_STRING " TS-7800" +#define CONFIG_SYS_PROMPT "TS-7800> " +#define CONFIG_DISPLAY_CPUINFO +#define CONFIG_BOOTDELAY 3 + +/* +* Flash Driver +*/ + +#define CONFIG_SYS_NO_FLASH + +/* +* Commands Configuration +*/ + +#include <config_cmd_default.h> +#define CONFIG_CMD_PING +#define CONFIG_CMD_MII + +/* +* Serial Port Configuration +*/ + +#define CONFIG_CONS_INDEX 1 +#define CONFIG_BAUDRATE 115200 + +/* +* Environment Configuration +*/ + +#define CONFIG_ENV_IS_NOWHERE 1 +#define CONFIG_ENV_SIZE 0x2000 + +/* +* Limits +*/ + +#define CONFIG_SYS_CBSIZE 1024/* Console I/O Buff Size */ +#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)/* Print Buffer Size */ +#define CONFIG_SYS_MAXARGS 16/* Maximum arguments to U-Boot commands */ + +/* +* System Components +*/ + +#define CONFIG_MARVELL 1 +#define CONFIG_ARM926EJS 1/* Basic Architecture */ +#define CONFIG_FEROCEON 1/* CPU Core subversion */ +#define CONFIG_ORION5X 1/* SOC Family Name */ +#define CONFIG_88F5182 1/* SOC Name */ +#define CONFIG_MACH_TS78XX 1/* Machine type */ +#define CONFIG_SYS_HZ 1000 + +/* +* Board Initialization +*/ + +#define CONFIG_ARCH_MISC_INIT /* call arch_misc_init() */ +#define CONFIG_ARCH_CPU_INIT /* call arch_cpu_init() */ +#define CONFIG_SKIP_SDRAM_INIT /* U-Boot starts in RAM so do not initialize RAM */ + +/* MPP configuration need not be changed from power-on */ +#define ORION5X_MPP0_7 0x00000000 +#define ORION5X_MPP8_15 0x00000000 +#define ORION5X_MPP16_23 0x00000000 +#define ORION5X_GPIO_OUT_ENABLE 0xffffffff + +/* +* Memory Layout +*/ + +#define CONFIG_SYS_TEXT_BASE 0x00008000/* Boards loads U-Boot at 32 kB */ +#define CONFIG_SYS_INIT_SP_ADDR 0x00100000/* Initial stack at 1 MB */ +#define CONFIG_SYS_MALLOC_LEN 0x00020000/* Reserve 128 kB for malloc() */ + +#define CONFIG_SYS_SDRAM_BASE 0x00000000/* RAM starts at address 0 */ +#define CONFIG_NR_DRAM_BANKS 1/* Board has one 128 MB RAM bank */ + +#define CONFIG_SYS_LOAD_ADDR 0x00800000/* Executables load by default at 8 MB */ +#define CONFIG_SYS_MEMTEST_START 0x00001000/* Memtest starts after vectors */ +#define CONFIG_SYS_MEMTEST_END 0x07e00000/* Memtest ends before U-Boot */ + +/* +* UART Driver +*/ + +#define CONFIG_SYS_NS16550 +#define CONFIG_SYS_NS16550_SERIAL +#define CONFIG_SYS_NS16550_REG_SIZE (-4) +#define CONFIG_SYS_NS16550_CLK CONFIG_SYS_TCLK +#define CONFIG_SYS_NS16550_COM1 ORION5X_UART0_BASE +#define CONFIG_SYS_NS16550_COM2 ORION5X_UART1_BASE +#define CONFIG_SYS_BAUDRATE_TABLE \ + { 9600, 19200, 38400, 57600, 115200, 230400, 460800, 921600 } + +/* +* Network Driver +*/ + +#ifdef CONFIG_CMD_NET +#define CONFIG_MVGBE +#define CONFIG_MVGBE_PORTS {1} +#define CONFIG_PRESERVE_LOCAL_MAC +#define CONFIG_PHY_BASE_ADR 0 +#define CONFIG_NETCONSOLE +#define CONFIG_NET_MULTI +#define CONFIG_MII +#define CONFIG_SYS_FAULT_ECHO_LINK_DOWN +#define CONFIG_ENV_OVERWRITE +#endif
include/configs/ts7800.h line 149
Quoted 10 lines
include/configs/ts7800.h new file +10
-0+ +/* +* Linux +*/ + +#define CONFIG_CMDLINE_TAG 1/* enable passing of ATAGs */ +#define CONFIG_INITRD_TAG 1/* enable INITRD tag */ +#define CONFIG_SETUP_MEMORY_TAGS 1/* enable memory tag */ + +#endif /* _CONFIG_TS7800_H */
Amicalement,
Signature · 1 line
Albert.
PATCH 6/8 Add board support for TS-7800
Quoted 117 lines · Albert ARIBAUD
Le 29/01/2011 02:00, Michael Spang a ?crit :
Quoted 35 lines
The TS-7800 is an Orion5x implementation by Technologic Systems.
Signed-off-by Michael Spang<[email protected]>---
?MAKEALL ? ? ? ? ? ? ? ? ? ? ? ? ? | ? ?1 + ?board/technologic/ts7800/Makefile | ? 46 +++++++++++ ?board/technologic/ts7800/ts7800.c | ? 36 +++++++++ ?boards.cfg ? ? ? ? ? ? ? ? ? ? ? ?| ? ?1 + ?include/configs/ts7800.h ? ? ? ? ?| ?149+++++++++++++++++++++++++++++++++++++
?5 files changed, 233 insertions(+), 0 deletions(-) ?create mode 100644 board/technologic/ts7800/Makefile ?create mode 100644board/technologic/ts7800/ts7800.c?create mode 100644include/configs/ts7800.hMAKEALL +1
-0@@ -344,6 +344,7 @@ LIST_ARM9=" ? ? ? ? ? ? ? ? \ ? ? ? ?edb9315 ? ? ? ? ? ? ? ? \ ? ? ? ?edb9315a ? ? ? ? ? ? ? ?\ ? ? ? ?edminiv2 ? ? ? ? ? ? ? ?\ + ? ? ? ts7800 ? ? ? ? ? ? ? ? ?\ ? ? ? ?guruplug ? ? ? ? ? ? ? ?\ ? ? ? ?imx27lite ? ? ? ? ? ? ? \ ? ? ? ?jadecpu ? ? ? ? ? ? ? ? \board/technologic/ts7800/Makefile new file +0
-0board/technologic/ts7800/Makefile line 2
Quoted 2 lines
board/technologic/ts7800/Makefile new file +2
-0@@ -0,0 +1,46 @@ +# +# Copyright (C) 2010 Michael Spang<[email protected]>Fix copyright year (holds for the whole patchset)
Quoted 76 lines
board/technologic/ts7800/Makefile new file +43
-0+# See file CREDITS for list of people who contributed to this +# project. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ?See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301 USA +# + +LIB ? ?= $(obj)lib$(BOARD).o + +COBJS ?:= ts7800.o + +SRCS ? := $(COBJS:.o=.c) +OBJS ? := $(addprefix $(obj),$(COBJS)) + +$(LIB): ? ? ? ?$(obj).depend $(OBJS) + ? ? ? $(AR) $(ARFLAGS) $@ $(OBJS) + +clean: + ? ? ? rm -f $(OBJS) + +distclean: ? ? clean + ? ? ? rm -f $(LIB) core *.bak .depend + +######################################################################### + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +#########################################################################board/technologic/ts7800/ts7800.c new file +26
-0@@ -0,0 +1,36 @@ +/* +* Copyright (C) 2010 Michael Spang<[email protected]> +* +* See file CREDITS for list of people who contributed to this +* project. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +* MA 02110-1301 USA +*/ + +#include <common.h> + +DECLARE_GLOBAL_DATA_PTR ; +
Quoted 8 lines
board/technologic/ts7800/ts7800.c line 31
Quoted 5 lines
board/technologic/ts7800/ts7800.c new file +5
-0+int board_init (void ) +{ + ? ? ? ?// Technologic's MBR uses machine type 526, however the mainline + ? ? ? ?// machine type is 1652. Technologic's kernel sources will need + ? ? ? ?// patching to boot from U-Boot.... or the machine type can be changed to 526 in the U-boot boot script before starting the Technologic modified Linux.
Good to know, I've documented this in the README.
Michael
PATCH 6/8 Add board support for TS-7800
In reply to Michael SpangDear Michael Spang,
Quoted 13 lines · In message <[email protected]> you…
The TS-7800 is an Orion5x implementation by Technologic Systems.
Signed-off-by Michael Spang <[email protected]>--- MAKEALL | 1 + board/technologic/ts7800/Makefile | 46 +++++++++++ board/technologic/ts7800/ts7800.c | 36 +++++++++ boards.cfg | 1 + include/configs/ts7800.h | 149 +++++++++++++++++++++++++++++++++++++ 5 files changed, 233 insertions(+), 0 deletions(-) create mode 100644 board/technologic/ts7800/Makefile create mode 100644 board/technologic/ts7800/ts7800.c create mode 100644 include/configs/ts7800.h
Please run all your patches through checkpatch:
ERROR: code indent should use tabs where possible
WARNING: please, no spaces at the start of a line
ERROR: do not use C99 // comments
WARNING: line over 80 characters
etc. etc.
Best regards,
Wolfgang Denk
Signature · 7 lines
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: wd at denx.de Do you know about being with somebody? Wanting to be? If I had the whole universe, I'd give it to you, Janice. When I see you, I feel like I'm hungry all over. Do you know how that feels? -- Charlie Evans, "Charlie X", stardate 1535.8
PATCH 7/8 Add NAND support for TS-7800
In reply to Michael SpangThe NAND control functions were written by Alexander Clouter and copied here from Linux.
--- drivers/mtd/nand/Makefile | 1 + drivers/mtd/nand/ts7800_nand.c | 68 ++++++++++++++++++++++++++++++++++++++++ include/configs/ts7800.h | 46 +++++++++++++++++++++++++-- 3 files changed, 112 insertions(+), 3 deletions(-) create mode 100644 drivers/mtd/nand/ts7800_nand.c
drivers/mtd/nand/Makefile +1 -0
@@ -49,6 +49,7 @@ COBJS-$(CONFIG_NAND_S3C2410) += s3c2410_nand.o COBJS-$(CONFIG_NAND_S3C64XX) += s3c64xx.o COBJS-$(CONFIG_NAND_SPEAR) += spr_nand.o COBJS-$(CONFIG_NAND_OMAP_GPMC) += omap_gpmc.o +COBJS-$(CONFIG_NAND_TS7800) += ts7800_nand.o COBJS-$(CONFIG_NAND_PLAT) += nand_plat.o endif
drivers/mtd/nand/ts7800_nand.c new file +68 -0
68 lines not on this page · raw message
include/configs/ts7800.h +43 -3
74 lines not on this page · raw message
Signature · 1 line
1.7.2.3
PATCH 7/8 Add NAND support for TS-7800
Dear Michael Spang,
Quoted 10 lines · In message <[email protected]> you…
The NAND control functions were written by Alexander Clouter and copied here from Linux.
Signed-off-by Michael Spang <[email protected]>--- drivers/mtd/nand/Makefile | 1 + drivers/mtd/nand/ts7800_nand.c | 68 ++++++++++++++++++++++++++++++++++++++++ include/configs/ts7800.h | 46 +++++++++++++++++++++++++-- 3 files changed, 112 insertions(+), 3 deletions(-) create mode 100644 drivers/mtd/nand/ts7800_nand.c
ERROR: code indent should use tabs where possible
WARNING: please, no spaces at the start of a line
WARNING: line over 80 characters
Best regards,
Wolfgang Denk
Signature · 5 lines
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: wd at denx.de You don't have to worry about me. I might have been born yesterday... but I stayed up all night.
PATCH 8/8 Add README for TS-7800
In reply to Michael Spang--- doc/README.ts7800 | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 60 insertions(+), 0 deletions(-) create mode 100644 doc/README.ts7800
doc/README.ts7800 new file +60 -0
@@ -0,0 +1,60 @@ +Booting +------- + +The TS-7800 boots initially from a proprietary bootloader on the FPGA +called TS-BOOTROM. TS-BOOTROM loads a small image from the MBR of the +onboard NAND or SD card into RAM, and executes it. The default MBR is +intended to boot a Linux kernel. + +The TS-7800 port of U-Boot takes the place of the Linux kernel in this +configuration, and is therefore loaded and executed by the MBR. The +MBR also creates an ATAG structure intended for Linux, but U-Boot +ignores it. + +NAND layout +----------- + +NAND support is not enabled by default because U-Boot will overwrite +part of it with its environment. To enable NAND support, enable +CONFIG_USE_NAND in include/configs/ts7800.h. + +The default NAND partition layout used by Technologic and Linux is: + + 128k(mbr),4m(linux),4m(initrd),-(rootfs) + +For U-Boot, we split the linux partition into a partition for the +U-Boot code and a partition for the U-Boot environment. The initrd +partition is not used, and is renamed to "linux". The new layout is: + + 128k(mbr),3m(uboot),1m(env),4m(linux),-(rootfs) + +When NAND support is enabled, this string is available in the U-Boot +default environment as the "mtdparts" variable. You may wish to use +this layout for Linux as well by adding it to the Linux command line. +For example: + + setenv bootargs console=ttyS0,115200n8 ${mtdparts} + +Installing U-Boot +----------------- + +To install U-Boot to the onboard flash, write u-boot.bin to the kernel +partition on the flash. From Linux this might be done as follows: + + flash_eraseall /dev/mtd1 + nandwrite --pad /dev/mtd1 u-boot.bin + +When running from onboard flash, you may wish to enable NAND support +as described in the previous section. The environment is not preserved +unless you enable NAND support. + +To install U-Boot to an SD card, write u-boot.bin to the kernel +partition on the card. + +TS-7800 Wiki +------------ + +A useful resource about the TS-7800 is the TS-7800 wiki [1], +maintained by Alexander Clouter. + +[1] http://www.digriz.org.uk/ts78xx
Signature · 1 line
1.7.2.3