?? u-boot-lpc2294.patch
字號:
+.equ B6_SCAN, 0x0 /* 10bit */++.equ B7_MT, 0x3 /* SDRAM */+.equ B7_Trcd, 0x0 /* 2clk */+.equ B7_SCAN, 0x0 /* 10bit */+++/* REFRESH parameter */+.equ REFEN, 0x1 /* Refresh enable */+.equ TREFMD, 0x0 /* CBR(CAS before RAS)/Auto refresh */+.equ Trp, 0x0 /* 2clk */+.equ Trc, 0x3 /* 0x1=5clk 0x3=11clk*/+.equ Tchr, 0x0 /* 0x2=3clk 0x0=0clks */+.equ REFCNT, 879++MEMORY_CONFIG:+ .long 0x12111900 /* Bank0 = OM[1:0] , Bank1-7 16bit, Bank2=Nowait,UB/LB*/+ .word ((B0_Tacs<<13)+(B0_Tcos<<11)+(B0_Tacc<<8)+(B0_Tcoh<<6)+(B0_Tah<<4)+(B0_Tacp<<2)+(B0_PMC)) /*GCS0*/+ .word ((B1_Tacs<<13)+(B1_Tcos<<11)+(B1_Tacc<<8)+(B1_Tcoh<<6)+(B1_Tah<<4)+(B1_Tacp<<2)+(B1_PMC)) /*GCS1*/+ .word ((B2_Tacs<<13)+(B2_Tcos<<11)+(B2_Tacc<<8)+(B2_Tcoh<<6)+(B2_Tah<<4)+(B2_Tacp<<2)+(B2_PMC)) /*GCS2*/+ .word ((B3_Tacs<<13)+(B3_Tcos<<11)+(B3_Tacc<<8)+(B3_Tcoh<<6)+(B3_Tah<<4)+(B3_Tacp<<2)+(B3_PMC)) /*GCS3*/+ .word ((B4_Tacs<<13)+(B4_Tcos<<11)+(B4_Tacc<<8)+(B4_Tcoh<<6)+(B4_Tah<<4)+(B4_Tacp<<2)+(B4_PMC)) /*GCS4*/+ .word ((B5_Tacs<<13)+(B5_Tcos<<11)+(B5_Tacc<<8)+(B5_Tcoh<<6)+(B5_Tah<<4)+(B5_Tacp<<2)+(B5_PMC)) /*GCS5*/+ .word ((B6_MT<<15)+(B6_Trcd<<2)+(B6_SCAN)) /*GCS6*/+ .word ((B7_MT<<15)+(B7_Trcd<<2)+(B7_SCAN)) /*GCS7*/+ .word ((REFEN<<23)+(TREFMD<<22)+(Trp<<20)+(Trc<<18)+(Tchr<<16)+REFCNT) /*REFRESH RFEN=1, TREFMD=0, trp=3clk, trc=5clk, tchr=3clk,count=1019*/+ .word 0x17 /*SCLK power down mode, BANKSIZE 16M/16M*/+ .word 0x20 /*MRSR6 CL=2clk*/+ .word 0x20 /*MRSR7*/++#define MAMCR 0xE01FC000+#define MAMTIM 0xE01FC004+#define VICIntEnClr 0xFFFFF014+#define VICVectAddr 0xFFFFF030+#define VICIntSelect 0xFFFFF00C++.globl lowlevel_init+lowlevel_init:++/* Set MAM parameters */+ ldr r0, =MAMCR+ ldr r1, =0x0+ str r1, [r0]+ + ldr r0, =MAMTIM+ ldr r1, =0x3+ str r1, [r0]+ + ldr r0, =MAMCR+ ldr r1, =0x2+ str r1, [r0]+ + ldr r0, =VICIntEnClr+ ldr r1, =0xffffffff+ str r1, [r0]+ + ldr r0, =VICVectAddr+ ldr r1, =0x0+ str r1, [r0]+ ldr r0, =VICIntSelect+ str r1, [r0]+ + mov pc, lr+diff -Naur u-boot-origin/board/lpc2294/lpc2294.c u-boot-1.1.3/board/lpc2294/lpc2294.c--- u-boot-origin/board/lpc2294/lpc2294.c 1970-01-01 07:00:00.000000000 +0700+++ u-boot-1.1.3/board/lpc2294/lpc2294.c 2005-09-07 09:43:56.000000000 +0800@@ -0,0 +1,51 @@+/*+ * Copyright (c) 2004 Cucy Systems (http://www.cucy.com)+ * Curt Brune <curt@cucy.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+ */++#include <common.h>+#include <asm/hardware.h>+#include <command.h>+++++int board_init (void)+{+++ /*we have nothing to do here*/++ return 0;+}++int dram_init (void)+{+ DECLARE_GLOBAL_DATA_PTR;+ gd->bd->bi_dram[0].start = PHYS_SDRAM_1;+ gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;+#if CONFIG_NR_DRAM_BANKS == 2+ gd->bd->bi_dram[1].start = PHYS_SDRAM_2;+ gd->bd->bi_dram[1].size = PHYS_SDRAM_2_SIZE;+#endif+ return 0;+}+diff -Naur u-boot-origin/board/lpc2294/Makefile u-boot-1.1.3/board/lpc2294/Makefile--- u-boot-origin/board/lpc2294/Makefile 1970-01-01 07:00:00.000000000 +0700+++ u-boot-1.1.3/board/lpc2294/Makefile 2005-09-07 09:43:56.000000000 +0800@@ -0,0 +1,47 @@+#+# (C) Copyright 2000-2004+# Wolfgang Denk, DENX Software Engineering, wd@denx.de.+#+# 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+#++include $(TOPDIR)/config.mk++LIB = lib$(BOARD).a++OBJS := lpc2294.o flash.o+SOBJS := lowlevel_init.o++$(LIB): $(OBJS) $(SOBJS)+ $(AR) crv $@ $^++clean:+ rm -f $(SOBJS) $(OBJS)++distclean: clean+ rm -f $(LIB) core *.bak .depend++#########################################################################++.depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c)+ $(CC) -M $(CPPFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@++-include .depend++#########################################################################diff -Naur u-boot-origin/board/lpc2294/u-boot.lds u-boot-1.1.3/board/lpc2294/u-boot.lds--- u-boot-origin/board/lpc2294/u-boot.lds 1970-01-01 07:00:00.000000000 +0700+++ u-boot-1.1.3/board/lpc2294/u-boot.lds 2005-09-07 09:43:56.000000000 +0800@@ -0,0 +1,57 @@+/*+ * (C) Copyright 2000-2004+ * Wolfgang Denk, DENX Software Engineering, wd@denx.de.+ *+ * 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-littlearm", "elf32-littlearm", "elf32-littlearm")+OUTPUT_ARCH(arm)+ENTRY(_start)+SECTIONS+{+ . = 0x00000000;++ . = ALIGN(4);+ .text :+ {+ cpu/arm7tdmi/start.o (.text)+ *(.text)+ }++ . = ALIGN(4);+ .rodata : { *(.rodata) }++ . = ALIGN(4);+ .data : { *(.data) }++ . = ALIGN(4);+ .got : { *(.got) }++ __u_boot_cmd_start = .;+ .u_boot_cmd : { *(.u_boot_cmd) }+ __u_boot_cmd_end = .;++ armboot_end_data = .;++ . = ALIGN(4);+ __bss_start = .;+ .bss : { *(.bss) }+ _end = .;+}diff -Naur u-boot-origin/cpu/arm7tdmi/config.mk u-boot-1.1.3/cpu/arm7tdmi/config.mk--- u-boot-origin/cpu/arm7tdmi/config.mk 1970-01-01 07:00:00.000000000 +0700+++ u-boot-1.1.3/cpu/arm7tdmi/config.mk 2005-09-07 09:43:36.000000000 +0800@@ -0,0 +1,28 @@+#+# (C) Copyright 2002+# Sysgo Real-Time Solutions, GmbH <www.elinos.com>+# Marius Groeger <mgroeger@sysgo.de>+#+# 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+#++PLATFORM_RELFLAGS += -fno-strict-aliasing -fno-common -ffixed-r8 \+ -mshort-load-bytes -msoft-float++PLATFORM_CPPFLAGS += -mapcs-32 -march=armv4 -mtune=arm7tdmi -msoft-floatdiff -Naur u-boot-origin/cpu/arm7tdmi/cpu.c u-boot-1.1.3/cpu/arm7tdmi/cpu.c--- u-boot-origin/cpu/arm7tdmi/cpu.c 1970-01-01 07:00:00.000000000 +0700+++ u-boot-1.1.3/cpu/arm7tdmi/cpu.c 2005-09-07 09:43:36.000000000 +0800@@ -0,0 +1,145 @@+/*+ * (C) Copyright 2004+ * DAVE Srl+ * http://www.dave-tech.it+ * http://www.wawnet.biz+ * mailto:info@wawnet.biz+ *+ * 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+ */++/*+ * S3C44B0 CPU specific code+ */++#include <common.h>+#include <command.h>+#include <asm/hardware.h>+++++int cpu_init (void)+{+ /*we have nothing to do here,cause we have no cache + *icache_enable();+ */+ return 0;+}++int cleanup_before_linux (void)+{+ /*+ cache memory should be enabled before calling+ Linux to make the kernel uncompression faster+ */+ /*we have nothing to do here,cause we have no cache+ *icache_enable();+ */+ disable_interrupts ();++ return 0;+}++void reset_cpu (ulong addr)+{+ /*+ reset the cpu using watchdog+ */+ + /* set the timeout value ,the minimum value is 0xff */+ WDTC=0x000000ff;+ /* setup the watchdog mode */+ WDMOD=0x03;+ /* start the watchdog */+ WDFEED=0xaa;+ WDFEED=0x55;+ + /*wait ...*/+ while(1) {+ /*NOP*/+ }+}++int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])+{+ extern void reset_cpu (ulong addr);++ disable_interrupts ();+ reset_cpu (0);++ /*NOTREACHED*/+ return (0);+}++void icache_enable (void)+{+}++void icache_disable (void)+{+}++int icache_status (void)+{+ return 0;+}++void dcache_enable (void)+{+ icache_enable();+}++void dcache_disable (void)+{+ icache_disable();+}++int dcache_status (void)+{+ return icache_status();+}++/*+ RTC stuff+*/+#include <rtc.h>+#ifndef BCD2HEX+ #define BCD2HEX(n) ((n>>4)*10+(n&0x0f))+#endif+#ifndef HEX2BCD+ #define HEX2BCD(x) ((((x) / 10) << 4) + (x) % 10)+#endif++void rtc_get (struct rtc_time* tm)+{+ +}++void rtc_set (struct rtc_time* tm)+{+ +}++void rtc_reset (void)+{+ +}++diff -Naur u-boot-origin/cpu/arm7tdmi/interrupts.c u-boot-1.1.3/cpu/arm7tdmi/interrupts.c--- u-boot-origin/cpu/arm7tdmi/interrupts.c 1970-01-01 07:00:00.000000000 +0700+++ u-boot-1.1.3/cpu/arm7tdmi/interrupts.c 2005-09-07 09:43:36.000000000 +0800@@ -0,0 +1,232 @@+/*+ * (C) Copyright 2004+ * DAVE Srl+ * http://www.dave-tech.it+ * http://www.wawnet.biz+ * mailto:info@wawnet.biz+ *+ * 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+ */++#include <common.h>+#include <asm/hardware.h>++#include <asm/proc-armv/ptrace.h>++extern void reset_cpu(ulong addr);++/* we always count down the max. */+#define TIMER_LOAD_VAL 0xffff++/* macro to read the 16 bit timer */+#define READ_TIMER (T0TC & 0xffff)++#ifdef CONFIG_USE_IRQ+#error CONFIG_USE_IRQ NOT supported+#else+void enable_interrupts (void)+{+ return;+}+int disable_interrupts (void)+{+ return 0;+}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -