diff options
-rw-r--r-- | common/cmd_bootm.c | 5 | ||||
-rw-r--r-- | common/cmd_mp.c | 4 | ||||
-rw-r--r-- | common/image.c | 17 | ||||
-rw-r--r-- | cpu/mpc85xx/mp.c | 4 | ||||
-rw-r--r-- | cpu/mpc85xx/release.S | 2 | ||||
-rw-r--r-- | cpu/mpc86xx/cpu_init.c | 25 | ||||
-rw-r--r-- | cpu/mpc86xx/start.S | 119 | ||||
-rw-r--r-- | drivers/usb/Makefile | 3 | ||||
-rw-r--r-- | drivers/usb/r8a66597-hcd.c | 5 | ||||
-rw-r--r-- | include/configs/sbc8641d.h | 2 | ||||
-rw-r--r-- | lib_arm/bootm.c | 6 | ||||
-rw-r--r-- | lib_avr32/bootm.c | 6 | ||||
-rw-r--r-- | lib_blackfin/bootm.c | 6 | ||||
-rw-r--r-- | lib_i386/bootm.c | 6 | ||||
-rw-r--r-- | lib_m68k/bootm.c | 5 | ||||
-rw-r--r-- | lib_microblaze/bootm.c | 6 | ||||
-rw-r--r-- | lib_mips/bootm.c | 6 | ||||
-rw-r--r-- | lib_nios2/bootm.c | 6 | ||||
-rw-r--r-- | lib_ppc/bat_rw.c | 6 | ||||
-rw-r--r-- | lib_ppc/bootm.c | 5 | ||||
-rw-r--r-- | lib_sh/bootm.c | 6 | ||||
-rw-r--r-- | lib_sparc/bootm.c | 6 |
22 files changed, 53 insertions, 203 deletions
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c index 2dffdfac88..5295969260 100644 --- a/common/cmd_bootm.c +++ b/common/cmd_bootm.c @@ -361,10 +361,9 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) show_boot_progress (-9); #ifdef DEBUG puts ("\n## Control returned to monitor - resetting...\n"); - if (images.autostart) - do_reset (cmdtp, flag, argc, argv); + do_reset (cmdtp, flag, argc, argv); #endif - if (!images.autostart && iflag) + if (iflag) enable_interrupts(); return 1; diff --git a/common/cmd_mp.c b/common/cmd_mp.c index b2a397cdfb..c8444fb841 100644 --- a/common/cmd_mp.c +++ b/common/cmd_mp.c @@ -34,9 +34,9 @@ cpu_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) } cpuid = simple_strtoul(argv[1], NULL, 10); - if (cpuid >= CONFIG_NR_CPUS) { + if (cpuid >= CONFIG_NUM_CPUS) { printf ("Core num: %lu is out of range[0..%d]\n", - cpuid, CONFIG_NR_CPUS - 1); + cpuid, CONFIG_NUM_CPUS - 1); return 1; } diff --git a/common/image.c b/common/image.c index 1807348389..6d2ce32e7d 100644 --- a/common/image.c +++ b/common/image.c @@ -189,23 +189,6 @@ int image_check_dcrc (image_header_t *hdr) return (dcrc == image_get_dcrc (hdr)); } -void memmove_wd (void *to, void *from, size_t len, ulong chunksz) -{ -#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) - while (len > 0) { - size_t tail = (len > chunksz) ? chunksz : len; - WATCHDOG_RESET (); - memmove (to, from, tail); - to += tail; - from += tail; - len -= tail; - } -#else /* !(CONFIG_HW_WATCHDOG || CONFIG_WATCHDOG) */ - memmove (to, from, len); -#endif /* CONFIG_HW_WATCHDOG || CONFIG_WATCHDOG */ -} -#endif /* USE_HOSTCC */ - /** * image_multi_count - get component (sub-image) count * @hdr: pointer to the header of the multi component image diff --git a/cpu/mpc85xx/mp.c b/cpu/mpc85xx/mp.c index 554830f46a..4e09c9c258 100644 --- a/cpu/mpc85xx/mp.c +++ b/cpu/mpc85xx/mp.c @@ -147,7 +147,7 @@ static void pq3_mp_up(unsigned long bootpg) out_be32(&gur->devdisr, devdisr); /* release the hounds */ - up = ((1 << CONFIG_NR_CPUS) - 1); + up = ((1 << CONFIG_NUM_CPUS) - 1); bpcr = in_be32(&ecm->eebpcr); bpcr |= (up << 24); out_be32(&ecm->eebpcr, bpcr); @@ -157,7 +157,7 @@ static void pq3_mp_up(unsigned long bootpg) /* wait for everyone */ while (timeout) { int i; - for (i = 0; i < CONFIG_NR_CPUS; i++) { + for (i = 0; i < CONFIG_NUM_CPUS; i++) { if (table[i * NUM_BOOT_ENTRY + BOOT_ENTRY_ADDR_LOWER]) cpu_up_mask |= (1 << i); }; diff --git a/cpu/mpc85xx/release.S b/cpu/mpc85xx/release.S index a47edaea62..75676b5b9e 100644 --- a/cpu/mpc85xx/release.S +++ b/cpu/mpc85xx/release.S @@ -173,7 +173,7 @@ __secondary_start_page: .align L1_CACHE_SHIFT .globl __spin_table __spin_table: - .space CONFIG_NR_CPUS*ENTRY_SIZE + .space CONFIG_NUM_CPUS*ENTRY_SIZE /* Fill in the empty space. The actual reset vector is * the last word of the page */ diff --git a/cpu/mpc86xx/cpu_init.c b/cpu/mpc86xx/cpu_init.c index 78ba1ea8e5..1fda3fe805 100644 --- a/cpu/mpc86xx/cpu_init.c +++ b/cpu/mpc86xx/cpu_init.c @@ -26,8 +26,10 @@ * cpu_init.c - low level cpu init */ +#include <config.h> #include <common.h> #include <mpc86xx.h> +#include <asm/mmu.h> #include <asm/fsl_law.h> DECLARE_GLOBAL_DATA_PTR; @@ -121,3 +123,26 @@ int cpu_init_r(void) { return 0; } + +/* Set up BAT registers */ +void setup_bats(void) +{ + write_bat(DBAT0, CFG_DBAT0U, CFG_DBAT0L); + write_bat(IBAT0, CFG_IBAT0U, CFG_IBAT0L); + write_bat(DBAT1, CFG_DBAT1U, CFG_DBAT1L); + write_bat(IBAT1, CFG_IBAT1U, CFG_IBAT1L); + write_bat(DBAT2, CFG_DBAT2U, CFG_DBAT2L); + write_bat(IBAT2, CFG_IBAT2U, CFG_IBAT2L); + write_bat(DBAT3, CFG_DBAT3U, CFG_DBAT3L); + write_bat(IBAT3, CFG_IBAT3U, CFG_IBAT3L); + write_bat(DBAT4, CFG_DBAT4U, CFG_DBAT4L); + write_bat(IBAT4, CFG_IBAT4U, CFG_IBAT4L); + write_bat(DBAT5, CFG_DBAT5U, CFG_DBAT5L); + write_bat(IBAT5, CFG_IBAT5U, CFG_IBAT5L); + write_bat(DBAT6, CFG_DBAT6U, CFG_DBAT6L); + write_bat(IBAT6, CFG_IBAT6U, CFG_IBAT6L); + write_bat(DBAT7, CFG_DBAT7U, CFG_DBAT7L); + write_bat(IBAT7, CFG_IBAT7U, CFG_IBAT7L); + + return; +} diff --git a/cpu/mpc86xx/start.S b/cpu/mpc86xx/start.S index c39dc4681d..03f2128448 100644 --- a/cpu/mpc86xx/start.S +++ b/cpu/mpc86xx/start.S @@ -358,125 +358,6 @@ invalidate_bats: sync blr - - /* setup_bats - set them up to some initial state */ - /* Skip any BATS setup in early_bats */ - .globl setup_bats -setup_bats: - - addis r0, r0, 0x0000 - - /* IBAT 0 */ - addis r4, r0, CFG_IBAT0L@h - ori r4, r4, CFG_IBAT0L@l - addis r3, r0, CFG_IBAT0U@h - ori r3, r3, CFG_IBAT0U@l - mtspr IBAT0L, r4 - mtspr IBAT0U, r3 - isync - - /* DBAT 0 */ - addis r4, r0, CFG_DBAT0L@h - ori r4, r4, CFG_DBAT0L@l - addis r3, r0, CFG_DBAT0U@h - ori r3, r3, CFG_DBAT0U@l - mtspr DBAT0L, r4 - mtspr DBAT0U, r3 - isync - - /* IBAT 1 */ - addis r4, r0, CFG_IBAT1L@h - ori r4, r4, CFG_IBAT1L@l - addis r3, r0, CFG_IBAT1U@h - ori r3, r3, CFG_IBAT1U@l - mtspr IBAT1L, r4 - mtspr IBAT1U, r3 - isync - - /* DBAT 1 */ - addis r4, r0, CFG_DBAT1L@h - ori r4, r4, CFG_DBAT1L@l - addis r3, r0, CFG_DBAT1U@h - ori r3, r3, CFG_DBAT1U@l - mtspr DBAT1L, r4 - mtspr DBAT1U, r3 - isync - - /* IBAT 2 */ - addis r4, r0, CFG_IBAT2L@h - ori r4, r4, CFG_IBAT2L@l - addis r3, r0, CFG_IBAT2U@h - ori r3, r3, CFG_IBAT2U@l - mtspr IBAT2L, r4 - mtspr IBAT2U, r3 - isync - - /* DBAT 2 */ - addis r4, r0, CFG_DBAT2L@h - ori r4, r4, CFG_DBAT2L@l - addis r3, r0, CFG_DBAT2U@h - ori r3, r3, CFG_DBAT2U@l - mtspr DBAT2L, r4 - mtspr DBAT2U, r3 - isync - - /* IBAT 3 */ - addis r4, r0, CFG_IBAT3L@h - ori r4, r4, CFG_IBAT3L@l - addis r3, r0, CFG_IBAT3U@h - ori r3, r3, CFG_IBAT3U@l - mtspr IBAT3L, r4 - mtspr IBAT3U, r3 - isync - - /* DBAT 3 */ - addis r4, r0, CFG_DBAT3L@h - ori r4, r4, CFG_DBAT3L@l - addis r3, r0, CFG_DBAT3U@h - ori r3, r3, CFG_DBAT3U@l - mtspr DBAT3L, r4 - mtspr DBAT3U, r3 - isync - - /* IBAT 4 */ - addis r4, r0, CFG_IBAT4L@h - ori r4, r4, CFG_IBAT4L@l - addis r3, r0, CFG_IBAT4U@h - ori r3, r3, CFG_IBAT4U@l - mtspr IBAT4L, r4 - mtspr IBAT4U, r3 - isync - - /* DBAT 4 */ - addis r4, r0, CFG_DBAT4L@h - ori r4, r4, CFG_DBAT4L@l - addis r3, r0, CFG_DBAT4U@h - ori r3, r3, CFG_DBAT4U@l - mtspr DBAT4L, r4 - mtspr DBAT4U, r3 - isync - - /* IBAT 7 */ - addis r4, r0, CFG_IBAT7L@h - ori r4, r4, CFG_IBAT7L@l - addis r3, r0, CFG_IBAT7U@h - ori r3, r3, CFG_IBAT7U@l - mtspr IBAT7L, r4 - mtspr IBAT7U, r3 - isync - - /* DBAT 7 */ - addis r4, r0, CFG_DBAT7L@h - ori r4, r4, CFG_DBAT7L@l - addis r3, r0, CFG_DBAT7U@h - ori r3, r3, CFG_DBAT7U@l - mtspr DBAT7L, r4 - mtspr DBAT7U, r3 - isync - - sync - blr - /* * early_bats: * diff --git a/drivers/usb/Makefile b/drivers/usb/Makefile index 2bdbb59cd5..c67a490f0a 100644 --- a/drivers/usb/Makefile +++ b/drivers/usb/Makefile @@ -25,10 +25,11 @@ include $(TOPDIR)/config.mk LIB := $(obj)libusb.a +COBJS-$(CONFIG_USB_R8A66597_HCD) += r8a66597-hcd.o + COBJS-y += isp116x-hcd.o COBJS-y += sl811_usb.o COBJS-y += usb_ohci.o -COBJS-y += r8a66597-hcd.o COBJS-y += usbdcore.o COBJS-y += usbdcore_ep0.o COBJS-y += usbdcore_mpc8xx.o diff --git a/drivers/usb/r8a66597-hcd.c b/drivers/usb/r8a66597-hcd.c index 3eb4cb03f0..0d3931e10f 100644 --- a/drivers/usb/r8a66597-hcd.c +++ b/drivers/usb/r8a66597-hcd.c @@ -24,8 +24,6 @@ #include "r8a66597.h" -#if defined(CONFIG_USB_R8A66597_HCD) - #ifdef R8A66597_DEBUG #define R8A66597_DPRINT printf #else @@ -919,6 +917,3 @@ int usb_lowlevel_stop(void) return 0; } - -#endif /* CONFIG_USB_R8A66597_HCD */ - diff --git a/include/configs/sbc8641d.h b/include/configs/sbc8641d.h index 3cd9ff80f6..ebfcb46324 100644 --- a/include/configs/sbc8641d.h +++ b/include/configs/sbc8641d.h @@ -58,6 +58,8 @@ #define CONFIG_TSEC_ENET /* tsec ethernet support */ #define CONFIG_ENV_OVERWRITE +#define CONFIG_HIGH_BATS 1 /* High BATs supported and enabled */ + #undef CONFIG_SPD_EEPROM /* Do not use SPD EEPROM for DDR setup*/ #undef CONFIG_DDR_DLL /* possible DLL fix needed */ #define CONFIG_DDR_2T_TIMING /* Sets the 2T timing bit */ diff --git a/lib_arm/bootm.c b/lib_arm/bootm.c index b838c374ac..955a1ae3a2 100644 --- a/lib_arm/bootm.c +++ b/lib_arm/bootm.c @@ -137,9 +137,6 @@ void do_bootm_linux (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[], setup_end_tag (bd); #endif - if (!images->autostart) - return ; - /* we assume that the kernel is in place */ printf ("\nStarting kernel ...\n\n"); @@ -157,8 +154,7 @@ void do_bootm_linux (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[], return; error: - if (images->autostart) - do_reset (cmdtp, flag, argc, argv); + do_reset (cmdtp, flag, argc, argv); return; } diff --git a/lib_avr32/bootm.c b/lib_avr32/bootm.c index 5ff8c79e9b..60e6b36369 100644 --- a/lib_avr32/bootm.c +++ b/lib_avr32/bootm.c @@ -221,9 +221,6 @@ void do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[], params = setup_ethernet_tags(params); setup_end_tag(params); - if (!images->autostart) - return ; - printf("\nStarting kernel at %p (params at %p)...\n\n", theKernel, params_start); @@ -234,7 +231,6 @@ void do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[], return; error: - if (images->autostart) - do_reset (cmdtp, flag, argc, argv); + do_reset (cmdtp, flag, argc, argv); return; } diff --git a/lib_blackfin/bootm.c b/lib_blackfin/bootm.c index ef4b1127fc..54f69a92c7 100644 --- a/lib_blackfin/bootm.c +++ b/lib_blackfin/bootm.c @@ -40,9 +40,6 @@ void do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[], char *cmdline; ulong ep = 0; - if (!images->autostart) - return; - #ifdef SHARED_RESOURCES swap_to(FLASH); #endif @@ -74,6 +71,5 @@ void do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[], return; error: - if (images->autostart) - do_reset (cmdtp, flag, argc, argv); + do_reset (cmdtp, flag, argc, argv); } diff --git a/lib_i386/bootm.c b/lib_i386/bootm.c index d959107c73..452eef73bd 100644 --- a/lib_i386/bootm.c +++ b/lib_i386/bootm.c @@ -84,9 +84,6 @@ void do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[], } - if (!images->autostart) - return ; - #ifdef DEBUG printf ("## Transferring control to Linux (at address %08x) ...\n", (u32)base_ptr); @@ -100,7 +97,6 @@ void do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[], return; error: - if (images->autostart) - do_reset (cmdtp, flag, argc, argv); + do_reset (cmdtp, flag, argc, argv); return; } diff --git a/lib_m68k/bootm.c b/lib_m68k/bootm.c index 61f1a3648a..b45203d170 100644 --- a/lib_m68k/bootm.c +++ b/lib_m68k/bootm.c @@ -129,8 +129,6 @@ void do_bootm_linux(cmd_tbl_t * cmdtp, int flag, show_boot_progress (15); - if (!images->autostart) - return; /* * Linux Kernel Parameters (passing board info data): * r3: ptr to board info data @@ -144,8 +142,7 @@ void do_bootm_linux(cmd_tbl_t * cmdtp, int flag, return ; error: - if (images->autostart) - do_reset (cmdtp, flag, argc, argv); + do_reset (cmdtp, flag, argc, argv); return ; } diff --git a/lib_microblaze/bootm.c b/lib_microblaze/bootm.c index 30a03ef359..68edcdba1d 100644 --- a/lib_microblaze/bootm.c +++ b/lib_microblaze/bootm.c @@ -67,15 +67,11 @@ void do_bootm_linux (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[], (ulong) theKernel); #endif - if (!images->autostart) - return ; - theKernel (commandline); /* does not return */ return; error: - if (images->autostart) - do_reset (cmdtp, flag, argc, argv); + do_reset (cmdtp, flag, argc, argv); return; } diff --git a/lib_mips/bootm.c b/lib_mips/bootm.c index 5c46a5aec3..53e8e19c94 100644 --- a/lib_mips/bootm.c +++ b/lib_mips/bootm.c @@ -120,9 +120,6 @@ void do_bootm_linux (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[], linux_env_set("eth1addr", cp); } - if (!images->autostart) - return ; - /* we assume that the kernel is in place */ printf ("\nStarting kernel ...\n\n"); @@ -131,8 +128,7 @@ void do_bootm_linux (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[], return; error: - if (images->autostart) - do_reset (cmdtp, flag, argc, argv); + do_reset (cmdtp, flag, argc, argv); return; } diff --git a/lib_nios2/bootm.c b/lib_nios2/bootm.c index 01f4e87cb4..18cf7736ef 100644 --- a/lib_nios2/bootm.c +++ b/lib_nios2/bootm.c @@ -50,9 +50,6 @@ void do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[], } void (*kernel)(void) = (void (*)(void))ep; - if (!images->autostart) - return ; - /* For now we assume the Microtronix linux ... which only * needs to be called ;-) */ @@ -61,7 +58,6 @@ void do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[], return; error: - if (images->autostart) - do_reset (cmdtp, flag, argc, argv); + do_reset (cmdtp, flag, argc, argv); return; } diff --git a/lib_ppc/bat_rw.c b/lib_ppc/bat_rw.c index 8546333868..a40b377bca 100644 --- a/lib_ppc/bat_rw.c +++ b/lib_ppc/bat_rw.c @@ -25,9 +25,12 @@ #include <common.h> #include <asm/processor.h> #include <asm/mmu.h> +#include <asm/io.h> int write_bat (ppc_bat_t bat, unsigned long upper, unsigned long lower) { + sync(); + switch (bat) { case DBAT0: mtspr (DBAT0L, lower); @@ -99,6 +102,9 @@ int write_bat (ppc_bat_t bat, unsigned long upper, unsigned long lower) return (-1); } + sync(); + isync(); + return (0); } diff --git a/lib_ppc/bootm.c b/lib_ppc/bootm.c index 81803ddef3..cbe5592a94 100644 --- a/lib_ppc/bootm.c +++ b/lib_ppc/bootm.c @@ -277,8 +277,6 @@ do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[], #if defined(CFG_INIT_RAM_LOCK) && !defined(CONFIG_E500) unlock_ram_in_cache(); #endif - if (!images->autostart) - return ; #if defined(CONFIG_OF_LIBFDT) if (of_flat_tree) { /* device tree; boot new style */ @@ -311,8 +309,7 @@ do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[], return ; error: - if (images->autostart) - do_reset (cmdtp, flag, argc, argv); + do_reset (cmdtp, flag, argc, argv); return ; } diff --git a/lib_sh/bootm.c b/lib_sh/bootm.c index dd32a3ed84..4ee7ff3fd7 100644 --- a/lib_sh/bootm.c +++ b/lib_sh/bootm.c @@ -83,9 +83,6 @@ void do_bootm_linux (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[], } void (*kernel) (void) = (void (*)(void))ep; - if (!images->autostart) - return ; - /* Setup parameters */ memset(PARAM, 0, 0x1000); /* Clear zero page */ strcpy(COMMAND_LINE, bootargs); @@ -95,7 +92,6 @@ void do_bootm_linux (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[], return; error: - if (images->autostart) - do_reset (cmdtp, flag, argc, argv); + do_reset (cmdtp, flag, argc, argv); return; } diff --git a/lib_sparc/bootm.c b/lib_sparc/bootm.c index 8900b2e581..b1a3d98c15 100644 --- a/lib_sparc/bootm.c +++ b/lib_sparc/bootm.c @@ -204,9 +204,6 @@ void do_bootm_linux(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[], bootargs = getenv("bootargs"); prepare_bootargs(bootargs); - if (!images->autostart) - return; - /* turn on mmu & setup context table & page table for process 0 (kernel) */ srmmu_init_cpu((unsigned int)kernel); @@ -220,7 +217,6 @@ void do_bootm_linux(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[], while (1) ; error: - if (images->autostart) - do_reset(cmdtp, flag, argc, argv); + do_reset(cmdtp, flag, argc, argv); return; } |