Overview
Subsystems (2)
v5 cover Overview
Hi,
this is V5 of the IXP42x patch series - it is now based on Marek's u-boot-pxa.git, with one additional fix:
- fix one missing I/O accessor in get_ticks() in Patch #0004
cu
Michael
Michael Schwingen (17):
add XScale sub architecture (IXP/PXA) to maintainer list add support for IXP42x Rev. B1 and newer trigger hardware watchdog in IXP42x serial driver Fix IXP code to work after relocation was added fix "depend" target in npe directory
support CONFIG_SYS_LDSCRIPT on ARM
use -ffunction-sections / --gc-sections on IXP42x update/fix AcTux1 board
update/fix AcTux2 board
update/fix AcTux3 board
update/fix AcTux4 board
IXP NPE: add support for fixed-speed MII ports add dvlhost (dLAN 200 AV Wireless G) board update/fix IXDP425 / IXDPG425 boards
update/fix PDNB3 board
IXP42x PCI rewrite
run arm_pci_init after relocation
MAINTAINERS | 45 ++- arch/arm/config.mk | 7 + arch/arm/cpu/ixp/config.mk | 5 + arch/arm/cpu/ixp/cpu.c | 5 - arch/arm/cpu/ixp/npe/Makefile | 1 + arch/arm/cpu/ixp/npe/npe.c | 74 +++-- arch/arm/cpu/ixp/start.S | 59 +--- arch/arm/cpu/ixp/timer.c | 124 +++--- arch/arm/cpu/ixp/u-boot.lds | 8 +- arch/arm/include/asm/arch-ixp/ixp425.h | 5 +- arch/arm/include/asm/arch-ixp/ixp425pci.h | 130 +------ arch/arm/include/asm/global_data.h | 3 + arch/arm/lib/board.c | 6 +- board/actux1/actux1.c | 105 +++--- board/actux1/config.mk | 4 - board/actux1/u-boot.lds | 41 ++- board/actux2/actux2.c | 93 +++--- board/actux2/config.mk | 4 - board/actux2/u-boot.lds | 46 ++- board/actux3/actux3.c | 120 +++--- board/actux3/config.mk | 4 - board/actux3/u-boot.lds | 52 ++- board/actux4/actux4.c | 103 +++-- board/actux4/config.mk | 4 - board/dvlhost/Makefile | 50 +++ board/dvlhost/dvlhost.c | 130 ++++++ board/dvlhost/dvlhost_hw.h | 47 +++ board/dvlhost/u-boot.lds | 87 ++++ board/dvlhost/watchdog.c | 43 ++ board/ixdp425/config.mk | 2 - board/ixdp425/flash.c | 427 -------------------- board/ixdp425/ixdp425.c | 155 +++++++- board/prodrive/pdnb3/config.mk | 2 - boards.cfg | 8 +- drivers/pci/pci.c | 4 - drivers/pci/pci_indirect.c | 13 +- drivers/pci/pci_ixp.c | 612 ++++++++++------------------- drivers/serial/serial_ixp.c | 7 +- include/configs/actux1.h | 62 ++-- include/configs/actux2.h | 35 ++- include/configs/actux3.h | 37 ++- include/configs/actux4.h | 39 ++- include/configs/dvlhost.h | 248 ++++++++++++ include/configs/ixdp425.h | 196 +++++++--- include/configs/ixdpg425.h | 11 +- include/configs/pdnb3.h | 10 +- 46 files changed, 1689 insertions(+), 1584 deletions(-) delete mode 100644 board/actux1/config.mk delete mode 100644 board/actux2/config.mk delete mode 100644 board/actux3/config.mk delete mode 100644 board/actux4/config.mk create mode 100644 board/dvlhost/Makefile create mode 100644 board/dvlhost/dvlhost.c create mode 100644 board/dvlhost/dvlhost_hw.h create mode 100644 board/dvlhost/u-boot.lds create mode 100644 board/dvlhost/watchdog.c delete mode 100644 board/ixdp425/config.mk delete mode 100644 board/ixdp425/flash.c delete mode 100644 board/prodrive/pdnb3/config.mk create mode 100644 include/configs/dvlhost.h
Signature · 1 line
1.7.2.5
PATCH v5 1/17 add XScale sub architecture (IXP/PXA) to maintainer list
---
Changes for V2:
Changes for V3:
- change patch description
- drop wepep250 (should already be deleted)
Changes for V4:
- add changelog
Changes for V5:
MAINTAINERS | 44 ++++++++++++++++++++++---------------------- 1 files changed, 22 insertions(+), 22 deletions(-)
MAINTAINERS +22 -22
@@ -567,8 +567,8 @@ Stefano Babic <[email protected]> ea20 davinci mx35pdk i.MX35 mx51evk i.MX51 - polaris xscale - trizepsiv xscale + polaris xscale/pxa + trizepsiv xscale/pxa vision2 i.MX51 Jason Liu <[email protected]>
@@ -600,7 +600,7 @@ Andreas Bie Cliff Brake <[email protected]> - pxa255_idp xscale + pxa255_idp xscale/pxa Rick Bronson <[email protected]>
@@ -710,7 +710,7 @@ Sergey Kubushyn <[email protected]> Prakash Kumar <[email protected]> - cerf250 xscale + cerf250 xscale/pxa Vipin Kumar <[email protected]>
@@ -788,9 +788,9 @@ John Rigby <[email protected]> Stefan Roese <[email protected]> - ixdpg425 xscale - pdnb3 xscale - scpu xscale + ixdpg425 xscale/ixp + pdnb3 xscale/ixp + scpu xscale/ixp Alessandro Rubini <[email protected]> Nomadik Linux Team <[email protected]>
@@ -813,15 +813,15 @@ Heiko Schocher <[email protected]> Robert Schwebel <[email protected]> - csb226 xscale - innokom xscale + csb226 xscale/pxa + innokom xscale/pxa Michael Schwingen <[email protected]> - actux1 xscale - actux2 xscale - actux3 xscale - actux4 xscale + actux1 xscale/ixp + actux2 xscale/ixp + actux3 xscale/ixp + actux4 xscale/ixp Andrea Scian <[email protected]>
@@ -845,12 +845,12 @@ Greg Ungerer <[email protected]> Marek Vasut <[email protected]> - balloon3 xscale - colibri_pxa270 xscale - palmld xscale - palmtc xscale - vpac270 xscale - zipitz2 xscale + balloon3 xscale/pxa + colibri_pxa270 xscale/pxa + palmld xscale/pxa + palmtc xscale/pxa + vpac270 xscale/pxa + zipitz2 xscale/pxa efikamx i.MX51 Hugo Villeneuve <[email protected]>
@@ -901,9 +901,9 @@ Sughosh Ganu <[email protected]> Unknown / orphaned boards: Board CPU Last known maintainer / Comment ......................................................................... - cradle xscale Kyle Harris <[email protected]> / dead address - ixdp425 xscale Kyle Harris <[email protected]> / dead address - lubbock xscale Kyle Harris <[email protected]> / dead address + cradle xscale/pxa Kyle Harris <[email protected]> / dead address + ixdp425 xscale/ixp Kyle Harris <[email protected]> / dead address + lubbock xscale/pxa Kyle Harris <[email protected]> / dead address imx31_phycore_eet i.MX31 Guennadi Liakhovetski <[email protected]> / resigned mx31ads i.MX31 Guennadi Liakhovetski <[email protected]> / resigned
Signature · 1 line
1.7.2.5
PATCH v5 2/17 add support for IXP42x Rev. B1 and newer
In reply to Michael Schwingen---
Changes for V2:
Changes for V3:
- reformat to wrap long lines
Changes for V4:
- add changelog
Changes for V5:
arch/arm/cpu/ixp/npe/npe.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-)
arch/arm/cpu/ixp/npe/npe.c +5 -2
@@ -621,9 +621,12 @@ int npe_initialize(bd_t * bis)if (ixFeatureCtrlDeviceRead () ==IX_FEATURE_CTRL_DEVICE_TYPE_IXP42X ) {switch (ixFeatureCtrlProductIdRead () &IX_FEATURE_CTRL_SILICON_STEPPING_MASK ) {case IX_FEATURE_CTRL_SILICON_TYPE_B0 : +default :/* newer than B0 */ /* -* If it is B0 Silicon, we only enable port when its corresponding -* Eth Coprocessor is available. +* If it is B0 or newer Silicon, we +* only enable port when its +* corresponding Eth Coprocessor is +* available. */ if (ixFeatureCtrlComponentCheck (IX_FEATURECTRL_ETH0 ) ==IX_FEATURE_CTRL_COMPONENT_ENABLED )
Signature · 1 line
1.7.2.5
PATCH v5 3/17 trigger hardware watchdog in IXP42x serial driver
In reply to Michael Schwingen---
Changes for V2:
Changes for V3:
- coding style fixes
Changes for V4:
- add changelog
Changes for V5:
drivers/serial/serial_ixp.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-)
drivers/serial/serial_ixp.c +5 -2
@@ -30,6 +30,7 @@#include <common.h> #include <asm/arch/ixp425.h> +#include <watchdog.h> /* * 14.7456 MHz
@@ -85,7 +86,8 @@ int serial_init (void)void serial_putc (const char c) {/* wait for room in the tx FIFO on UART */ -while ((LSR (CONFIG_SYS_IXP425_CONSOLE ) &LSR_TEMT ) ==0 ); +while ((LSR (CONFIG_SYS_IXP425_CONSOLE ) &LSR_TEMT ) ==0 ) +WATCHDOG_RESET ();/* Reset HW Watchdog, if needed */ THR (CONFIG_SYS_IXP425_CONSOLE ) = c;
@@ -111,7 +113,8 @@ int serial_tstc (void)*/ int serial_getc (void ) { -while (!(LSR (CONFIG_SYS_IXP425_CONSOLE ) &LSR_DR )); +while (!(LSR (CONFIG_SYS_IXP425_CONSOLE ) &LSR_DR )) +WATCHDOG_RESET ();/* Reset HW Watchdog, if needed */ return (char )RBR (CONFIG_SYS_IXP425_CONSOLE ) &0xff ; }
Signature · 1 line
1.7.2.5
PATCH v5 4/17 Fix IXP code to work after relocation was added
In reply to Michael Schwingen - jump to real flash location after reset before turning off flash mirror
- fix timer system to use HZ == 1000, remove broken interrupt-based code
---
Changes for V2:
- fix patch description
Changes for V3:
- use I/O accessors
- move timestamp variable from BSS to global data
- coding style fixes
Changes for V4:
- add changelog
Changes for V5:
- fix one missing I/O accessor in get_ticks()
arch/arm/cpu/ixp/cpu.c | 5 -- arch/arm/cpu/ixp/start.S | 59 ++-------------- arch/arm/cpu/ixp/timer.c | 124 +++++++++++++++----------------- arch/arm/include/asm/arch-ixp/ixp425.h | 5 +- arch/arm/include/asm/global_data.h | 3 + 5 files changed, 68 insertions(+), 128 deletions(-)
arch/arm/cpu/ixp/cpu.c +0 -5
@@ -36,8 +36,6 @@#include <asm/arch/ixp425.h> #include <asm/system.h> -ulong loops_per_jiffy; -static void cache_flush (void );#if defined(CONFIG_DISPLAY_CPUINFO )
@@ -51,17 +49,14 @@ int print_cpuinfo (void)puts ("CPU: Intel IXP425 at " );switch ((id &0x000003f0 ) >>4 ) {case 0x1c : - loops_per_jiffy =887467 ; speed =533 ;break ;case 0x1d : - loops_per_jiffy =666016 ; speed =400 ;break ;case 0x1f : - loops_per_jiffy =442901 ; speed =266 ;break ; }
arch/arm/cpu/ixp/start.S +5 -54
103 lines not on this page · raw message
arch/arm/cpu/ixp/timer.c +58 -66
167 lines not on this page · raw message
arch/arm/include/asm/arch-ixp/ixp425.h +2 -3
@@ -391,9 +391,8 @@#define IXP425_TIMER_REG (x) (IXP425_TIMER_BASE_PHYS+(x))#endif -#if 0 /* test-only: also defined in npe/include/... */ -#define IXP425_OSTS IXP425_TIMER_REG(IXP425_OSTS_OFFSET) -#endif +/* _B to avoid collision: also defined in npe/include/... */ +#define IXP425_OSTS_B IXP425_TIMER_REG(IXP425_OSTS_OFFSET)#define IXP425_OST1 IXP425_TIMER_REG(IXP425_OST1_OFFSET)#define IXP425_OSRT1 IXP425_TIMER_REG(IXP425_OSRT1_OFFSET)#define IXP425_OST2 IXP425_TIMER_REG(IXP425_OST2_OFFSET)
arch/arm/include/asm/global_data.h +3 -0
@@ -64,6 +64,9 @@ typedef struct global_data {unsigned long long timer_reset_value;unsigned long lastinc;#endif +#ifdef CONFIG_IXP425 +unsigned long timestamp; +#endif unsigned long relocaddr;/* Start address of U-Boot in RAM */ phys_size_t ram_size;/* RAM size */ unsigned long mon_len;/* monitor len */
Signature · 1 line
1.7.2.5
PATCH v5 5/17 fix "depend" target in npe directory
In reply to Michael Schwingen---
Changes for V2:
Changes for V3:
Changes for V4:
- add changelog
Changes for V5:
arch/arm/cpu/ixp/npe/Makefile | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/cpu/ixp/npe/Makefile +1 -0
@@ -27,6 +27,7 @@ LIB := $(obj)libnpe.o LOCAL_CFLAGS += -I$(TOPDIR)/arch/arm/cpu/ixp/npe/include -DCONFIG_IXP425_COMPONENT_ETHDB -D__linux CFLAGS += $(LOCAL_CFLAGS) +CPPFLAGS += $(LOCAL_CFLAGS) # needed for depend HOSTCFLAGS += $(LOCAL_CFLAGS) COBJS-$(CONFIG_IXP4XX_NPE) := npe.o \
Signature · 1 line
1.7.2.5
PATCH v5 6/17 support CONFIG_SYS_LDSCRIPT on ARM
In reply to Michael Schwingen---
Changes for V3:
- new in V3, replaces config.mk files in earlier patches
Changes for V4:
- add changelog
Changes for V5:
arch/arm/config.mk | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)
arch/arm/config.mk +7 -0
@@ -62,6 +62,13 @@ PLATFORM_LIBS += $(OBJTREE)/arch/arm/lib/eabi_compat.o endif endif +ifdef CONFIG_SYS_LDSCRIPT +# need to strip off double quotes +LDSCRIPT := $(subst ",,$(CONFIG_SYS_LDSCRIPT)) +else +LDSCRIPT := $(SRCTREE)/$(CPUDIR)/u-boot.lds +endif + # needed for relocation ifndef CONFIG_NAND_SPL LDFLAGS_u-boot += -pie
Signature · 1 line
1.7.2.5
PATCH v5 6/17 support CONFIG_SYS_LDSCRIPT on ARM
Quoted 2 lines · Michael Schwingen
Signed-off-by Michael Schwingen <[email protected]>---
Honestly, I don't really understand this one ... Wolfgang, is this one OK to merge ?
Quoted 27 lines
Changes for V3:
- new in V3, replaces config.mk files in earlier patches
Changes for V4:
- add changelog
Changes for V5:arch/arm/config.mk | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)arch/arm/config.mk +7
-0@@ -62,6 +62,13 @@ PLATFORM_LIBS += $(OBJTREE)/arch/arm/lib/eabi_compat.o endif endif +ifdef CONFIG_SYS_LDSCRIPT +# need to strip off double quotes +LDSCRIPT := $(subst ",,$(CONFIG_SYS_LDSCRIPT)) +else +LDSCRIPT := $(SRCTREE)/$(CPUDIR)/u-boot.lds +endif + # needed for relocation ifndef CONFIG_NAND_SPL LDFLAGS_u-boot += -pie
PATCH v5 6/17 support CONFIG_SYS_LDSCRIPT on ARM
Am 05/23/2011 02:42 AM, schrieb Marek Vasut:
Quoted 5 lines · Michael Schwingen
Quoted 2 lines
Signed-off-by Michael Schwingen <[email protected]>---
Honestly, I don't really understand this one ... Wolfgang, is this one OK to merge ?
The idea was to be able to define the LD_SCRIPT variable in the board config file.
However, it seems that another patch in the toplevel config.mk added the same functionality after I wrote this, so this patch can be dropped completely.
cu
Michael
PATCH v5 7/17 use -ffunction-sections / --gc-sections on IXP42x
In reply to Michael Schwingen---
Changes for V2:
- remove changes from config.mk and board config.h files
- add wildcards to sections in arch/arm/cpu/ixp/u-boot.lds
Changes for V3:
- set compiler/linker flags in arch/arm/cpu/ixp/config.mk instead of per-board config.mk files
Changes for V4:
- add changelog
Changes for V5:
arch/arm/cpu/ixp/config.mk | 5 +++++ arch/arm/cpu/ixp/u-boot.lds | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-)
arch/arm/cpu/ixp/config.mk +5 -0
@@ -27,6 +27,11 @@ BIG_ENDIAN = y PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float -mbig-endian PLATFORM_CPPFLAGS += -mbig-endian -march=armv5te -mtune=strongarm1100 + +# -fdata-sections triggers "section .bss overlaps section .rel.dyn" linker error +PLATFORM_RELFLAGS += -ffunction-sections +LDFLAGS_u-boot += --gc-sections + # ========================================================================= # # Supply options according to compiler version
arch/arm/cpu/ixp/u-boot.lds +4 -4
@@ -31,8 +31,8 @@ SECTIONS . = ALIGN(4); .text : { - arch/arm/cpu/ixp/start.o(.text) - *(.text) + arch/arm/cpu/ixp/start.o(.text*) + *(.text*) } . = ALIGN(4);
@@ -40,7 +40,7 @@ SECTIONS . = ALIGN(4); .data : { - *(.data) + *(.data*) } . = ALIGN(4);
@@ -67,7 +67,7 @@ SECTIONS .bss __rel_dyn_start (OVERLAY) : { __bss_start = .; - *(.bss) + *(.bss*) . = ALIGN(4); __bss_end__ = .; }
Signature · 1 line
1.7.2.5
PATCH v5 8/17 update/fix AcTux1 board
In reply to Michael Schwingen---
Changes for V2:
- move -ffunction-sections/--gc-sections to board config.mk
- add wildcard to bss segment in linker script
Changes for V3:
- use I/O accessors
- coding style fixes
- add PCI clock/reset initialization
- use get_ram_size in dram_init
- add PCI support
- remove config.mk
- remove unused definitions from config.h
- add CONFIG_BOARD_SIZE_LIMIT
Changes for V4:
- add changelog
- merge __bss_end change in u-boot.lds from master
Changes for V5:
board/actux1/actux1.c | 105 ++++++++++++++++++++++++---------------------- board/actux1/config.mk | 4 -- board/actux1/u-boot.lds | 41 +++++++++++++----- boards.cfg | 5 ++- include/configs/actux1.h | 62 ++++++++++++++++----------- 5 files changed, 124 insertions(+), 93 deletions(-) delete mode 100644 board/actux1/config.mk
board/actux1/actux1.c +55 -50
@@ -37,49 +37,57 @@#include <asm/arch/ixp425.h> #include <asm/io.h> #include <miiphy.h> +#ifdef CONFIG_PCI +#include <pci.h> +#include <asm/arch/ixp425pci.h> +#endif #include "actux1_hw.h" DECLARE_GLOBAL_DATA_PTR ; -int board_init (void ) +int board_early_init_f (void ) +{ +/* CS5: Debug port */ +writel (0x9d520003 ,IXP425_EXP_CS5 ); +/* CS6: HwRel */ +writel (0x81860001 ,IXP425_EXP_CS6 ); +/* CS7: LEDs */ +writel (0x80900003 ,IXP425_EXP_CS7 ); +return 0 ; +} + +int board_init (void ) { gd->bd->bi_arch_number =MACH_TYPE_ACTUX1 ;/* adress of boot parameters */ gd->bd->bi_boot_params =0x00000100 ; -GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_IORST ); -GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_IORST ); +GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_IORST ); +GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_IORST ); -/* Setup GPIO's for PCI INTA */ -GPIO_OUTPUT_DISABLE (CONFIG_SYS_GPIO_PCI1_INTA ); -GPIO_INT_ACT_LOW_SET (CONFIG_SYS_GPIO_PCI1_INTA ); +/* Setup GPIOs for PCI INTA */ +GPIO_OUTPUT_DISABLE (CONFIG_SYS_GPIO_PCI1_INTA ); +GPIO_INT_ACT_LOW_SET (CONFIG_SYS_GPIO_PCI1_INTA ); -/* Setup GPIO's for 33MHz clock output */ -GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_PCI_CLK ); -GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_EXTBUS_CLK ); - *IXP425_GPIO_GPCLKR =0x011001FF ; +/* Setup GPIOs for 33MHz clock output */ +GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_PCI_CLK ); +GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_EXTBUS_CLK ); +writel (0x011001FF ,IXP425_GPIO_GPCLKR ); -/* CS5: Debug port */ - *IXP425_EXP_CS5 =0x9d520003 ; -/* CS6: HwRel */ - *IXP425_EXP_CS6 =0x81860001 ; -/* CS7: LEDs */ - *IXP425_EXP_CS7 =0x80900003 ; - -udelay (533 ); -GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_IORST ); +udelay (533 ); +GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_IORST ); -ACTUX1_LED1 (2 ); -ACTUX1_LED2 (2 ); -ACTUX1_LED3 (0 ); -ACTUX1_LED4 (0 ); -ACTUX1_LED5 (0 ); -ACTUX1_LED6 (0 ); -ACTUX1_LED7 (0 ); +ACTUX1_LED1 (2 ); +ACTUX1_LED2 (2 ); +ACTUX1_LED3 (0 ); +ACTUX1_LED4 (0 ); +ACTUX1_LED5 (0 ); +ACTUX1_LED6 (0 ); +ACTUX1_LED7 (0 ); -ACTUX1_HS (ACTUX1_HS_DCD ); +ACTUX1_HS (ACTUX1_HS_DCD );return 0 ; }
@@ -87,21 +95,21 @@ int board_init (void)/* * Check Board Identity */ -int checkboard (void ) +int checkboard (void ) {char buf[64 ];int i =getenv_f ("serial#" , buf,sizeof (buf)); -puts ("Board: AcTux-1 rev." ); -putc (ACTUX1_BOARDREL +'A' -1 ); +puts ("Board: AcTux-1 rev." ); +putc (ACTUX1_BOARDREL +'A' -1 );if (i >0 ) {puts (", serial# " );puts (buf); } -putc ('\n' ); +putc ('\n' ); -return (0 ); +return 0 ; }/*************************************************************************
@@ -110,39 +118,36 @@ int checkboard (void)* 1 = Rev. A * 2 = Rev. B *************************************************************************/ -u32 get_board_rev (void ) +u32 get_board_rev (void ) {return ACTUX1_BOARDREL ; } -int dram_init (void ) +int dram_init (void ) { - gd->bd->bi_dram[0 ].start =PHYS_SDRAM_1 ; - gd->bd->bi_dram[0 ].size =PHYS_SDRAM_1_SIZE ; - -return (0 ); + gd->ram_size =get_ram_size (CONFIG_SYS_SDRAM_BASE ,128 <<20 ); +return 0 ; } -#if defined(CONFIG_CMD_PCI ) || defined(CONFIG_PCI ) -extern struct pci_controller hose; -extern void pci_ixp_init (struct pci_controller *hose); -void pci_init_board (void ) +#ifdef CONFIG_PCI +struct pci_controller hose; + +void pci_init_board (void ) { -extern void pci_ixp_init (struct pci_controller *hose); -pci_ixp_init (&hose); +pci_ixp_init (&hose); }#endif -void reset_phy (void ) +void reset_phy (void ) {u16 id1, id2;/* initialize the PHY */ -miiphy_reset ("NPE0" ,CONFIG_PHY_ADDR ); +miiphy_reset ("NPE0" ,CONFIG_PHY_ADDR ); -miiphy_read ("NPE0" ,CONFIG_PHY_ADDR ,MII_PHYSID1 , &id1); -miiphy_read ("NPE0" ,CONFIG_PHY_ADDR ,MII_PHYSID2 , &id2); +miiphy_read ("NPE0" ,CONFIG_PHY_ADDR ,MII_PHYSID1 , &id1); +miiphy_read ("NPE0" ,CONFIG_PHY_ADDR ,MII_PHYSID2 , &id2); id2 &=0xFFF0 ;/* mask out revision bits */
@@ -153,9 +158,9 @@ void reset_phy (void)* LED2 (unused) = LINK, * LED3(red) = Coll */ -miiphy_write ("NPE0" ,CONFIG_PHY_ADDR ,20 ,0xD432 ); +miiphy_write ("NPE0" ,CONFIG_PHY_ADDR ,20 ,0xD432 ); }else if (id1 ==0x143 && id2 ==0xbc30 ) {/* BCM5241: default values are OK */ }else -printf ("unknown ethernet PHY ID: %x %x\n" , id1, id2); +printf ("unknown ethernet PHY ID: %x %x\n" , id1, id2); }
board/actux1/config.mk deleted +0 -4
@@ -1,4 +0,0 @@ -CONFIG_SYS_TEXT_BASE = 0x00e00000 - -# include NPE ethernet driver -BOARDLIBS = arch/arm/cpu/ixp/npe/libnpe.o
board/actux1/u-boot.lds +29 -12
61 lines not on this page · raw message
boards.cfg +4 -1
@@ -151,7 +151,10 @@ smdkc100 arm armv7 smdkc100 samsung s5pc210_universal arm armv7 universal_c210 samsung s5pc2xx harmony arm armv7 harmony nvidia tegra2 seaboard arm armv7 seaboard nvidia tegra2 -actux1 arm ixp +actux1_4_16 arm ixp actux1 - - actux1:FLASH2X2 +actux1_8_16 arm ixp actux1 - - actux1:FLASH1X8 +actux1_4_32 arm ixp actux1 - - actux1:FLASH2X2,RAM_32MB +actux1_8_32 arm ixp actux1 - - actux1:FLASH1X8,RAM_32MB actux2 arm ixp actux3 arm ixp actux4 arm ixp
include/configs/actux1.h +36 -26
165 lines not on this page · raw message
Signature · 1 line
1.7.2.5
PATCH v5 9/17 update/fix AcTux2 board
In reply to Michael Schwingen---
Changes for V2:
- move -ffunction-sections/--gc-sections to board config.mk
- add wildcard to bss segment in linker script
Changes for V3:
- use I/O accessors
- coding style fixes
- use get_ram_size in dram_init
- remove config.mk
- remove unused definitions from config.h
- add CONFIG_BOARD_SIZE_LIMIT
- add CONFIG_MII_NPE0_FIXEDLINK definition
Changes for V4:
- add changelog
- merge __bss_end change in u-boot.lds from master
Changes for V5:
board/actux2/actux2.c | 93 +++++++++++++++++++++++---------------------- board/actux2/config.mk | 4 -- board/actux2/u-boot.lds | 46 ++++++++++++++-------- include/configs/actux2.h | 35 +++++++++++------ 4 files changed, 100 insertions(+), 78 deletions(-) delete mode 100644 board/actux2/config.mk
board/actux2/actux2.c +48 -45
@@ -43,50 +43,55 @@DECLARE_GLOBAL_DATA_PTR ; -int board_init (void ) +int board_early_init_f (void ) +{ +/* CS1: IPAC-X */ +writel (0x94d10013 ,IXP425_EXP_CS1 ); +/* CS5: Debug port */ +writel (0x9d520003 ,IXP425_EXP_CS5 ); +/* CS6: HW release register */ +writel (0x81860001 ,IXP425_EXP_CS6 ); +/* CS7: LEDs */ +writel (0x80900003 ,IXP425_EXP_CS7 ); + +return 0 ; +} + +int board_init (void ) { gd->bd->bi_arch_number =MACH_TYPE_ACTUX2 ;/* adress of boot parameters */ gd->bd->bi_boot_params =0x00000100 ; -GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_IORST ); -GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_ETHRST ); -GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_DSR ); -GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_DCD ); +GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_IORST ); +GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_ETHRST ); +GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_DSR ); +GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_DCD ); -GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_IORST ); -GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_ETHRST ); +GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_IORST ); +GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_ETHRST ); -GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_DSR ); -GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_DCD ); +GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_DSR ); +GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_DCD ); -/* Setup GPIO's for Interrupt inputs */ -GPIO_OUTPUT_DISABLE (CONFIG_SYS_GPIO_DBGINT ); -GPIO_OUTPUT_DISABLE (CONFIG_SYS_GPIO_ETHINT ); +/* Setup GPIOs for Interrupt inputs */ +GPIO_OUTPUT_DISABLE (CONFIG_SYS_GPIO_DBGINT ); +GPIO_OUTPUT_DISABLE (CONFIG_SYS_GPIO_ETHINT ); -/* Setup GPIO's for 33MHz clock output */ -GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_PCI_CLK ); -GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_EXTBUS_CLK ); - *IXP425_GPIO_GPCLKR =0x011001FF ; +/* Setup GPIOs for 33MHz clock output */ +GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_PCI_CLK ); +GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_EXTBUS_CLK ); +writel (0x011001FF ,IXP425_GPIO_GPCLKR ); -/* CS1: IPAC-X */ - *IXP425_EXP_CS1 =0x94d10013 ; -/* CS5: Debug port */ - *IXP425_EXP_CS5 =0x9d520003 ; -/* CS6: HW release register */ - *IXP425_EXP_CS6 =0x81860001 ; -/* CS7: LEDs */ - *IXP425_EXP_CS7 =0x80900003 ; +udelay (533 ); +GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_IORST ); +GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_ETHRST ); -udelay (533 ); -GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_IORST ); -GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_ETHRST ); - -ACTUX2_LED1 (1 ); -ACTUX2_LED2 (0 ); -ACTUX2_LED3 (0 ); -ACTUX2_LED4 (0 ); +ACTUX2_LED1 (1 ); +ACTUX2_LED2 (0 ); +ACTUX2_LED3 (0 ); +ACTUX2_LED4 (0 );return 0 ; }
@@ -94,29 +99,27 @@ int board_init (void)/* * Check Board Identity */ -int checkboard (void ) +int checkboard (void ) {char buf[64 ];int i =getenv_f ("serial#" , buf,sizeof (buf)); -puts ("Board: AcTux-2 rev." ); -putc (ACTUX2_BOARDREL +'A' -1 ); +puts ("Board: AcTux-2 rev." ); +putc (ACTUX2_BOARDREL +'A' -1 );if (i >0 ) {puts (", serial# " );puts (buf); } -putc ('\n' ); +putc ('\n' ); -return (0 ); +return 0 ; } -int dram_init (void ) +int dram_init (void ) { - gd->bd->bi_dram[0 ].start =PHYS_SDRAM_1 ; - gd->bd->bi_dram[0 ].size =PHYS_SDRAM_1_SIZE ; - -return (0 ); + gd->ram_size =get_ram_size (CONFIG_SYS_SDRAM_BASE ,128 <<20 ); +return 0 ; }/*************************************************************************
@@ -125,13 +128,13 @@ int dram_init (void)* 1 = Rev. A * 2 = Rev. B *************************************************************************/ -u32 get_board_rev (void ) +u32 get_board_rev (void ) {return ACTUX2_BOARDREL ; } -void reset_phy (void ) +void reset_phy (void ) {/* init IcPlus IP175C ethernet switch to native IP175C mode */ -miiphy_write ("NPE0" ,29 ,31 ,0x175C ); +miiphy_write ("NPE0" ,29 ,31 ,0x175C ); }
board/actux2/config.mk deleted +0 -4
@@ -1,4 +0,0 @@ -CONFIG_SYS_TEXT_BASE = 0x00e00000 - -# include NPE ethernet driver -BOARDLIBS = arch/arm/cpu/ixp/npe/libnpe.o
board/actux2/u-boot.lds +29 -17
73 lines not on this page · raw message
include/configs/actux2.h +23 -12
@@ -37,12 +37,12 @@#define CONFIG_BAUDRATE 115200#define CONFIG_BOOTDELAY 5#define CONFIG_ZERO_BOOTDELAY_CHECK /* check for keypress on bootdelay==0 */ +#define CONFIG_BOARD_EARLY_INIT_F 1 +#define CONFIG_SYS_LDSCRIPT "board/actux2/u-boot.lds"/*************************************************************** * U-boot generic defines start here. ***************************************************************/ -#undef CONFIG_USE_IRQ -/* Size of malloc() pool */ #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 128*1024)
@@ -84,8 +84,9 @@#define CONFIG_SYS_MEMTEST_START 0x00400000#define CONFIG_SYS_MEMTEST_END 0x00800000 -/* spec says 66.666 MHz, but it appears to be 33 */ -#define CONFIG_SYS_HZ 3333333 +/* timer clock - 2* OSC_IN system clock */ +#define CONFIG_IXP425_TIMER_CLK 66666666 +#define CONFIG_SYS_HZ 1000/* default load address */ #define CONFIG_SYS_LOAD_ADDR 0x00010000
@@ -100,10 +101,6 @@* The stack sizes are set up in start.S using the settings below */ #define CONFIG_STACKSIZE (128*1024)/* regular stack */ -#ifdef CONFIG_USE_IRQ -# define CONFIG_STACKSIZE_IRQ (4*1024)/* IRQ stack */ -# define CONFIG_STACKSIZE_FIQ (4*1024)/* FIQ stack */ -#endif /* Expansion bus settings */ #define CONFIG_SYS_EXP_CS0 0xbd113042
@@ -111,7 +108,7 @@/* SDRAM settings */ #define CONFIG_NR_DRAM_BANKS 1#define PHYS_SDRAM_1 0x00000000 -#define CONFIG_SYS_DRAM_BASE 0x00000000 +#define CONFIG_SYS_SDRAM_BASE 0x00000000/* 16MB SDRAM */ #define CONFIG_SYS_SDR_CONFIG 0x3A
@@ -121,6 +118,7 @@#define CONFIG_SYS_DRAM_SIZE 0x01000000/* FLASH organization */ +#define CONFIG_SYS_TEXT_BASE 0x50000000#define CONFIG_SYS_MAX_FLASH_BANKS 1/* max number of sectors on one chip */ #define CONFIG_SYS_MAX_FLASH_SECT 140
@@ -130,6 +128,7 @@#define CONFIG_SYS_FLASH_BASE PHYS_FLASH_1#define CONFIG_SYS_MONITOR_BASE PHYS_FLASH_1#define CONFIG_SYS_MONITOR_LEN (256 << 10) +#define CONFIG_BOARD_SIZE_LIMIT 262144/* Use common CFI driver */ #define CONFIG_SYS_FLASH_CFI
@@ -149,6 +148,11 @@#define CONFIG_PHY_ADDR 0x00/* MII PHY management */ #define CONFIG_MII 1 +/* fixed-speed switch without standard PHY registers on MII */ +#define CONFIG_MII_NPE0_FIXEDLINK 1 +#define CONFIG_MII_NPE0_SPEED 100 +#define CONFIG_MII_NPE0_FULLDUPLEX 1 +/* Number of ethernet rx buffers & descriptors */ #define CONFIG_SYS_RX_ETH_BUFFER 16#define CONFIG_RESET_PHY_R 1
@@ -183,13 +187,15 @@"npe_ucode=50040000\0" \"mtd=IXP4XX-Flash.0:256k(uboot),64k(ucode),1152k(linux),-(root)\0" \"kerneladdr=50050000\0" \ +"kernelfile=actux2/uImage\0" \ +"rootfile=actux2/rootfs\0" \"rootaddr=50170000\0" \"loadaddr=10000\0" \"updateboot_ser=mw.b 10000 ff 40000;" \" loady ${loadaddr};" \" run eraseboot writeboot\0" \"updateboot_net=mw.b 10000 ff 40000;" \ -" tftp ${loadaddr} u-boot.bin;" \ +" tftp ${loadaddr} actux2/u-boot.bin;" \" run eraseboot writeboot\0" \"eraseboot=protect off 50000000 50003fff;" \" protect off 50006000 5003ffff;" \
@@ -197,8 +203,9 @@" erase 50006000 5003ffff\0" \"writeboot=cp.b 10000 50000000 4000;" \" cp.b 16000 50006000 3a000\0" \ -"eraseenv=protect off 50004000 50005fff;" \ -" erase 50004000 50005fff\0" \ +"updateucode=loady;" \ +" era ${npe_ucode} +${filesize};" \ +" cp.b ${loadaddr} ${npe_ucode} ${filesize}\0" \"updateroot=tftp ${loadaddr} ${rootfile};" \" era ${rootaddr} +${filesize};" \" cp.b ${loadaddr} ${rootaddr} ${filesize}\0" \
@@ -217,4 +224,8 @@" tftpboot ${loadaddr} ${kernelfile};" \" bootm\0" +/* additions for new relocation code, must be added to all boards */ +#define CONFIG_SYS_INIT_SP_ADDR \ + (CONFIG_SYS_SDRAM_BASE + 0x1000 - GENERATED_GBL_DATA_SIZE) +#endif /* __CONFIG_H */
Signature · 1 line
1.7.2.5
PATCH v5 10/17 update/fix AcTux3 board
In reply to Michael Schwingen---
Changes for V2:
- move -ffunction-sections/--gc-sections to board config.mk
- add wildcard to bss segment in linker script
Changes for V3:
- use I/O accessors
- coding style fixes
- use get_ram_size in dram_init
- remove config.mk
- remove unused definitions from config.h
- add CONFIG_BOARD_SIZE_LIMIT
- add CONFIG_MII_NPE0_FIXEDLINK definition
Changes for V4:
- add changelog
- merge __bss_end change in u-boot.lds from master
Changes for V5:
board/actux3/actux3.c | 120 +++++++++++++++++++++++---------------------- board/actux3/config.mk | 4 -- board/actux3/u-boot.lds | 52 ++++++++++++-------- include/configs/actux3.h | 37 +++++++++----- 4 files changed, 117 insertions(+), 96 deletions(-) delete mode 100644 board/actux3/config.mk
board/actux3/actux3.c +61 -59
@@ -36,72 +36,76 @@#include <malloc.h> #include <asm/arch/ixp425.h> #include <asm/io.h> -#include <miiphy.h> -#include "actux3_hw.h" DECLARE_GLOBAL_DATA_PTR ; -int board_init (void ) +int board_early_init_f (void ) +{ +/* CS1: IPAC-X */ +writel (0x94d10013 ,IXP425_EXP_CS1 ); +/* CS5: Debug port */ +writel (0x9d520003 ,IXP425_EXP_CS5 ); +/* CS6: Release/Option register */ +writel (0x81860001 ,IXP425_EXP_CS6 ); +/* CS7: LEDs */ +writel (0x80900003 ,IXP425_EXP_CS7 ); + +return 0 ; +} + +int board_init (void ) { gd->bd->bi_arch_number =MACH_TYPE_ACTUX3 ;/* adress of boot parameters */ gd->bd->bi_boot_params =0x00000100 ; -GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_IORST ); -GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_ETHRST ); -GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_DSR ); -GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_DCD ); -GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_LED5_GN ); -GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_LED6_RT ); -GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_LED6_GN ); +GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_IORST ); +GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_ETHRST ); +GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_DSR ); +GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_DCD ); +GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_LED5_GN ); +GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_LED6_RT ); +GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_LED6_GN ); -GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_IORST ); -GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_ETHRST ); +GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_IORST ); +GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_ETHRST ); -GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_DSR ); -GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_DCD ); +GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_DSR ); +GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_DCD ); -GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_LED5_GN ); -GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_LED6_RT ); -GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_LED6_GN ); +GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_LED5_GN ); +GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_LED6_RT ); +GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_LED6_GN );/* * Setup GPIO's for Interrupt inputs */ -GPIO_OUTPUT_DISABLE (CONFIG_SYS_GPIO_DBGINT ); -GPIO_OUTPUT_DISABLE (CONFIG_SYS_GPIO_ETHINT ); +GPIO_OUTPUT_DISABLE (CONFIG_SYS_GPIO_DBGINT ); +GPIO_OUTPUT_DISABLE (CONFIG_SYS_GPIO_ETHINT );/* * Setup GPIO's for 33MHz clock output */ -GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_PCI_CLK ); -GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_EXTBUS_CLK ); - *IXP425_GPIO_GPCLKR =0x011001FF ; - -/* CS1: IPAC-X */ - *IXP425_EXP_CS1 =0x94d10013 ; -/* CS5: Debug port */ - *IXP425_EXP_CS5 =0x9d520003 ; -/* CS6: Release/Option register */ - *IXP425_EXP_CS6 =0x81860001 ; -/* CS7: LEDs */ - *IXP425_EXP_CS7 =0x80900003 ; - -udelay (533 ); -GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_IORST ); -GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_ETHRST ); - -ACTUX3_LED1_RT (1 ); -ACTUX3_LED1_GN (0 ); -ACTUX3_LED2_RT (0 ); -ACTUX3_LED2_GN (0 ); -ACTUX3_LED3_RT (0 ); -ACTUX3_LED3_GN (0 ); -ACTUX3_LED4_GN (0 ); -ACTUX3_LED5_RT (0 ); +GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_PCI_CLK ); +GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_EXTBUS_CLK ); +writel (0x011001FF ,IXP425_GPIO_GPCLKR ); + +/* we need a minimum PCI reset pulse width after enabling the clock */ +udelay (533 ); +GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_IORST ); +GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_ETHRST ); + +ACTUX3_LED1_RT (1 ); +ACTUX3_LED1_GN (0 ); +ACTUX3_LED2_RT (0 ); +ACTUX3_LED2_GN (0 ); +ACTUX3_LED3_RT (0 ); +ACTUX3_LED3_GN (0 ); +ACTUX3_LED4_GN (0 ); +ACTUX3_LED5_RT (0 );return 0 ; }
@@ -109,21 +113,21 @@ int board_init (void)/* * Check Board Identity */ -int checkboard (void ) +int checkboard (void ) {char buf[64 ];int i =getenv_f ("serial#" , buf,sizeof (buf)); -puts ("Board: AcTux-3 rev." ); -putc (ACTUX3_BOARDREL +'A' -1 ); +puts ("Board: AcTux-3 rev." ); +putc (ACTUX3_BOARDREL +'A' -1 );if (i >0 ) {puts (", serial# " );puts (buf); } -putc ('\n' ); +putc ('\n' ); -return (0 ); +return 0 ; }/*************************************************************************
@@ -132,34 +136,32 @@ int checkboard (void)* 1 = Rev. A * 2 = Rev. B *************************************************************************/ -u32 get_board_rev (void ) +u32 get_board_rev (void ) {return ACTUX3_BOARDREL ; } -int dram_init (void ) +int dram_init (void ) { - gd->bd->bi_dram[0 ].start =PHYS_SDRAM_1 ; - gd->bd->bi_dram[0 ].size =PHYS_SDRAM_1_SIZE ; - -return (0 ); + gd->ram_size =get_ram_size (CONFIG_SYS_SDRAM_BASE ,128 <<20 ); +return 0 ; } -void reset_phy (void ) +void reset_phy (void ) {int i;/* initialize the PHY */ -miiphy_reset ("NPE0" ,CONFIG_PHY_ADDR ); +miiphy_reset ("NPE0" ,CONFIG_PHY_ADDR );/* all LED outputs = Link/Act */ -miiphy_write ("NPE0" ,CONFIG_PHY_ADDR ,0x16 ,0x0AAA ); +miiphy_write ("NPE0" ,CONFIG_PHY_ADDR ,0x16 ,0x0AAA );/* * The Marvell 88E6060 switch comes up with all ports disabled. * set all ethernet switch ports to forwarding state */ for (i =1 ; i <=5 ; i++) -miiphy_write ("NPE0" ,CONFIG_PHY_ADDR +8 + i,0x04 ,0x03 ); +miiphy_write ("NPE0" ,CONFIG_PHY_ADDR +8 + i,0x04 ,0x03 ); }
board/actux3/config.mk deleted +0 -4
@@ -1,4 +0,0 @@ -CONFIG_SYS_TEXT_BASE = 0x00e00000 - -# include NPE ethernet driver -BOARDLIBS = arch/arm/cpu/ixp/npe/libnpe.o
board/actux3/u-boot.lds +32 -20
76 lines not on this page · raw message
include/configs/actux3.h +24 -13
@@ -37,12 +37,12 @@#define CONFIG_BAUDRATE 115200#define CONFIG_BOOTDELAY 3#define CONFIG_ZERO_BOOTDELAY_CHECK /* check for keypress on bootdelay==0 */ +#define CONFIG_BOARD_EARLY_INIT_F 1 +#define CONFIG_SYS_LDSCRIPT "board/actux3/u-boot.lds"/*************************************************************** * U-boot generic defines start here. ***************************************************************/ -#undef CONFIG_USE_IRQ -/* Size of malloc() pool */ #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 128*1024)
@@ -82,8 +82,9 @@#define CONFIG_SYS_MEMTEST_START 0x00400000#define CONFIG_SYS_MEMTEST_END 0x00800000 -/* spec says 66.666 MHz, but it appears to be 33 */ -#define CONFIG_SYS_HZ 3333333 +/* timer clock - 2* OSC_IN system clock */ +#define CONFIG_IXP425_TIMER_CLK 66666666 +#define CONFIG_SYS_HZ 1000/* default load address */ #define CONFIG_SYS_LOAD_ADDR 0x00010000
@@ -99,10 +100,6 @@* The stack sizes are set up in start.S using the settings below */ #define CONFIG_STACKSIZE (128*1024)/* regular stack */ -#ifdef CONFIG_USE_IRQ -# define CONFIG_STACKSIZE_IRQ (4*1024)/* IRQ stack */ -# define CONFIG_STACKSIZE_FIQ (4*1024)/* FIQ stack */ -#endif /* Expansion bus settings */ #define CONFIG_SYS_EXP_CS0 0xbd113442
@@ -110,7 +107,7 @@/* SDRAM settings */ #define CONFIG_NR_DRAM_BANKS 1#define PHYS_SDRAM_1 0x00000000 -#define CONFIG_SYS_DRAM_BASE 0x00000000 +#define CONFIG_SYS_SDRAM_BASE 0x00000000/* 16MB SDRAM */ #define CONFIG_SYS_SDR_CONFIG 0x3A
@@ -120,6 +117,7 @@#define CONFIG_SYS_DRAM_SIZE 0x01000000/* FLASH organization */ +#define CONFIG_SYS_TEXT_BASE 0x50000000#define CONFIG_SYS_MAX_FLASH_BANKS 1/* max number of sectors on one chip */ #define CONFIG_SYS_MAX_FLASH_SECT 140
@@ -129,6 +127,7 @@#define CONFIG_SYS_FLASH_BASE PHYS_FLASH_1#define CONFIG_SYS_MONITOR_BASE PHYS_FLASH_1#define CONFIG_SYS_MONITOR_LEN (256 << 10) +#define CONFIG_BOARD_SIZE_LIMIT 262144/* Use common CFI driver */ #define CONFIG_SYS_FLASH_CFI
@@ -149,6 +148,11 @@#define CONFIG_PHY_ADDR 0x10/* MII PHY management */ #define CONFIG_MII 1 +/* fixed-speed switch without standard PHY registers on MII */ +#define CONFIG_MII_NPE0_FIXEDLINK 1 +#define CONFIG_MII_NPE0_SPEED 100 +#define CONFIG_MII_NPE0_FULLDUPLEX 1 +/* Number of ethernet rx buffers & descriptors */ #define CONFIG_SYS_RX_ETH_BUFFER 16#define CONFIG_RESET_PHY_R 1
@@ -183,13 +187,15 @@"npe_ucode=50040000\0" \"mtd=IXP4XX-Flash.0:256k(uboot),64k(ucode),1152k(linux),-(root)\0" \"kerneladdr=50050000\0" \ +"kernelfile=actux3/uImage\0" \ +"rootfile=actux3/rootfs\0" \"rootaddr=50170000\0" \"loadaddr=10000\0" \"updateboot_ser=mw.b 10000 ff 40000;" \" loady ${loadaddr};" \" run eraseboot writeboot\0" \"updateboot_net=mw.b 10000 ff 40000;" \ -" tftp ${loadaddr} u-boot.bin;" \ +" tftp ${loadaddr} actux3/u-boot.bin;" \" run eraseboot writeboot\0" \"eraseboot=protect off 50000000 50003fff;" \" protect off 50006000 5003ffff;" \
@@ -197,8 +203,9 @@" erase 50006000 5003ffff\0" \"writeboot=cp.b 10000 50000000 4000;" \" cp.b 16000 50006000 3a000\0" \ -"eraseenv=protect off 50004000 50005fff;" \ -" erase 50004000 50005fff\0" \ +"updateucode=loady;" \ +" era ${npe_ucode} +${filesize};" \ +" cp.b ${loadaddr} ${npe_ucode} ${filesize}\0" \"updateroot=tftp ${loadaddr} ${rootfile};" \" era ${rootaddr} +${filesize};" \" cp.b ${loadaddr} ${rootaddr} ${filesize}\0" \
@@ -209,7 +216,7 @@" rootfstype=squashfs,jffs2 init=/etc/preinit\0" \"netargs=setenv bootargs mtdparts=${mtd} root=/dev/mtdblock3" \" rootfstype=squashfs,jffs2 init=/etc/preinit\0" \ -"addtty=setenv bootargs ${bootargs} console=ttyS0,${baudrate}\0" \ +"addtty=setenv bootargs ${bootargs} console=ttyS1,${baudrate}\0" \"addeth=setenv bootargs ${bootargs} ethaddr=${ethaddr}\0" \"boot_flash=run flashargs addtty addeth;" \" bootm ${kerneladdr}\0" \
@@ -217,4 +224,8 @@" tftpboot ${loadaddr} ${kernelfile};" \" bootm\0" +/* additions for new relocation code, must be added to all boards */ +#define CONFIG_SYS_INIT_SP_ADDR \ + (CONFIG_SYS_SDRAM_BASE + 0x1000 - GENERATED_GBL_DATA_SIZE) +#endif /* __CONFIG_H */
Signature · 1 line
1.7.2.5
PATCH v5 11/17 update/fix AcTux4 board
In reply to Michael Schwingen---
Changes for V2:
Changes for V3:
- coding style / indentation cleanup
- move config.h changes to AcTux2/AcTux3 board patches
Changes for V4:
- add changelog
Changes for V5:
board/actux4/actux4.c | 103 ++++++++++++++++++++++++++------------------- board/actux4/config.mk | 4 -- include/configs/actux4.h | 39 ++++++++++++----- 3 files changed, 86 insertions(+), 60 deletions(-) delete mode 100644 board/actux4/config.mk
board/actux4/actux4.c +59 -44
@@ -35,92 +35,107 @@#include <command.h> #include <malloc.h> #include <asm/arch/ixp425.h> - +#include <asm/io.h> #include <miiphy.h> +#ifdef CONFIG_PCI +#include <pci.h> +#include <asm/arch/ixp425pci.h> +#endif #include "actux4_hw.h" DECLARE_GLOBAL_DATA_PTR ; -int board_init (void ) +int board_early_init_f (void ) +{ +writel (0xbd113c42 ,IXP425_EXP_CS1 ); +return 0 ; +} + +int board_init (void ) { gd->bd->bi_arch_number =MACH_TYPE_ACTUX4 ;/* adress of boot parameters */ gd->bd->bi_boot_params =0x00000100 ; -GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_nPWRON); -GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_nPWRON); +GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_nPWRON); +GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_nPWRON); -GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_IORST ); -GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_IORST ); +GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_IORST ); +GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_IORST );/* led not populated on board*/ -GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_LED3 ); -GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_LED3 ); +GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_LED3 ); +GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_LED3 );/* middle LED */ -GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_LED2 ); -GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_LED2 ); +GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_LED2 ); +GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_LED2 );/* right LED */ /* weak pulldown = LED weak on */ -GPIO_OUTPUT_DISABLE (CONFIG_SYS_GPIO_LED1 ); -GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_LED1 ); +GPIO_OUTPUT_DISABLE (CONFIG_SYS_GPIO_LED1 ); +GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_LED1 );/* Setup GPIO's for Interrupt inputs */ -GPIO_OUTPUT_DISABLE (CONFIG_SYS_GPIO_USBINTA ); -GPIO_OUTPUT_DISABLE (CONFIG_SYS_GPIO_USBINTB ); -GPIO_OUTPUT_DISABLE (CONFIG_SYS_GPIO_USBINTC ); -GPIO_OUTPUT_DISABLE (CONFIG_SYS_GPIO_RTCINT ); -GPIO_OUTPUT_DISABLE (CONFIG_SYS_GPIO_PCI_INTA ); -GPIO_OUTPUT_DISABLE (CONFIG_SYS_GPIO_PCI_INTB ); - -GPIO_INT_ACT_LOW_SET (CONFIG_SYS_GPIO_USBINTA ); -GPIO_INT_ACT_LOW_SET (CONFIG_SYS_GPIO_USBINTB ); -GPIO_INT_ACT_LOW_SET (CONFIG_SYS_GPIO_USBINTC ); -GPIO_INT_ACT_LOW_SET (CONFIG_SYS_GPIO_RTCINT ); -GPIO_INT_ACT_LOW_SET (CONFIG_SYS_GPIO_PCI_INTA ); -GPIO_INT_ACT_LOW_SET (CONFIG_SYS_GPIO_PCI_INTB ); +GPIO_OUTPUT_DISABLE (CONFIG_SYS_GPIO_USBINTA ); +GPIO_OUTPUT_DISABLE (CONFIG_SYS_GPIO_USBINTB ); +GPIO_OUTPUT_DISABLE (CONFIG_SYS_GPIO_USBINTC ); +GPIO_OUTPUT_DISABLE (CONFIG_SYS_GPIO_RTCINT ); +GPIO_OUTPUT_DISABLE (CONFIG_SYS_GPIO_PCI_INTA ); +GPIO_OUTPUT_DISABLE (CONFIG_SYS_GPIO_PCI_INTB ); + +GPIO_INT_ACT_LOW_SET (CONFIG_SYS_GPIO_USBINTA ); +GPIO_INT_ACT_LOW_SET (CONFIG_SYS_GPIO_USBINTB ); +GPIO_INT_ACT_LOW_SET (CONFIG_SYS_GPIO_USBINTC ); +GPIO_INT_ACT_LOW_SET (CONFIG_SYS_GPIO_RTCINT ); +GPIO_INT_ACT_LOW_SET (CONFIG_SYS_GPIO_PCI_INTA ); +GPIO_INT_ACT_LOW_SET (CONFIG_SYS_GPIO_PCI_INTB );/* Setup GPIO's for 33MHz clock output */ - *IXP425_GPIO_GPCLKR =0x011001FF ; -GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_EXTBUS_CLK ); -GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_PCI_CLK ); - - *IXP425_EXP_CS1 =0xbd113c42 ; +writel (0x011001FF ,IXP425_GPIO_GPCLKR ); +GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_EXTBUS_CLK ); +GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_PCI_CLK ); -udelay (10000 ); -GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_IORST ); -udelay (10000 ); -GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_IORST ); -udelay (10000 ); -GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_IORST ); +udelay (10000 ); +GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_IORST ); +udelay (10000 ); +GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_IORST ); +udelay (10000 ); +GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_IORST );return 0 ; }/* Check Board Identity */ -int checkboard (void ) +int checkboard (void ) { -puts ("Board: AcTux-4\n" ); -return (0 ); +puts ("Board: AcTux-4\n" ); +return 0 ; } -int dram_init (void ) +int dram_init (void ) { - gd->bd->bi_dram[0 ].start =PHYS_SDRAM_1 ; - gd->bd->bi_dram[0 ].size =PHYS_SDRAM_1_SIZE ; + gd->ram_size =get_ram_size (CONFIG_SYS_SDRAM_BASE ,128 <<20 ); +return 0 ; +} -return (0 ); +#ifdef CONFIG_PCI +struct pci_controller hose; + +void pci_init_board (void ) +{ +pci_ixp_init (&hose); } +#endif /* * Hardcoded flash setup: * Flash 0 is a non-CFI SST 39VF020 flash, 8 bit flash / 8 bit bus. * Flash 1 is an Intel *16 flash using the CFI driver. */ -ulong board_flash_get_legacy (ulong base,int banknum,flash_info_t * info) +ulong board_flash_get_legacy (ulong base,int banknum,flash_info_t *info) {if (banknum ==0 ) {/* non-CFI boot flash */ info->portwidth =1 ;
board/actux4/config.mk deleted +0 -4
@@ -1,4 +0,0 @@ -CONFIG_SYS_TEXT_BASE = 0x00e00000 - -# include NPE ethernet driver -BOARDLIBS = arch/arm/cpu/ixp/npe/libnpe.o
include/configs/actux4.h +27 -12
@@ -37,12 +37,11 @@#define CONFIG_BAUDRATE 115200#define CONFIG_BOOTDELAY 3#define CONFIG_ZERO_BOOTDELAY_CHECK /* check for keypress on bootdelay==0 */ +#define CONFIG_BOARD_EARLY_INIT_F 1/*************************************************************** * U-boot generic defines start here. ***************************************************************/ -#undef CONFIG_USE_IRQ -/* Size of malloc() pool */ #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 128*1024)
@@ -54,6 +53,15 @@#define CONFIG_CMD_ELF +#define CONFIG_PCI +#ifdef CONFIG_PCI +#define CONFIG_CMD_PCI +#define CONFIG_PCI_PNP +#define CONFIG_IXP_PCI +#define CONFIG_PCI_SCAN_SHOW +#define CONFIG_CMD_PCI_ENUM +#endif +#define CONFIG_BOOTCOMMAND "run boot_flash"/* enable passing of ATAGs */ #define CONFIG_CMDLINE_TAG 1
@@ -81,8 +89,9 @@#define CONFIG_SYS_MEMTEST_START 0x00400000#define CONFIG_SYS_MEMTEST_END 0x00800000 -/* spec says 66.666 MHz, but it appears to be 33 */ -#define CONFIG_SYS_HZ 3333333 +/* timer clock - 2* OSC_IN system clock */ +#define CONFIG_IXP425_TIMER_CLK 66000000 +#define CONFIG_SYS_HZ 1000/* default load address */ #define CONFIG_SYS_LOAD_ADDR 0x00010000
@@ -97,10 +106,6 @@* The stack sizes are set up in start.S using the settings below */ #define CONFIG_STACKSIZE (128*1024)/* regular stack */ -#ifdef CONFIG_USE_IRQ -# define CONFIG_STACKSIZE_IRQ (4*1024)/* IRQ stack */ -# define CONFIG_STACKSIZE_FIQ (4*1024)/* FIQ stack */ -#endif /* Expansion bus settings */ #define CONFIG_SYS_EXP_CS0 0xbd113003
@@ -108,7 +113,7 @@/* SDRAM settings */ #define CONFIG_NR_DRAM_BANKS 1#define PHYS_SDRAM_1 0x00000000 -#define CONFIG_SYS_DRAM_BASE 0x00000000 +#define CONFIG_SYS_SDRAM_BASE 0x00000000/* 32MB SDRAM */ #define CONFIG_SYS_SDR_CONFIG 0x18
@@ -118,6 +123,7 @@#define CONFIG_SYS_DRAM_SIZE 0x02000000/* FLASH organization */ +#define CONFIG_SYS_TEXT_BASE 0x50000000#define CONFIG_SYS_MAX_FLASH_BANKS 2/* max # of sectors per chip */ #define CONFIG_SYS_MAX_FLASH_SECT 70
@@ -128,6 +134,7 @@#define CONFIG_SYS_FLASH_BASE PHYS_FLASH_1#define CONFIG_SYS_MONITOR_BASE PHYS_FLASH_1#define CONFIG_SYS_MONITOR_LEN (252 << 10) +#define CONFIG_BOARD_SIZE_LIMIT 258048/* Use common CFI driver */ #define CONFIG_SYS_FLASH_CFI
@@ -152,6 +159,7 @@#define CONFIG_PHY_ADDR 0x1C/* MII PHY management */ #define CONFIG_MII 1 +/* Number of ethernet rx buffers & descriptors */ #define CONFIG_SYS_RX_ETH_BUFFER 16
@@ -180,19 +188,22 @@"mtd=IXP4XX-Flash.0:252k(uboot),4k(uboot_env);" \"IXP4XX-Flash.1:128k(ucode),1280k(linux),-(root)\0" \"kerneladdr=51020000\0" \ +"kernelfile=actux4/uImage\0" \ +"rootfile=actux4/rootfs\0" \"rootaddr=51160000\0" \"loadaddr=10000\0" \"updateboot_ser=mw.b 10000 ff 40000;" \" loady ${loadaddr};" \" run eraseboot writeboot\0" \"updateboot_net=mw.b 10000 ff 40000;" \ -" tftp ${loadaddr} u-boot.bin;" \ +" tftp ${loadaddr} actux4/u-boot.bin;" \" run eraseboot writeboot\0" \"eraseboot=protect off 50000000 5003efff;" \" erase 50000000 +${filesize}\0" \"writeboot=cp.b 10000 50000000 ${filesize}\0" \ -"eraseenv=protect off 5003f000 5003ffff;" \ -" erase 5003f000 5003ffff\0" \ +"updateucode=loady;" \ +" era ${npe_ucode} +${filesize};" \ +" cp.b ${loadaddr} ${npe_ucode} ${filesize}\0" \"updateroot=tftp ${loadaddr} ${rootfile};" \" era ${rootaddr} +${filesize};" \" cp.b ${loadaddr} ${rootaddr} ${filesize}\0" \
@@ -211,4 +222,8 @@" tftpboot ${loadaddr} ${kernelfile};" \" bootm\0" +/* additions for new relocation code, must be added to all boards */ +#define CONFIG_SYS_INIT_SP_ADDR \ + (CONFIG_SYS_SDRAM_BASE + 0x1000 - GENERATED_GBL_DATA_SIZE) +#endif /* __CONFIG_H */
Signature · 1 line
1.7.2.5
PATCH v5 12/17 IXP NPE: add support for fixed-speed MII ports
In reply to Michael Schwingen---
Changes for V2:
Changes for V3:
- coding style / indentation cleanup
- move config.h changes to AcTux2/AcTux3 board patches
Changes for V4:
- add changelog
Changes for V5:
arch/arm/cpu/ixp/npe/npe.c | 67 +++++++++++++++++++++++++++---------------- 1 files changed, 42 insertions(+), 25 deletions(-)
arch/arm/cpu/ixp/npe/npe.c +42 -25
@@ -359,36 +359,53 @@ static int npe_init(struct eth_device *dev, bd_t * bis)debug ("%s: 1\n" , __FUNCTION__); -miiphy_read (dev->name, p_npe->phy_no,MII_BMSR , ®_short); - -/* -* Wait if PHY is capable of autonegotiation and autonegotiation is not complete -*/ -if ((reg_short &BMSR_ANEGCAPABLE ) && !(reg_short &BMSR_ANEGCOMPLETE )) { -puts ("Waiting for PHY auto negotiation to complete" ); - i =0 ; -while (!(reg_short &BMSR_ANEGCOMPLETE )) { -/* -* Timeout reached ? -*/ -if (i >PHY_AUTONEGOTIATE_TIMEOUT ) { -puts (" TIMEOUT !\n" ); -break ; - } +#ifdef CONFIG_MII_NPE0_FIXEDLINK +if (0 == p_npe->eth_id) { + speed =CONFIG_MII_NPE0_SPEED ; + duplex =CONFIG_MII_NPE0_FULLDUPLEX ?FULL :HALF ; + } else +#endif +#ifdef CONFIG_MII_NPE1_FIXEDLINK +if (1 == p_npe->eth_id) { + speed =CONFIG_MII_NPE1_SPEED ; + duplex =CONFIG_MII_NPE1_FULLDUPLEX ?FULL :HALF ; + } else +#endif + { +miiphy_read (dev->name, p_npe->phy_no,MII_BMSR , ®_short); + +/* +* Wait if PHY is capable of autonegotiation and +* autonegotiation is not complete +*/ +if ((reg_short &BMSR_ANEGCAPABLE ) && + !(reg_short &BMSR_ANEGCOMPLETE )) { +puts ("Waiting for PHY auto negotiation to complete" ); + i =0 ; +while (!(reg_short &BMSR_ANEGCOMPLETE )) { +/* +* Timeout reached ? +*/ +if (i >PHY_AUTONEGOTIATE_TIMEOUT ) { +puts (" TIMEOUT !\n" ); +break ; + } -if ((i++ %1000 ) ==0 ) { -putc ('.' ); -miiphy_read (dev->name, p_npe->phy_no,MII_BMSR , ®_short); +if ((i++ %1000 ) ==0 ) { +putc ('.' ); +miiphy_read (dev->name, p_npe->phy_no, +MII_BMSR , ®_short); + } +udelay (1000 );/* 1 ms */ } -udelay (1000 );/* 1 ms */ +puts (" done\n" ); +/* another 500 ms (results in faster booting) */ +udelay (500000 ); } -puts (" done\n" ); -udelay (500000 );/* another 500 ms (results in faster booting) */ + speed =miiphy_speed (dev->name, p_npe->phy_no); + duplex =miiphy_duplex (dev->name, p_npe->phy_no); } - speed =miiphy_speed (dev->name, p_npe->phy_no); - duplex =miiphy_duplex (dev->name, p_npe->phy_no); -if (p_npe->print_speed) { p_npe->print_speed =0 ; printf ("ENET Speed is %d Mbps - %s duplex connection\n",
Signature · 1 line
1.7.2.5
PATCH v5 13/17 add dvlhost (dLAN 200 AV Wireless G) board
In reply to Michael Schwingen---
Changes for V2:
- move -ffunction-sections/--gc-sections to board config.mk
- add wildcard to bss segment in linker script
- add ethprime/ethrotate to default environment
Changes for V3:
- use I/O accessors
- coding style fixes
- add PCI clock/reset initialization
- use get_ram_size in dram_init
- add PCI support
- remove config.mk
- remove unused definitions from config.h
- add CONFIG_BOARD_SIZE_LIMIT
Changes for V4:
- add changelog
- add __bss_end to u-boot.lds
Changes for V5:
MAINTAINERS | 1 + board/dvlhost/Makefile | 50 +++++++++ board/dvlhost/dvlhost.c | 130 +++++++++++++++++++++++ board/dvlhost/dvlhost_hw.h | 47 +++++++++ board/dvlhost/u-boot.lds | 87 +++++++++++++++ board/dvlhost/watchdog.c | 43 ++++++++ boards.cfg | 1 + include/configs/dvlhost.h | 248 ++++++++++++++++++++++++++++++++++++++++++++ 8 files changed, 607 insertions(+), 0 deletions(-) create mode 100644 board/dvlhost/Makefile create mode 100644 board/dvlhost/dvlhost.c create mode 100644 board/dvlhost/dvlhost_hw.h create mode 100644 board/dvlhost/u-boot.lds create mode 100644 board/dvlhost/watchdog.c create mode 100644 include/configs/dvlhost.h
MAINTAINERS +1 -0
@@ -822,6 +822,7 @@ Michael Schwingen <[email protected]> actux2 xscale/ixp actux3 xscale/ixp actux4 xscale/ixp + dvlhost xscale/ixp Andrea Scian <[email protected]>
board/dvlhost/Makefile new file +50 -0
50 lines not on this page · raw message
board/dvlhost/dvlhost.c new file +130 -0
130 lines not on this page · raw message
board/dvlhost/dvlhost_hw.h new file +47 -0
47 lines not on this page · raw message
board/dvlhost/u-boot.lds new file +87 -0
87 lines not on this page · raw message
board/dvlhost/watchdog.c new file +43 -0
43 lines not on this page · raw message
boards.cfg +1 -0
@@ -158,6 +158,7 @@ actux1_8_32 arm ixp actux1 - actux2 arm ixp actux3 arm ixp actux4 arm ixp +dvlhost arm ixp ixdp425 arm ixp ixdpg425 arm ixp lpd7a400 arm lh7a40x lpd7a40x
include/configs/dvlhost.h new file +248 -0
248 lines not on this page · raw message
Signature · 1 line
1.7.2.5
PATCH v5 14/17 update/fix IXDP425 / IXDPG425 boards
In reply to Michael Schwingen---
Changes for V3:
- new in V3 (split from "update_fix some more IXP42x boards" in V2)
Changes for V4:
- add changelog
Changes for V5:
board/ixdp425/config.mk | 2 - board/ixdp425/flash.c | 427 -------------------------------------------- board/ixdp425/ixdp425.c | 155 ++++++++++++++--- boards.cfg | 2 +- include/configs/ixdp425.h | 196 ++++++++++++++------- include/configs/ixdpg425.h | 11 +- 6 files changed, 276 insertions(+), 517 deletions(-) delete mode 100644 board/ixdp425/config.mk delete mode 100644 board/ixdp425/flash.c
board/ixdp425/config.mk deleted +0 -2
@@ -1,2 +0,0 @@ -# -CONFIG_SYS_TEXT_BASE = 0x00f80000
board/ixdp425/flash.c deleted +0 -427
427 lines not on this page · raw message
board/ixdp425/ixdp425.c +133 -22
206 lines not on this page · raw message
boards.cfg +1 -1
@@ -160,7 +160,7 @@ actux3 arm ixp actux4 arm ixp dvlhost arm ixp ixdp425 arm ixp -ixdpg425 arm ixp +ixdpg425 arm ixp ixdp425 lpd7a400 arm lh7a40x lpd7a40x lpd7a404 arm lh7a40x lpd7a40x balloon3 arm pxa
include/configs/ixdp425.h +134 -62
284 lines not on this page · raw message
include/configs/ixdpg425.h +8 -3
@@ -53,9 +53,6 @@/* * Misc configuration options */ -#undef CONFIG_USE_IRQ/* we don't need IRQ/FIQ stuff */ -#define CONFIG_USE_IRQ 1/* we need IRQ stuff for timer */ -#define CONFIG_TIMER_IRQ #define CONFIG_BOOTCOUNT_LIMIT /* support for bootcount limit */ #define CONFIG_SYS_BOOTCOUNT_ADDR 0x60003000/* inside qmrg sram */
@@ -115,6 +112,7 @@#define CONFIG_SYS_MEMTEST_END 0x00800000/* 4 ... 8 MB in DRAM */ #define CONFIG_SYS_LOAD_ADDR 0x00010000/* default load address */ +#define CONFIG_IXP425_TIMER_CLK 66666666#define CONFIG_SYS_HZ 1000/* decrementer freq: 1 ms ticks */ /* valid baudrates */
@@ -179,6 +177,8 @@#define PHYS_SDRAM_1 0x00000000/* SDRAM Bank #1 */ #define PHYS_SDRAM_1_SIZE 0x02000000/* 32 MB */ +#define CONFIG_SYS_TEXT_BASE 0x50000000 +#define PHYS_FLASH_1 0x50000000/* Flash Bank #1 */ #define PHYS_FLASH_SIZE 0x01000000/* 16 MB */ #define PHYS_FLASH_BANK_SIZE 0x01000000/* 16 MB Banks */
@@ -248,4 +248,9 @@*/ #define CONFIG_SYS_CACHELINE_SIZE 32 +/* additions for new relocation code, must be added to all boards */ +#define CONFIG_SYS_SDRAM_BASE 0 +#define CONFIG_SYS_INIT_SP_ADDR \ + (CONFIG_SYS_SDRAM_BASE + 0x1000 - GENERATED_GBL_DATA_SIZE) +#endif /* __CONFIG_H */
Signature · 1 line
1.7.2.5
PATCH v5 15/17 update/fix PDNB3 board
In reply to Michael Schwingen---
Changes for V3:
- new in V3 (split from "update_fix some more IXP42x boards" in V2)
Changes for V4:
- add changelog
Changes for V5:
board/prodrive/pdnb3/config.mk | 2 -- include/configs/pdnb3.h | 10 +++++++--- 2 files changed, 7 insertions(+), 5 deletions(-) delete mode 100644 board/prodrive/pdnb3/config.mk
board/prodrive/pdnb3/config.mk deleted +0 -2
@@ -1,2 +0,0 @@ -# -CONFIG_SYS_TEXT_BASE = 0x01f00000
include/configs/pdnb3.h +7 -3
@@ -50,9 +50,6 @@/* * Misc configuration options */ -#define CONFIG_USE_IRQ 1/* we need IRQ stuff for timer */ -#define CONFIG_TIMER_IRQ -#define CONFIG_BOOTCOUNT_LIMIT /* support for bootcount limit */ #define CONFIG_SYS_BOOTCOUNT_ADDR 0x60003000/* inside qmrg sram */
@@ -117,6 +114,7 @@#define CONFIG_SYS_MEMTEST_END 0x00800000/* 4 ... 8 MB in DRAM */ #define CONFIG_SYS_LOAD_ADDR 0x00010000/* default load address */ +#define CONFIG_IXP425_TIMER_CLK 66666666#define CONFIG_SYS_HZ 1000/* decrementer freq: 1 ms ticks */ /* valid baudrates */ #define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
@@ -188,6 +186,7 @@#define PHYS_SDRAM_1 0x00000000/* SDRAM Bank #1 */ #define PHYS_SDRAM_1_SIZE 0x02000000/* 32 MB */ +#define CONFIG_SYS_TEXT_BASE 0x50000000#define CONFIG_SYS_FLASH_BASE 0x50000000#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE#if defined(CONFIG_SCPU )
@@ -345,4 +344,9 @@*/ #define CONFIG_SYS_CACHELINE_SIZE 32 +/* additions for new relocation code, must be added to all boards */ +#define CONFIG_SYS_SDRAM_BASE 0x00000000 +#define CONFIG_SYS_INIT_SP_ADDR \ + (CONFIG_SYS_SDRAM_BASE + 0x1000 - GENERATED_GBL_DATA_SIZE) +#endif /* __CONFIG_H */
Signature · 1 line
1.7.2.5
PATCH v5 16/17 IXP42x PCI rewrite
In reply to Michael Schwingenclean up IXP PCI handling: get rid of IXP-private bus scan, BAR assign etc. code and use u-boot's PCI infrastructure instead. Move board-specific PCI setup code (clock/reset) to board directory.
---
Changes for V3:
- new in V3
Changes for V4:
- add changelog
Changes for V5:
arch/arm/include/asm/arch-ixp/ixp425pci.h | 130 +------ drivers/pci/pci.c | 4 - drivers/pci/pci_indirect.c | 13 +- drivers/pci/pci_ixp.c | 612 ++++++++++------------------- 4 files changed, 210 insertions(+), 549 deletions(-)
arch/arm/include/asm/arch-ixp/ixp425pci.h +4 -126
@@ -22,88 +22,21 @@* MA 02111-1307 USA */ -#ifndef _IXP425PCI_H_ -#define _IXP425PCI_H_ +#ifndef _IXP425PCI_H +#define _IXP425PCI_H -#define TRUE 1 -#define FALSE 0#define OK 0#define ERROR -1 -#define BOOL int -#define IXP425_PCI_MAX_BAR_PER_FUNC 6 -#define IXP425_PCI_MAX_BAR (IXP425_PCI_MAX_BAR_PER_FUNC * \ - IXP425_PCI_MAX_FUNC_ON_BUS) - -enum PciBarId -{ -CSR_BAR =0 , -IO_BAR , -SD_BAR , -NO_BAR -}; - -/*Base address register descriptor*/ -typedef struct -{ -unsigned int size; -unsigned int address; -}PciBar ; - -typedef struct -{ -unsigned int bus; -unsigned int device; -unsigned int func; -unsigned int irq; -BOOL error; -unsigned short vendor_id; -unsigned short device_id; -/*We need an extra entry in this array for dummy placeholder*/ -PciBar bar[IXP425_PCI_MAX_BAR_PER_FUNC +1 ]; -}PciDevice ; +struct pci_controller ; +extern void pci_ixp_init (struct pci_controller *hose);/* Mask definitions*/ -#define IXP425_PCI_TOP_WORD_OF_LONG_MASK 0xffff0000 -#define IXP425_PCI_TOP_BYTE_OF_LONG_MASK 0xff000000 -#define IXP425_PCI_BOTTOM_WORD_OF_LONG_MASK 0x0000ffff -#define IXP425_PCI_BOTTOM_TRIBYTES_OF_LONG_MASK 0x00ffffff#define IXP425_PCI_BOTTOM_NIBBLE_OF_LONG_MASK 0x0000000f -#define IXP425_PCI_MAX_UINT32 0xffffffff - - -#define IXP425_PCI_BAR_QUERY 0xffffffff - -#define IXP425_PCI_BAR_MEM_BASE 0x100000 -#define IXP425_PCI_BAR_IO_BASE 0x000000 - -/*define the maximum number of bus segments - we support a single segment*/ -#define IXP425_PCI_MAX_BUS 1 -/*define the maximum number of cards per bus segment*/ -#define IXP425_PCI_MAX_DEV 4 -/*define the maximum number of functions per device*/ -#define IXP425_PCI_MAX_FUNC 8 -/* define the maximum number of separate functions that we can -potentially have on the bus*/ -#define IXP425_PCI_MAX_FUNC_ON_BUS (1+ IXP425_PCI_MAX_FUNC * \ - IXP425_PCI_MAX_DEV * \ - IXP425_PCI_MAX_BUS) -/*define the maximum number of BARs per function*/ -#define IXP425_PCI_MAX_BAR_PER_FUNC 6 -#define IXP425_PCI_MAX_BAR (IXP425_PCI_MAX_BAR_PER_FUNC * \ - IXP425_PCI_MAX_FUNC_ON_BUS)#define PCI_NP_CBE_BESL (4)#define PCI_NP_AD_FUNCSL (8) -#define REG_WRITE (b,o,v) (*(volatile unsigned int*)((b+o))=(v)) -#define REG_READ (b,o,v) ((v)=(*(volatile unsigned int*)((b+o)))) - -#define PCI_DELAY 500 -#define USEC_LOOP_COUNT 533 -#define PCI_SETTLE_USEC 200 -#define PCI_MIN_RESET_ASSERT_USEC 2000 -/*Register addressing definitions for PCI controller configuration and status registers*/
@@ -150,28 +83,6 @@ typedef struct#define NP_CMD_CONFIGWRITE (0xb) */ -/*define the default setting of the AHB memory base reg*/ -#define IXP425_PCI_AHBMEMBASE_DEFAULT 0x00010203 -#define IXP425_PCI_AHBIOBASE_DEFAULT 0x0 -#define IXP425_PCI_PCIMEMBASE_DEFAULT 0x0 - -/*define the default settings for the controller's BARs*/ -#ifdef IXP425_PCI_SIMPLE_MAPPING -#define IXP425_PCI_BAR_0_DEFAULT 0x00000000 -#define IXP425_PCI_BAR_1_DEFAULT 0x01000000 -#define IXP425_PCI_BAR_2_DEFAULT 0x02000000 -#define IXP425_PCI_BAR_3_DEFAULT 0x03000000 -#define IXP425_PCI_BAR_4_DEFAULT 0x00000000 -#define IXP425_PCI_BAR_5_DEFAULT 0x00000000 -#else -#define IXP425_PCI_BAR_0_DEFAULT 0x40000000 -#define IXP425_PCI_BAR_1_DEFAULT 0x41000000 -#define IXP425_PCI_BAR_2_DEFAULT 0x42000000 -#define IXP425_PCI_BAR_3_DEFAULT 0x43000000 -#define IXP425_PCI_BAR_4_DEFAULT 0x00000000 -#define IXP425_PCI_BAR_5_DEFAULT 0x00000000 -#endif -/*Configuration Port register bit definitions*/ #define PCI_CRP_WRITE BIT(16)
@@ -228,17 +139,6 @@ typedef struct#define PCI_CFG_SPECIAL_USE 0x41#define PCI_CFG_MODE 0x43 -/*Specify the initial command we send to PCI devices*/ -#define INITIAL_PCI_CMD (PCI_CMD_IO_ENABLE \ - | PCI_CMD_MEM_ENABLE \ - | PCI_CMD_MASTER_ENABLE \ - | PCI_CMD_WI_ENABLE) - -/*define the sub vendor and subsystem to be used */ -#define IXP425_PCI_SUB_VENDOR_SYSTEM 0x00000000 - -#define PCI_IRQ_LINES 4 -#define PCI_CMD_IO_ENABLE 0x0001/* IO access enable */ #define PCI_CMD_MEM_ENABLE 0x0002/* memory access enable */ #define PCI_CMD_MASTER_ENABLE 0x0004/* bus master enable */
@@ -287,26 +187,4 @@ typedef struct#define PCI_DMACTRL_PADC1 BIT(14)#define PCI_DMACTRL_PADE1 BIT(15) -/* GPIO related register */ -#undef IXP425_GPIO_GPOUTR -#undef IXP425_GPIO_GPOER -#undef IXP425_GPIO_GPINR -#undef IXP425_GPIO_GPISR -#undef IXP425_GPIO_GPIT1R -#undef IXP425_GPIO_GPIT2R -#undef IXP425_GPIO_GPCLKR - -#define IXP425_GPIO_GPOUTR 0xC8004000 -#define IXP425_GPIO_GPOER 0xC8004004 -#define IXP425_GPIO_GPINR 0xC8004008 -#define IXP425_GPIO_GPISR 0xC800400C -#define IXP425_GPIO_GPIT1R 0xC8004010 -#define IXP425_GPIO_GPIT2R 0xC8004014 -#define IXP425_GPIO_GPCLKR 0xC8004018 - -#define READ_GPIO_REG (addr,val) \ - (val) = *((volatile int *)(addr)); -#define WRITE_GPIO_REG (addr,val) \ - *((volatile int *)(addr)) = (val); -#endif
drivers/pci/pci.c +0 -4
@@ -50,7 +50,6 @@ PCI_HOSE_OP(write, byte, u8) PCI_HOSE_OP(write, word, u16) PCI_HOSE_OP(write, dword, u32) -#ifndef CONFIG_IXP425 #define PCI_OP (rw, size, type, error_code) \ int pci_##rw##_config_##size(pci_dev_t dev, int offset, type value) \ { \
@@ -71,7 +70,6 @@ PCI_OP(read, dword, u32 *, *value = 0xffffffff) PCI_OP(write, byte, u8, ) PCI_OP(write, word, u16, ) PCI_OP(write, dword, u32, ) -#endif /* CONFIG_IXP425 */ #define PCI_READ_VIA_DWORD_OP(size, type, off_mask) \ int pci_hose_read_config_##size##_via_dword(struct pci_controller *hose,\
@@ -190,7 +188,6 @@ int pci_last_busno(void)return hose->last_busno; } -#ifndef CONFIG_IXP425 pci_dev_t pci_find_devices (struct pci_device_id *ids,int index) {struct pci_controller * hose;
@@ -246,7 +243,6 @@ pci_dev_t pci_find_devices(struct pci_device_id *ids, int index)return (-1 ); } -#endif /* CONFIG_IXP425 */ pci_dev_t pci_find_device (unsigned int vendor,unsigned int device,int index) {
drivers/pci/pci_indirect.c +2 -11
@@ -11,7 +11,7 @@#include <common.h> -#if (!defined(__I386__) && !defined(CONFIG_IXDP425 )) +#if !defined(__I386__)#include <asm/processor.h> #include <asm/io.h>
@@ -20,15 +20,6 @@#define cfg_read (val, addr, type, op) *val = op((type)(addr))#define cfg_write (val, addr, type, op) op((type *)(addr), (val)) -#ifdef CONFIG_IXP425 -extern unsigned char in_8 (volatile unsigned *addr); -extern unsigned short in_le16 (volatile unsigned *addr); -extern unsigned in_le32 (volatile unsigned *addr); -extern void out_8 (volatile unsigned *addr,char val); -extern void out_le16 (volatile unsigned *addr,unsigned short val); -extern void out_le32 (volatile unsigned *addr,unsigned int val); -#endif /* CONFIG_IXP425 */ -#if defined(CONFIG_MPC8260 )#define INDIRECT_PCI_OP (rw, size, type, op, mask) \ static int \
@@ -134,4 +125,4 @@ void pci_setup_indirect(struct pci_controller* hose, u32 cfg_addr, u32 cfg_data) hose->cfg_data = (unsigned char *) cfg_data; } -#endif /* !__I386__ && !CONFIG_IXDP425 */ +#endif /* !__I386__ */
drivers/pci/pci_ixp.c +204 -408
758 lines not on this page · raw message
Signature · 1 line
1.7.2.5
PATCH v5 17/17 run arm_pci_init after relocation
In reply to Michael Schwingen---
Changes for V3:
- new in V3
Changes for V4:
- add changelog
Changes for V5:
arch/arm/lib/board.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
arch/arm/lib/board.c +3 -3
@@ -262,9 +262,6 @@ init_fnc_t *init_sequence[] = { init_func_i2c, #endif dram_init,/* configure available RAM banks */ -#if defined(CONFIG_CMD_PCI) || defined (CONFIG_PCI) - arm_pci_init, -#endif NULL, };
@@ -533,6 +530,9 @@ void board_init_r (gd_t *id, ulong dest_addr)/* initialize environment */ env_relocate (); +#if defined(CONFIG_CMD_PCI ) || defined(CONFIG_PCI ) +arm_pci_init (); +#endif #ifdef CONFIG_VFD /* must do this after the framebuffer is allocated */ drv_vfd_init ();
Signature · 1 line
1.7.2.5
v5 cover Overview
In reply to Michael SchwingenHi all,
Le 22/05/2011 23:59, Michael Schwingen a ?crit :
Quoted 19 lines
Hi,
this is V5 of the IXP42x patch series - it is now based on Marek's u-boot-pxa.git, with one additional fix:
- fix one missing I/O accessor inget_ticks()in Patch #0004cu
MichaelMichael Schwingen (17):
add XScale sub architecture (IXP/PXA) to maintainer list add support for IXP42x Rev. B1 and newer trigger hardware watchdog in IXP42x serial driver Fix IXP code to work after relocation was added fix "depend" target in npe directory
supportCONFIG_SYS_LDSCRIPTon ARM
use -ffunction-sections / --gc-sections on IXP42x update/fix AcTux1 board
update/fix AcTux2 board
Quoted 8 lines
update/fix AcTux3 board
update/fix AcTux4 board
IXP NPE: add support for fixed-speed MII ports
add dvlhost (dLAN 200 AV Wireless G) board
update/fix IXDP425 / IXDPG425 boards
update/fix PDNB3 board
IXP42x PCI rewrite
runarm_pci_initafter relocation
Marek, are you taking the whole set in PXA, or do you want me to apply patch 17 (arm generic)?
Amicalement,
Signature · 1 line
Albert.
v5 cover Overview
Quoted 32 lines · Albert ARIBAUD
Hi all,
Le 22/05/2011 23:59, Michael Schwingen a ?crit :
Quoted 20 lines
Hi,
this is V5 of the IXP42x patch series - it is now based on Marek's
u-boot-pxa.git, with one additional fix:
- fix one missing I/O accessor inget_ticks()in Patch #0004cu
MichaelMichael Schwingen (17):
add XScale sub architecture (IXP/PXA) to maintainer list add support for IXP42x Rev. B1 and newer trigger hardware watchdog in IXP42x serial driver Fix IXP code to work after relocation was added fix "depend" target in npe directory
supportCONFIG_SYS_LDSCRIPTon ARM
use -ffunction-sections / --gc-sections on IXP42x update/fix AcTux1 board
update/fix AcTux2 boardQuoted 8 lines
update/fix AcTux3 board
update/fix AcTux4 board
IXP NPE: add support for fixed-speed MII ports
add dvlhost (dLAN 200 AV Wireless G) board
update/fix IXDP425 / IXDPG425 boards
update/fix PDNB3 board
IXP42x PCI rewrite
runarm_pci_initafter relocation
Quoted 4 lines
Marek, are you taking the whole set in PXA, or do you want me to apply patch 17 (arm generic)?
Amicalement,
I pulled it all, but I don't mind dropping the last one and letting it all go through your tree ... it's up to you
v5 cover Overview
Hi Marek,
Le 31/05/2011 20:51, Marek Vasut a ?crit :
Quoted 33 lines · Albert ARIBAUD
Quoted 32 lines
Hi all,
Le 22/05/2011 23:59, Michael Schwingen a ?crit :
Quoted 28 lines
Hi,
this is V5 of the IXP42x patch series - it is now based on Marek's
u-boot-pxa.git, with one additional fix:
- fix one missing I/O accessor inget_ticks()in Patch #0004cu
MichaelMichael Schwingen (17):
add XScale sub architecture (IXP/PXA) to maintainer list add support for IXP42x Rev. B1 and newer trigger hardware watchdog in IXP42x serial driver Fix IXP code to work after relocation was added fix "depend" target in npe directory
supportCONFIG_SYS_LDSCRIPTon ARM
use -ffunction-sections / --gc-sections on IXP42x update/fix AcTux1 board
update/fix AcTux2 board
update/fix AcTux3 board
update/fix AcTux4 board
IXP NPE: add support for fixed-speed MII ports add dvlhost (dLAN 200 AV Wireless G) board update/fix IXDP425 / IXDPG425 boards update/fix PDNB3 board
IXP42x PCI rewrite
runarm_pci_initafter relocation
Quoted 7 lines
Quoted 4 lines
Marek, are you taking the whole set in PXA, or do you want me to apply patch 17 (arm generic)?
Amicalement,
I pulled it all, but I don't mind dropping the last one and letting it all go through your tree ... it's up to you
That's fine if you have it already.
Amicalement,
Signature · 1 line
Albert.