summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2009-02-01 21:24:38 +0100
committerWolfgang Denk <wd@denx.de>2009-02-01 21:24:38 +0100
commitf4b6f45dcba989f5a900edc07ececae80c79abdf (patch)
tree85e623dc76eba877275c5978a6527f368975abb2
parenta87fb1b308a2a375cb9ca74ca0dd3e2c5793d3bf (diff)
parent930590f3e49c8f32256edf2e5861e1535a329c6c (diff)
downloadu-boot-imx-f4b6f45dcba989f5a900edc07ececae80c79abdf.zip
u-boot-imx-f4b6f45dcba989f5a900edc07ececae80c79abdf.tar.gz
u-boot-imx-f4b6f45dcba989f5a900edc07ececae80c79abdf.tar.bz2
Merge branch 'master' of git://git.denx.de/u-boot-ixp
-rw-r--r--README3
-rw-r--r--cpu/ixp/Makefile12
-rw-r--r--cpu/ixp/cpu.c3
-rw-r--r--cpu/ixp/npe/IxNpeDlImageMgr.c17
-rw-r--r--cpu/ixp/npe/Makefile16
-rw-r--r--cpu/ixp/npe/npe.c4
-rw-r--r--cpu/ixp/timer.c2
-rw-r--r--drivers/pci/Makefile1
-rw-r--r--drivers/pci/pci_ixp.c (renamed from cpu/ixp/pci.c)4
-rw-r--r--drivers/serial/Makefile1
-rw-r--r--drivers/serial/serial_ixp.c (renamed from cpu/ixp/serial.c)0
-rw-r--r--include/configs/actux1.h4
-rw-r--r--include/configs/actux2.h4
-rw-r--r--include/configs/actux3.h4
-rw-r--r--include/configs/actux4.h4
-rw-r--r--include/configs/ixdp425.h2
-rw-r--r--include/configs/ixdpg425.h1
-rw-r--r--include/configs/pdnb3.h1
-rw-r--r--lib_arm/board.c12
19 files changed, 49 insertions, 46 deletions
diff --git a/README b/README
index 86c1304..522471c 100644
--- a/README
+++ b/README
@@ -3021,8 +3021,7 @@ Some configuration options can be set using Environment Variables:
Useful on scripts which control the retry operation
themselves.
- npe_ucode - see CONFIG_IXP4XX_NPE_EXT_UCOD
- if set load address for the NPE microcode
+ npe_ucode - set load address for the NPE microcode
tftpsrcport - If this is set, the value is used for TFTP's
UDP source port.
diff --git a/cpu/ixp/Makefile b/cpu/ixp/Makefile
index e1fb327..7e98d87 100644
--- a/cpu/ixp/Makefile
+++ b/cpu/ixp/Makefile
@@ -26,10 +26,14 @@ include $(TOPDIR)/config.mk
LIB = $(obj)lib$(CPU).a
START = start.o
-COBJS = serial.o interrupts.o cpu.o timer.o pci.o
-
-SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS))
+COBJS-y += cpu.o
+COBJS-y += interrupts.o
+ifndef CONFIG_USE_IRQ
+COBJS-y += timer.o
+endif
+
+SRCS := $(START:.o=.S) $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
+OBJS := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
START := $(addprefix $(obj),$(START))
all: $(obj).depend $(START) $(LIB)
diff --git a/cpu/ixp/cpu.c b/cpu/ixp/cpu.c
index 27872fb..fd545b5 100644
--- a/cpu/ixp/cpu.c
+++ b/cpu/ixp/cpu.c
@@ -86,9 +86,6 @@ int cpu_init (void)
FIQ_STACK_START = IRQ_STACK_START - CONFIG_STACKSIZE_IRQ;
#endif
-#if defined(CONFIG_CMD_PCI) || defined (CONFIG_PCI)
- pci_init();
-#endif
return 0;
}
diff --git a/cpu/ixp/npe/IxNpeDlImageMgr.c b/cpu/ixp/npe/IxNpeDlImageMgr.c
index ccc0da7..9bcdc9c 100644
--- a/cpu/ixp/npe/IxNpeDlImageMgr.c
+++ b/cpu/ixp/npe/IxNpeDlImageMgr.c
@@ -133,20 +133,14 @@ typedef struct
*/
static IxNpeDlImageMgrStats ixNpeDlImageMgrStats;
-/* default image */
-#ifdef CONFIG_IXP4XX_NPE_EXT_UCODE_BASE
-static UINT32 *IxNpeMicroCodeImageLibrary = (UINT32 *)CONFIG_IXP4XX_NPE_EXT_UCODE_BASE;
-#else
-static UINT32 *IxNpeMicroCodeImageLibrary = (UINT32 *)IxNpeMicrocode_array;
-#endif
-
static UINT32* getIxNpeMicroCodeImageLibrary(void)
{
char *s;
+
if ((s = getenv("npe_ucode")) != NULL)
return (UINT32*) simple_strtoul(s, NULL, 16);
else
- return IxNpeMicroCodeImageLibrary;
+ return NULL;
}
/*
@@ -422,7 +416,7 @@ ixNpeDlImageMgrSignatureCheck (UINT32 *microCodeImageLibrary)
(IxNpeDlImageMgrImageLibraryHeader *) microCodeImageLibrary;
BOOL result = TRUE;
- if (header->signature != IX_NPEDL_IMAGEMGR_SIGNATURE)
+ if (!header || header->signature != IX_NPEDL_IMAGEMGR_SIGNATURE)
{
result = FALSE;
ixNpeDlImageMgrStats.invalidSignature++;
@@ -643,6 +637,11 @@ ixNpeDlImageMgrImageFind (
}
#else
imageLibrary = getIxNpeMicroCodeImageLibrary();
+ if (imageLibrary == NULL)
+ {
+ printf ("npe: ERROR, no Microcode found in memory\n");
+ return IX_FAIL;
+ }
#endif /* IX_NPEDL_READ_MICROCODE_FROM_FILE */
}
diff --git a/cpu/ixp/npe/Makefile b/cpu/ixp/npe/Makefile
index 25117d7..f4f97bd 100644
--- a/cpu/ixp/npe/Makefile
+++ b/cpu/ixp/npe/Makefile
@@ -25,11 +25,11 @@ include $(TOPDIR)/config.mk
LIB := $(obj)libnpe.a
-LOCAL_CFLAGS += -I$(TOPDIR)/cpu/ixp/npe/include -DCONFIG_IXP425_COMPONENT_ETHDB
+LOCAL_CFLAGS += -I$(TOPDIR)/cpu/ixp/npe/include -DCONFIG_IXP425_COMPONENT_ETHDB -D__linux
CFLAGS += $(LOCAL_CFLAGS)
HOST_CFLAGS += $(LOCAL_CFLAGS)
-COBJS := npe.o \
+COBJS-$(CONFIG_IXP4XX_NPE) := npe.o \
miiphy.o \
IxOsalBufferMgt.o \
IxOsalIoMem.o \
@@ -79,17 +79,13 @@ COBJS := npe.o \
IxNpeMhSolicitedCbMgr.o \
IxNpeMhUnsolicitedCbMgr.o
-ifndef CONFIG_IXP4XX_NPE_EXT_UCODE_BASE
-COBJS += IxNpeMicrocode.o
-endif
-
-SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS))
-START := $(addprefix $(obj),$(START))
+SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
+OBJS := $(addprefix $(obj),$(COBJS-y))
+SOBJS := $(addprefix $(obj),$(SOBJS))
all: $(LIB)
-$(LIB): $(OBJS)
+$(LIB): $(obj).depend $(OBJS)
$(AR) $(ARFLAGS) $@ $(OBJS)
#########################################################################
diff --git a/cpu/ixp/npe/npe.c b/cpu/ixp/npe/npe.c
index bd77fed..03e3bf7 100644
--- a/cpu/ixp/npe/npe.c
+++ b/cpu/ixp/npe/npe.c
@@ -44,8 +44,6 @@
#include <npe.h>
-#ifdef CONFIG_IXP4XX_NPE
-
static IxQMgrDispatcherFuncPtr qDispatcherFunc = NULL;
static int npe_exists[NPE_NUM_PORTS];
static int npe_used[NPE_NUM_PORTS];
@@ -690,5 +688,3 @@ int npe_initialize(bd_t * bis)
return 1;
}
-
-#endif /* CONFIG_IXP4XX_NPE */
diff --git a/cpu/ixp/timer.c b/cpu/ixp/timer.c
index 09d8ad5..deb227a 100644
--- a/cpu/ixp/timer.c
+++ b/cpu/ixp/timer.c
@@ -32,7 +32,6 @@
#include <common.h>
#include <asm/arch/ixp425.h>
-#ifndef CONFIG_USE_IRQ
ulong get_timer (ulong base)
{
return get_timer_masked () - base;
@@ -80,4 +79,3 @@ ulong get_timer_masked (void)
}
return (reload_constant - current);
}
-#endif /* #ifndef CONFIG_USE_IRQ */
diff --git a/drivers/pci/Makefile b/drivers/pci/Makefile
index bffb1eb..0c4fa80 100644
--- a/drivers/pci/Makefile
+++ b/drivers/pci/Makefile
@@ -27,6 +27,7 @@ LIB := $(obj)libpci.a
COBJS-$(CONFIG_FSL_PCI_INIT) += fsl_pci_init.o
COBJS-$(CONFIG_PCI) += pci.o pci_auto.o pci_indirect.o
+COBJS-$(CONFIG_IXP_PCI) += pci_ixp.o
COBJS-$(CONFIG_SH4_PCI) += pci_sh4.o
COBJS-$(CONFIG_SH7751_PCI) +=pci_sh7751.o
COBJS-$(CONFIG_SH7780_PCI) +=pci_sh7780.o
diff --git a/cpu/ixp/pci.c b/drivers/pci/pci_ixp.c
index 8c6b0b2..aae3d3d 100644
--- a/cpu/ixp/pci.c
+++ b/drivers/pci/pci_ixp.c
@@ -24,9 +24,6 @@
#include <common.h>
-
-#ifdef CONFIG_PCI
-
#include <asm/processor.h>
#include <asm/io.h>
#include <pci.h>
@@ -572,4 +569,3 @@ pci_dev_t pci_find_devices (struct pci_device_id * ids, int devNo)
}
return -1;
}
-#endif /* CONFIG_PCI */
diff --git a/drivers/serial/Makefile b/drivers/serial/Makefile
index c7a1882..b6fd0d7 100644
--- a/drivers/serial/Makefile
+++ b/drivers/serial/Makefile
@@ -32,6 +32,7 @@ COBJS-y += ns16550.o
COBJS-$(CONFIG_DRIVER_S3C4510_UART) += s3c4510b_uart.o
COBJS-$(CONFIG_S3C64XX) += s3c64xx.o
COBJS-y += serial.o
+COBJS-$(CONFIG_IXP_SERIAL) += serial_ixp.o
COBJS-$(CONFIG_MAX3100_SERIAL) += serial_max3100.o
COBJS-$(CONFIG_PL010_SERIAL) += serial_pl01x.o
COBJS-$(CONFIG_PL011_SERIAL) += serial_pl01x.o
diff --git a/cpu/ixp/serial.c b/drivers/serial/serial_ixp.c
index dd26af4..dd26af4 100644
--- a/cpu/ixp/serial.c
+++ b/drivers/serial/serial_ixp.c
diff --git a/include/configs/actux1.h b/include/configs/actux1.h
index a3b04b1..adbc399 100644
--- a/include/configs/actux1.h
+++ b/include/configs/actux1.h
@@ -39,6 +39,7 @@
#define CONFIG_DISPLAY_CPUINFO 1
#define CONFIG_DISPLAY_BOARDINFO 1
+#define CONFIG_IXP_SERIAL
#define CONFIG_SYS_IXP425_CONSOLE IXP425_UART2
#define CONFIG_BAUDRATE 115200
#define CONFIG_BOOTDELAY 3
@@ -172,8 +173,6 @@
/* include IXP4xx NPE support */
#define CONFIG_IXP4XX_NPE 1
-/* use separate flash sector with ucode images */
-#define CONFIG_IXP4XX_NPE_EXT_UCODE_BASE 0x50040000
#define CONFIG_NET_MULTI 1
/* NPE0 PHY address */
#define CONFIG_PHY_ADDR 0
@@ -208,6 +207,7 @@
#define CONFIG_SYS_USE_PPCENV 1
#define CONFIG_EXTRA_ENV_SETTINGS \
+ "npe_ucode=50040000\0" \
"mtd=IXP4XX-Flash.0:256k(uboot),64k(ucode),1152k(linux),-(root)\0" \
"kerneladdr=50050000\0" \
"rootaddr=50170000\0" \
diff --git a/include/configs/actux2.h b/include/configs/actux2.h
index 7e6e8f2..4c579eb 100644
--- a/include/configs/actux2.h
+++ b/include/configs/actux2.h
@@ -32,6 +32,7 @@
#define CONFIG_DISPLAY_CPUINFO 1
#define CONFIG_DISPLAY_BOARDINFO 1
+#define CONFIG_IXP_SERIAL
#define CONFIG_SYS_IXP425_CONSOLE IXP425_UART2
#define CONFIG_BAUDRATE 115200
#define CONFIG_BOOTDELAY 5
@@ -147,8 +148,6 @@
/* include IXP4xx NPE support */
#define CONFIG_IXP4XX_NPE 1
-/* use separate flash sector with ucode images */
-#define CONFIG_IXP4XX_NPE_EXT_UCODE_BASE 0x50040000
#define CONFIG_NET_MULTI 1
/* NPE0 PHY address */
#define CONFIG_PHY_ADDR 0x00
@@ -185,6 +184,7 @@
#define CONFIG_SYS_USE_PPCENV 1
#define CONFIG_EXTRA_ENV_SETTINGS \
+ "npe_ucode=50040000\0" \
"mtd=IXP4XX-Flash.0:256k(uboot),64k(ucode),1152k(linux),-(root)\0" \
"kerneladdr=50050000\0" \
"rootaddr=50170000\0" \
diff --git a/include/configs/actux3.h b/include/configs/actux3.h
index 3f42ed4..694f522 100644
--- a/include/configs/actux3.h
+++ b/include/configs/actux3.h
@@ -32,6 +32,7 @@
#define CONFIG_DISPLAY_CPUINFO 1
#define CONFIG_DISPLAY_BOARDINFO 1
+#define CONFIG_IXP_SERIAL
#define CONFIG_SYS_IXP425_CONSOLE IXP425_UART2
#define CONFIG_BAUDRATE 115200
#define CONFIG_BOOTDELAY 3
@@ -146,8 +147,6 @@
/* include IXP4xx NPE support */
#define CONFIG_IXP4XX_NPE 1
-/* use separate flash sector with ucode images */
-#define CONFIG_IXP4XX_NPE_EXT_UCODE_BASE 0x50040000
#define CONFIG_NET_MULTI 1
/* NPE0 PHY address */
@@ -185,6 +184,7 @@
#define CONFIG_SYS_USE_PPCENV 1
#define CONFIG_EXTRA_ENV_SETTINGS \
+ "npe_ucode=50040000\0" \
"mtd=IXP4XX-Flash.0:256k(uboot),64k(ucode),1152k(linux),-(root)\0" \
"kerneladdr=50050000\0" \
"rootaddr=50170000\0" \
diff --git a/include/configs/actux4.h b/include/configs/actux4.h
index 3cf1b20..cdc9956 100644
--- a/include/configs/actux4.h
+++ b/include/configs/actux4.h
@@ -32,6 +32,7 @@
#define CONFIG_DISPLAY_CPUINFO 1
#define CONFIG_DISPLAY_BOARDINFO 1
+#define CONFIG_IXP_SERIAL
#define CONFIG_SYS_IXP425_CONSOLE IXP425_UART1
#define CONFIG_BAUDRATE 115200
#define CONFIG_BOOTDELAY 3
@@ -149,8 +150,6 @@
/* include IXP4xx NPE support */
#define CONFIG_IXP4XX_NPE 1
-/* use separate flash sector with ucode images */
-#define CONFIG_IXP4XX_NPE_EXT_UCODE_BASE 0x51000000
#define CONFIG_NET_MULTI 1
/* NPE0 PHY address */
@@ -181,6 +180,7 @@
#define CONFIG_ENV_ADDR (PHYS_FLASH_1 + 0x3f000)
#define CONFIG_EXTRA_ENV_SETTINGS \
+ "npe_ucode=51000000\0" \
"mtd=IXP4XX-Flash.0:252k(uboot),4k(uboot_env);" \
"IXP4XX-Flash.1:128k(ucode),1280k(linux),-(root)\0" \
"kerneladdr=51020000\0" \
diff --git a/include/configs/ixdp425.h b/include/configs/ixdp425.h
index 35b0451..70f3987 100644
--- a/include/configs/ixdp425.h
+++ b/include/configs/ixdp425.h
@@ -73,6 +73,7 @@
#define CONFIG_PCI
+#define CONFIG_IXP_PCI
#define CONFIG_NET_MULTI
#define CONFIG_EEPRO100
@@ -134,6 +135,7 @@
/*
* select serial console configuration
*/
+#define CONFIG_IXP_SERIAL
#define CONFIG_SYS_IXP425_CONSOLE IXP425_UART1 /* we use UART1 for console */
/*
diff --git a/include/configs/ixdpg425.h b/include/configs/ixdpg425.h
index 528bccd..193008e 100644
--- a/include/configs/ixdpg425.h
+++ b/include/configs/ixdpg425.h
@@ -72,6 +72,7 @@
/* allow to overwrite serial and ethaddr */
#define CONFIG_ENV_OVERWRITE
+#define CONFIG_IXP_SERIAL
#define CONFIG_BAUDRATE 115200
#define CONFIG_SYS_IXP425_CONSOLE IXP425_UART1 /* we use UART1 for console */
diff --git a/include/configs/pdnb3.h b/include/configs/pdnb3.h
index f8aac1a..4da401f 100644
--- a/include/configs/pdnb3.h
+++ b/include/configs/pdnb3.h
@@ -68,6 +68,7 @@
/* allow to overwrite serial and ethaddr */
#define CONFIG_ENV_OVERWRITE
+#define CONFIG_IXP_SERIAL
#define CONFIG_BAUDRATE 115200
#define CONFIG_SYS_IXP425_CONSOLE IXP425_UART1 /* we use UART1 for console */
diff --git a/lib_arm/board.c b/lib_arm/board.c
index 2358beb..964f5cc 100644
--- a/lib_arm/board.c
+++ b/lib_arm/board.c
@@ -221,6 +221,15 @@ static int init_func_i2c (void)
}
#endif
+#if defined(CONFIG_CMD_PCI) || defined (CONFIG_PCI)
+#include <pci.h>
+static int arm_pci_init(void)
+{
+ pci_init();
+ return 0;
+}
+#endif /* CONFIG_CMD_PCI || CONFIG_PCI */
+
/*
* Breathe some life into the board...
*
@@ -267,6 +276,9 @@ 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
display_dram_config,
NULL,
};