summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MAINTAINERS2
-rw-r--r--README6
-rwxr-xr-xcommon/Makefile1
-rw-r--r--common/cmd_cache.c4
-rw-r--r--common/cmd_date.c6
-rw-r--r--common/cmd_i2c.c8
-rw-r--r--common/cmd_irq.c9
-rw-r--r--common/cmd_license.c4
-rw-r--r--common/cmd_mgdisk.c4
-rw-r--r--common/cmd_misc.c11
-rw-r--r--drivers/rtc/m41t11.c14
-rw-r--r--drivers/rtc/mc13783-rtc.c2
-rw-r--r--examples/standalone/Makefile8
-rw-r--r--examples/standalone/nios.lds61
-rw-r--r--examples/standalone/nios2.lds133
-rw-r--r--examples/standalone/smc91111_eeprom.c12
-rw-r--r--include/configs/MPC8536DS.h7
-rw-r--r--include/configs/MPC8541CDS.h7
-rw-r--r--include/configs/MPC8544DS.h7
-rw-r--r--include/configs/MPC8548CDS.h7
-rw-r--r--include/configs/MPC8555CDS.h7
-rw-r--r--include/configs/MPC8568MDS.h7
-rw-r--r--include/configs/MPC8569MDS.h7
-rw-r--r--include/configs/MPC8572DS.h7
-rw-r--r--include/configs/P2020DS.h7
-rw-r--r--lib_generic/Makefile1
-rw-r--r--lib_generic/circbuf.c (renamed from common/circbuf.c)0
-rw-r--r--lib_nios/config.mk2
-rw-r--r--lib_nios2/board.c2
-rw-r--r--lib_nios2/bootm.c5
-rw-r--r--lib_nios2/config.mk2
31 files changed, 34 insertions, 326 deletions
diff --git a/MAINTAINERS b/MAINTAINERS
index d70a9d22d..59599b8bc 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -277,7 +277,7 @@ Nye Liu <nyet@zumanetworks.com>
ZUMA MPC7xx_74xx
-Jon Loeliger <jdl@freescale.com>
+Kumar Gala <kumar.gala@freescale.com>
MPC8540ADS MPC8540
MPC8560ADS MPC8560
diff --git a/README b/README
index 2c776876e..1e1bccc39 100644
--- a/README
+++ b/README
@@ -138,6 +138,7 @@ U-Boot will always have a patchlevel of "0".
Directory Hierarchy:
====================
+- api Machine/arch independent API for external apps
- board Board dependent files
- common Misc architecture independent functions
- cpu CPU specific files
@@ -178,8 +179,8 @@ Directory Hierarchy:
- disk Code for disk drive partition handling
- doc Documentation (don't expect too much)
- drivers Commonly used device drivers
-- dtt Digital Thermometer and Thermostat drivers
- examples Example code for standalone applications, etc.
+- fs Filesystem code (cramfs, ext2, jffs2, etc.)
- include Header Files
- lib_arm Files generic to ARM architecture
- lib_avr32 Files generic to AVR32 architecture
@@ -187,9 +188,12 @@ Directory Hierarchy:
- lib_generic Files generic to all architectures
- lib_i386 Files generic to i386 architecture
- lib_m68k Files generic to m68k architecture
+- lib_microblaze Files generic to microblaze architecture
- lib_mips Files generic to MIPS architecture
- lib_nios Files generic to NIOS architecture
+- lib_nios2 Files generic to NIOS2 architecture
- lib_ppc Files generic to PowerPC architecture
+- lib_sh Files generic to SH architecture
- lib_sparc Files generic to SPARC architecture
- libfdt Library files to support flattened device trees
- net Networking code
diff --git a/common/Makefile b/common/Makefile
index 7ba449505..9914bc243 100755
--- a/common/Makefile
+++ b/common/Makefile
@@ -29,7 +29,6 @@ AOBJS =
# core
COBJS-y += main.o
-COBJS-y += circbuf.o
COBJS-y += console.o
COBJS-y += command.o
COBJS-y += dlmalloc.o
diff --git a/common/cmd_cache.c b/common/cmd_cache.c
index 0dfa3363b..120225841 100644
--- a/common/cmd_cache.c
+++ b/common/cmd_cache.c
@@ -27,8 +27,6 @@
#include <common.h>
#include <command.h>
-#if defined(CONFIG_CMD_CACHE)
-
static int on_off (const char *);
int do_icache ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
@@ -108,5 +106,3 @@ U_BOOT_CMD(
"[on, off]\n"
" - enable or disable data (writethrough) cache"
);
-
-#endif
diff --git a/common/cmd_date.c b/common/cmd_date.c
index 9f50f8956..3141a3968 100644
--- a/common/cmd_date.c
+++ b/common/cmd_date.c
@@ -71,9 +71,9 @@ int do_date (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
/* and write to RTC */
rcode = rtc_set (&tm);
if(rcode)
- puts("## Set date failled\n");
+ puts("## Set date failed\n");
} else {
- puts("## Get date failled\n");
+ puts("## Get date failed\n");
}
}
/* FALL TROUGH */
@@ -81,7 +81,7 @@ int do_date (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
rcode = rtc_get (&tm);
if (rcode) {
- puts("## Get date failled\n");
+ puts("## Get date failed\n");
break;
}
diff --git a/common/cmd_i2c.c b/common/cmd_i2c.c
index 8f0fc9e1d..8d6feda27 100644
--- a/common/cmd_i2c.c
+++ b/common/cmd_i2c.c
@@ -326,14 +326,6 @@ int do_i2c_mw ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
#if !defined(CONFIG_SYS_I2C_FRAM)
udelay(11000);
#endif
-
-#if 0
- for (timeout = 0; timeout < 10; timeout++) {
- udelay(2000);
- if (i2c_probe(chip) == 0)
- break;
- }
-#endif
}
return (0);
diff --git a/common/cmd_irq.c b/common/cmd_irq.c
index 4604a5a31..2c7e6bbf0 100644
--- a/common/cmd_irq.c
+++ b/common/cmd_irq.c
@@ -47,3 +47,12 @@ U_BOOT_CMD(
"enable or disable interrupts",
"[on, off]"
);
+
+/* Implemented in $(CPU)/interrupts.c */
+int do_irqinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
+
+U_BOOT_CMD(
+ irqinfo, 1, 1, do_irqinfo,
+ "print information about IRQs",
+ ""
+);
diff --git a/common/cmd_license.c b/common/cmd_license.c
index 141215b3a..c6f272ad3 100644
--- a/common/cmd_license.c
+++ b/common/cmd_license.c
@@ -23,8 +23,6 @@
#include <common.h>
-#if defined(CONFIG_CMD_LICENSE)
-
/* COPYING is currently 15951 bytes in size */
#define LICENSE_MAX 20480
@@ -56,5 +54,3 @@ U_BOOT_CMD(license, 1, 1, do_license,
"print GPL license text",
""
);
-
-#endif /* CONFIG_CMD_LICENSE */
diff --git a/common/cmd_mgdisk.c b/common/cmd_mgdisk.c
index aadc33563..3ba62f618 100644
--- a/common/cmd_mgdisk.c
+++ b/common/cmd_mgdisk.c
@@ -24,8 +24,6 @@
#include <common.h>
#include <command.h>
-#if defined (CONFIG_CMD_MG_DISK)
-
#include <mg_disk.h>
int do_mg_disk_cmd (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
@@ -72,5 +70,3 @@ U_BOOT_CMD(
" - sector read : mgd readsec [sector] [to] [counts]\n"
" - sector write : mgd writesec [from] [sector] [counts]"
);
-
-#endif
diff --git a/common/cmd_misc.c b/common/cmd_misc.c
index b97537ecd..b0ced2f3b 100644
--- a/common/cmd_misc.c
+++ b/common/cmd_misc.c
@@ -49,17 +49,6 @@ int do_sleep (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
return 0;
}
-/* Implemented in $(CPU)/interrupts.c */
-#if defined(CONFIG_CMD_IRQ)
-int do_irqinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
-
-U_BOOT_CMD(
- irqinfo, 1, 1, do_irqinfo,
- "print information about IRQs",
- ""
-);
-#endif
-
U_BOOT_CMD(
sleep , 2, 1, do_sleep,
"delay execution for some time",
diff --git a/drivers/rtc/m41t11.c b/drivers/rtc/m41t11.c
index e0c27e185..bb134875b 100644
--- a/drivers/rtc/m41t11.c
+++ b/drivers/rtc/m41t11.c
@@ -181,18 +181,4 @@ void rtc_reset (void)
val = val & 0x3F;/*turn off freq test keep calibration*/
i2c_write(CONFIG_SYS_I2C_RTC_ADDR, RTC_CONTROL_ADDR, 1, &val, 1);
}
-
-int rtc_store(int addr, unsigned char* data, int size)
-{
- /*don't let things wrap onto the time on a write*/
- if( (addr+size) >= M41T11_STORAGE_SZ )
- return 1;
- return i2c_write( CONFIG_SYS_I2C_RTC_ADDR, REG_CNT+addr, 1, data, size );
-}
-
-int rtc_recall(int addr, unsigned char* data, int size)
-{
- return i2c_read( CONFIG_SYS_I2C_RTC_ADDR, REG_CNT+addr, 1, data, size );
-}
-
#endif
diff --git a/drivers/rtc/mc13783-rtc.c b/drivers/rtc/mc13783-rtc.c
index 05db2f1d4..416f50d01 100644
--- a/drivers/rtc/mc13783-rtc.c
+++ b/drivers/rtc/mc13783-rtc.c
@@ -109,7 +109,7 @@ int rtc_set(struct rtc_time *rtc)
spi_release_bus(slave);
- return -1;
+ return 0;
}
void rtc_reset(void)
diff --git a/examples/standalone/Makefile b/examples/standalone/Makefile
index 5e2f2bcae..6ea3b93db 100644
--- a/examples/standalone/Makefile
+++ b/examples/standalone/Makefile
@@ -38,7 +38,13 @@ ELF-mpc8260 += mem_to_mem_idma2intr
ELF-ppc += sched
ELF-oxc += eepro100_eeprom
-ELF := $(ELF-y) $(ELF-$(ARCH)) $(ELF-$(BOARD)) $(ELF-$(CPU))
+#
+# Some versions of make do not handle trailing white spaces properly;
+# leading to build failures. The problem was found with GNU Make 3.80.
+# Using 'strip' as a workaround for the problem.
+#
+ELF := $(strip $(ELF-y) $(ELF-$(ARCH)) $(ELF-$(BOARD)) $(ELF-$(CPU)))
+
SREC = $(addsuffix .srec,$(ELF))
BIN = $(addsuffix .bin,$(ELF))
diff --git a/examples/standalone/nios.lds b/examples/standalone/nios.lds
deleted file mode 100644
index 4c1080b86..000000000
--- a/examples/standalone/nios.lds
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * (C) Copyright 2003, Psyent Corporation <www.psyent.com>
- * Scott McNutt <smcnutt@psyent.com>
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-
-
-OUTPUT_FORMAT("elf32-nios")
-OUTPUT_ARCH(nios)
-ENTRY(_start)
-
-SECTIONS
-{
- .text :
- {
- *(.text)
- }
- __text_end = .;
-
- . = ALIGN(4);
- .rodata :
- {
- *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
- }
- __rodata_end = .;
-
- . = ALIGN(4);
- .data :
- {
- *(.data)
- }
- . = ALIGN(4);
- __data_end = .;
-
- __bss_start = .;
- . = ALIGN(4);
- .bss (NOLOAD) :
- {
- *(.bss)
- }
- . = ALIGN(4);
- __bss_end = .;
- _end = .;
-}
diff --git a/examples/standalone/nios2.lds b/examples/standalone/nios2.lds
deleted file mode 100644
index a3e5ea8e3..000000000
--- a/examples/standalone/nios2.lds
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * (C) Copyright 2004, Psyent Corporation <www.psyent.com>
- * Scott McNutt <smcnutt@psyent.com>
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-
-
-OUTPUT_FORMAT("elf32-littlenios2")
-OUTPUT_ARCH(nios2)
-ENTRY(_start)
-
-SECTIONS
-{
- .text :
- {
- *(.text)
- *(.text.*)
- *(.gnu.linkonce.t*)
- *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
- *(.gnu.linkonce.r*)
- }
- . = ALIGN (4);
- _etext = .;
- PROVIDE (etext = .);
-
- /* INIT DATA sections - "Small" data (see the gcc -G option)
- * is always gp-relative. Here we make all init data sections
- * adjacent to simplify the startup code -- and provide
- * the global pointer for gp-relative access.
- */
- _data = .;
- .data :
- {
- *(.data)
- *(.data.*)
- *(.gnu.linkonce.d*)
- }
-
- . = ALIGN(16);
- _gp = .; /* Global pointer addr */
- PROVIDE (gp = .);
-
- .sdata :
- {
- *(.sdata)
- *(.sdata.*)
- *(.gnu.linkonce.s.*)
- }
- . = ALIGN(4);
-
- _edata = .;
- PROVIDE (edata = .);
-
- /* UNINIT DATA - Small uninitialized data is first so it's
- * adjacent to sdata and can be referenced via gp. The normal
- * bss follows. We keep it adjacent to simplify init code.
- */
- __bss_start = .;
- .sbss (NOLOAD) :
- {
- *(.sbss)
- *(.sbss.*)
- *(.gnu.linkonce.sb.*)
- *(.scommon)
- }
- . = ALIGN(4);
- .bss (NOLOAD) :
- {
- *(.bss)
- *(.bss.*)
- *(.dynbss)
- *(COMMON)
- *(.scommon)
- }
- . = ALIGN(4);
- _end = .;
- PROVIDE (end = .);
-
- /* CMD TABLE - uboot command sections
- */
- . = .;
- __uboot_cmd_start = .;
- .u_boot_cmd :
- {
- *(.u_boot_cmd)
- }
- . = ALIGN(4);
- __u_boot_cmd_end = .;
-
- /* DEBUG -- symbol table, string table, etc. etc.
- */
- .stab 0 : { *(.stab) }
- .stabstr 0 : { *(.stabstr) }
- .stab.excl 0 : { *(.stab.excl) }
- .stab.exclstr 0 : { *(.stab.exclstr) }
- .stab.index 0 : { *(.stab.index) }
- .stab.indexstr 0 : { *(.stab.indexstr) }
- .comment 0 : { *(.comment) }
- .debug 0 : { *(.debug) }
- .line 0 : { *(.line) }
- .debug_srcinfo 0 : { *(.debug_srcinfo) }
- .debug_sfnames 0 : { *(.debug_sfnames) }
- .debug_aranges 0 : { *(.debug_aranges) }
- .debug_pubnames 0 : { *(.debug_pubnames) }
- .debug_info 0 : { *(.debug_info) }
- .debug_abbrev 0 : { *(.debug_abbrev) }
- .debug_line 0 : { *(.debug_line) }
- .debug_frame 0 : { *(.debug_frame) }
- .debug_str 0 : { *(.debug_str) }
- .debug_loc 0 : { *(.debug_loc) }
- .debug_macinfo 0 : { *(.debug_macinfo) }
- .debug_weaknames 0 : { *(.debug_weaknames) }
- .debug_funcnames 0 : { *(.debug_funcnames) }
- .debug_typenames 0 : { *(.debug_typenames) }
- .debug_varnames 0 : { *(.debug_varnames) }
-}
diff --git a/examples/standalone/smc91111_eeprom.c b/examples/standalone/smc91111_eeprom.c
index 89afc871f..428ea7bd2 100644
--- a/examples/standalone/smc91111_eeprom.c
+++ b/examples/standalone/smc91111_eeprom.c
@@ -33,8 +33,6 @@
struct eth_device { unsigned long iobase; };
#include "../drivers/net/smc91111.h"
-#ifdef CONFIG_SMC91111
-
#ifndef SMC91111_EEPROM_INIT
# define SMC91111_EEPROM_INIT()
#endif
@@ -391,13 +389,3 @@ void dump_reg (struct eth_device *dev)
printf ("\n");
}
}
-
-#else
-
-int smc91111_eeprom (int argc, char *argv[])
-{
- printf("Not supported for this board\n");
- return 1;
-}
-
-#endif
diff --git a/include/configs/MPC8536DS.h b/include/configs/MPC8536DS.h
index a84727546..46d6e9d39 100644
--- a/include/configs/MPC8536DS.h
+++ b/include/configs/MPC8536DS.h
@@ -70,13 +70,6 @@
#define CONFIG_TSEC_ENET /* tsec ethernet support */
#define CONFIG_ENV_OVERWRITE
-/*
- * When initializing flash, if we cannot find the manufacturer ID,
- * assume this is the AMD flash associated with the CDS board.
- * This allows booting from a promjet.
- */
-#define CONFIG_ASSUME_AMD_FLASH
-
#ifndef __ASSEMBLY__
extern unsigned long get_board_sys_clk(unsigned long dummy);
extern unsigned long get_board_ddr_clk(unsigned long dummy);
diff --git a/include/configs/MPC8541CDS.h b/include/configs/MPC8541CDS.h
index a8f206f53..f41fe300d 100644
--- a/include/configs/MPC8541CDS.h
+++ b/include/configs/MPC8541CDS.h
@@ -46,13 +46,6 @@
#define CONFIG_FSL_VIA
-/*
- * When initializing flash, if we cannot find the manufacturer ID,
- * assume this is the AMD flash associated with the CDS board.
- * This allows booting from a promjet.
- */
-#define CONFIG_ASSUME_AMD_FLASH
-
#ifndef __ASSEMBLY__
extern unsigned long get_clock_freq(void);
#endif
diff --git a/include/configs/MPC8544DS.h b/include/configs/MPC8544DS.h
index 0caf45603..b7d355315 100644
--- a/include/configs/MPC8544DS.h
+++ b/include/configs/MPC8544DS.h
@@ -50,13 +50,6 @@
#define CONFIG_ENV_OVERWRITE
#define CONFIG_INTERRUPTS /* enable pci, srio, ddr interrupts */
-/*
- * When initializing flash, if we cannot find the manufacturer ID,
- * assume this is the AMD flash associated with the CDS board.
- * This allows booting from a promjet.
- */
-#define CONFIG_ASSUME_AMD_FLASH
-
#ifndef __ASSEMBLY__
extern unsigned long get_board_sys_clk(unsigned long dummy);
#endif
diff --git a/include/configs/MPC8548CDS.h b/include/configs/MPC8548CDS.h
index e69ba901e..53de56dbc 100644
--- a/include/configs/MPC8548CDS.h
+++ b/include/configs/MPC8548CDS.h
@@ -52,13 +52,6 @@
#define CONFIG_FSL_VIA
-/*
- * When initializing flash, if we cannot find the manufacturer ID,
- * assume this is the AMD flash associated with the CDS board.
- * This allows booting from a promjet.
- */
-#define CONFIG_ASSUME_AMD_FLASH
-
#ifndef __ASSEMBLY__
extern unsigned long get_clock_freq(void);
#endif
diff --git a/include/configs/MPC8555CDS.h b/include/configs/MPC8555CDS.h
index 94952dc99..abbfd4707 100644
--- a/include/configs/MPC8555CDS.h
+++ b/include/configs/MPC8555CDS.h
@@ -46,13 +46,6 @@
#define CONFIG_FSL_VIA
-/*
- * When initializing flash, if we cannot find the manufacturer ID,
- * assume this is the AMD flash associated with the CDS board.
- * This allows booting from a promjet.
- */
-#define CONFIG_ASSUME_AMD_FLASH
-
#ifndef __ASSEMBLY__
extern unsigned long get_clock_freq(void);
#endif
diff --git a/include/configs/MPC8568MDS.h b/include/configs/MPC8568MDS.h
index 7b8c6c772..426b93378 100644
--- a/include/configs/MPC8568MDS.h
+++ b/include/configs/MPC8568MDS.h
@@ -44,13 +44,6 @@
#define CONFIG_ENV_OVERWRITE
#define CONFIG_FSL_LAW 1 /* Use common FSL init code */
-/*
- * When initializing flash, if we cannot find the manufacturer ID,
- * assume this is the AMD flash associated with the MDS board.
- * This allows booting from a promjet.
- */
-#define CONFIG_ASSUME_AMD_FLASH
-
#ifndef __ASSEMBLY__
extern unsigned long get_clock_freq(void);
#endif /*Replace a call to get_clock_freq (after it is implemented)*/
diff --git a/include/configs/MPC8569MDS.h b/include/configs/MPC8569MDS.h
index 17ea3bb14..b87f37528 100644
--- a/include/configs/MPC8569MDS.h
+++ b/include/configs/MPC8569MDS.h
@@ -44,13 +44,6 @@
#define CONFIG_ENV_OVERWRITE
#define CONFIG_FSL_LAW 1 /* Use common FSL init code */
-/*
- * When initializing flash, if we cannot find the manufacturer ID,
- * assume this is the AMD flash associated with the MDS board.
- * This allows booting from a promjet.
- */
-#define CONFIG_ASSUME_AMD_FLASH
-
#ifndef __ASSEMBLY__
extern unsigned long get_clock_freq(void);
#endif
diff --git a/include/configs/MPC8572DS.h b/include/configs/MPC8572DS.h
index 000f8f62d..0e7745c46 100644
--- a/include/configs/MPC8572DS.h
+++ b/include/configs/MPC8572DS.h
@@ -53,13 +53,6 @@
#define CONFIG_TSEC_ENET /* tsec ethernet support */
#define CONFIG_ENV_OVERWRITE
-/*
- * When initializing flash, if we cannot find the manufacturer ID,
- * assume this is the AMD flash associated with the CDS board.
- * This allows booting from a promjet.
- */
-#define CONFIG_ASSUME_AMD_FLASH
-
#ifndef __ASSEMBLY__
extern unsigned long get_board_sys_clk(unsigned long dummy);
extern unsigned long get_board_ddr_clk(unsigned long dummy);
diff --git a/include/configs/P2020DS.h b/include/configs/P2020DS.h
index b48c1999f..9574fcaa1 100644
--- a/include/configs/P2020DS.h
+++ b/include/configs/P2020DS.h
@@ -54,13 +54,6 @@
#define CONFIG_TSEC_ENET /* tsec ethernet support */
#define CONFIG_ENV_OVERWRITE
-/*
- * When initializing flash, if we cannot find the manufacturer ID,
- * assume this is the AMD flash associated with the CDS board.
- * This allows booting from a promjet.
- */
-#define CONFIG_ASSUME_AMD_FLASH
-
#ifndef __ASSEMBLY__
extern unsigned long calculate_board_sys_clk(unsigned long dummy);
extern unsigned long calculate_board_ddr_clk(unsigned long dummy);
diff --git a/lib_generic/Makefile b/lib_generic/Makefile
index 686601cc1..2ec261af4 100644
--- a/lib_generic/Makefile
+++ b/lib_generic/Makefile
@@ -31,6 +31,7 @@ COBJS-$(CONFIG_BZIP2) += bzlib_crctable.o
COBJS-$(CONFIG_BZIP2) += bzlib_decompress.o
COBJS-$(CONFIG_BZIP2) += bzlib_randtable.o
COBJS-$(CONFIG_BZIP2) += bzlib_huffman.o
+COBJS-$(CONFIG_USB_TTY) += circbuf.o
COBJS-y += crc16.o
COBJS-y += crc32.o
COBJS-y += ctype.o
diff --git a/common/circbuf.c b/lib_generic/circbuf.c
index 2332c6371..2332c6371 100644
--- a/common/circbuf.c
+++ b/lib_generic/circbuf.c
diff --git a/lib_nios/config.mk b/lib_nios/config.mk
index d48aa6dfd..e1b9f07bb 100644
--- a/lib_nios/config.mk
+++ b/lib_nios/config.mk
@@ -24,6 +24,6 @@
CROSS_COMPILE ?= nios-elf-
-STANDALONE_LOAD_ADDR = 0x00800000 -L $(gcclibdir)/m32 -T nios.lds
+STANDALONE_LOAD_ADDR = 0x00800000 -L $(gcclibdir)/m32
PLATFORM_CPPFLAGS += -m32 -DCONFIG_NIOS -D__NIOS__ -ffixed-g7 -gstabs
diff --git a/lib_nios2/board.c b/lib_nios2/board.c
index 008f04f95..41d329719 100644
--- a/lib_nios2/board.c
+++ b/lib_nios2/board.c
@@ -83,8 +83,6 @@ void board_init (void)
{
bd_t *bd;
init_fnc_t **init_fnc_ptr;
- char *s, *e;
- int i;
/* Pointer is writable since we allocated a register for it.
* Nios treats CONFIG_SYS_GBL_DATA_OFFSET as an address.
diff --git a/lib_nios2/bootm.c b/lib_nios2/bootm.c
index 53fd5691a..675bfac63 100644
--- a/lib_nios2/bootm.c
+++ b/lib_nios2/bootm.c
@@ -24,6 +24,7 @@
#include <common.h>
#include <command.h>
#include <asm/byteorder.h>
+#include <asm/cache.h>
int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images)
{
@@ -32,6 +33,10 @@ int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images)
if ((flag != 0) && (flag != BOOTM_STATE_OS_GO))
return 1;
+ /* flushes data and instruction caches before calling the kernel */
+ flush_dcache (0,CONFIG_SYS_DCACHE_SIZE);
+ flush_icache (0,CONFIG_SYS_ICACHE_SIZE);
+
/* For now we assume the Microtronix linux ... which only
* needs to be called ;-)
*/
diff --git a/lib_nios2/config.mk b/lib_nios2/config.mk
index 34ee6977d..be4063928 100644
--- a/lib_nios2/config.mk
+++ b/lib_nios2/config.mk
@@ -24,7 +24,7 @@
CROSS_COMPILE ?= nios2-elf-
-STANDALONE_LOAD_ADDR = 0x02000000 -L $(gcclibdir) -T nios2.lds
+STANDALONE_LOAD_ADDR = 0x02000000 -L $(gcclibdir)
PLATFORM_CPPFLAGS += -DCONFIG_NIOS2 -D__NIOS2__
PLATFORM_CPPFLAGS += -ffixed-r15 -G0