⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 u-boot-1.2.0-edb93xx_support.diff

📁 u-boot 1.2.0 for ep93
💻 DIFF
📖 第 1 页 / 共 5 页
字号:
+//****************************************************************************+    .macro SdramCfg+       //+    // Initialize the SDRAM Configuration+    //+#ifdef CONFIG_EP9301+       ldr     r0, =(DEVCFG_BANKCOUNT | DEVCFG_SROMLL | DEVCFG_CASLAT_3 | \+                  DEVCFG_RASTOCAS_3 | DEVCFG_EXTBUSWIDTH)+#else+       ldr     r0, =(DEVCFG_BANKCOUNT | DEVCFG_SROMLL | DEVCFG_CASLAT_2 | \+                  DEVCFG_RASTOCAS_2)+#endif // CONFIG_EP9301+    ldr     r1, =0x8006001C+    str     r0, [r1]++    Delay200++    //+    // Set the Initialize and MRS bits (issue continuous NOP commands+    // (INIT & MRS set))+    //+    ldr     r0, =(GLOBALCFG_INIT | GLOBALCFG_MRS | GLOBALCFG_CKE)+    ldr     r1, =0x80060004+    str     r0, [r1]++    Delay200++    //+    // Clear the MRS bit to issue a precharge all.+    //+    ldr     r0, =(GLOBALCFG_INIT | GLOBALCFG_CKE)+    str     r0, [r1]++    //+    // Temporarily set the refresh timer to 0x10.  Make it really low so that+    // auto refresh cycles are generated. is refreshed.+    //+    ldr     r0, =0x10+    ldr     r1, =0x80060008+    str     r0, [r1]++    Delay200++#ifdef CONFIG_EP9301+    ldr     r0, =0x204+#else+    ldr     r0, =0x23+#endif // CONFIG_EP9301+    ldr     r1, =0x80060008+    str     r0, [r1]++    //+    // Select mode register update mode+    //+    ldr     r0, =(GLOBALCFG_CKE | GLOBALCFG_MRS)+    ldr     r1, =0x80060004+    str     r0, [r1]++// *******************************************************************+//+// Program the SDRAM mode register using the row information.+//+//       |           |           |           |+// +--+--+--+--+--+--+--+--+--+--+--+--+--+--++// |13|12|11|10|09|08|07|06|05|04|03|02|01|00|+// +--+--+--+--+--+--+--+--+--+--+--+--+--+--++//   +---------+------+  +---+--+  +   +--+--++//              |             |     |     |+//          Must Be Zero      |     |     |+//                            |     |     |+//                            |     |     |+//    LTMODE   ---------------+     |     |+//                                  |     |+//  Wrap type  ---------------------+     |+//                                        |+// CAS Latency ---------------------------++//+// *******************************************************************+//+// Row Column mapping for 256Meg X 16 Bits X 2.+//+//           B1  B0  A13 A12 A11 A10 A09 A08 A07 A06 A05 A04 A03 A02 A01 A00+//+// Row/Bank  A27 A26 A23 A22 A21 A20 A19 A18 A17 A16 A15 A14 A13 A12 A11 A10+//+// Col       A27 A26             AP  A25 A24 A09 A08 A07 A06 A05 A04 A03 A02+//+// *******************************************************************+// Sets all four banks using  - Cas latency 3+//                            - Wrap type sequential+//                            - Burst Length 4+//+// *******************************************************************+#ifdef CONFIG_EP9301+    mov     r1, #0x0006600+    ldr     r0, [r1]+#else+    mov     r1, #0x0008800+    ldr     r0, [r1]++    ldr     r1, =0x0400000+    ldr     r0, [r1]++    ldr     r1, =0x0808800+    ldr     r0, [r1]++    ldr     r1, =0x0c08800+    ldr     r0, [r1]+#endif // CONFIG_EP9301++    //+    // Select mode register update mode+    //+    ldr     r0, =GLOBALCFG_CKE+    ldr     r1, =0x80060004+    str     r0, [r1]++    .endmIndex: u-boot/board/edb93xx/u-boot.lds===================================================================--- /dev/null	1970-01-01 00:00:00.000000000 +0000+++ u-boot/board/edb93xx/u-boot.lds	2007-09-23 13:40:50.000000000 +0200@@ -0,0 +1,59 @@+/*+ * (C) Copyright 2000-2004+ * Wolfgang Denk, DENX Software Engineering, wd@xxxxxxxx+ *+ * 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/arm920t/start.o (.text)+	       . = 0x1000;+	       LONG(0x53555243)+               *(.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 = .;++       . = ALIGN(4);+       __bss_start = .;+       .bss : { *(.bss) }+       _end = .;+}Index: u-boot/cpu/arm920t/ep93xx/eth.c===================================================================--- /dev/null	1970-01-01 00:00:00.000000000 +0000+++ u-boot/cpu/arm920t/ep93xx/eth.c	2007-09-23 14:31:45.000000000 +0200@@ -0,0 +1,929 @@+/* vim: set ts=8 sw=8 noet:+ *+ * Cirrus Logic EP93xx ethernet MAC / MII driver.+ *+ * Copyright (C) 2004, 2005+ * Cory T. Tusar, Videon Central, Inc., <ctusar@xxxxxxxxxxxxxxxxxx>+ *+ * Based on the original eth.[ch] Cirrus Logic EP93xx Rev D. Ethernet Driver,+ * which is+ *+ * (C) Copyright 2002 2003+ * Adam Bezanson, Network Audio Technologies, Inc.+ * <bezanson@xxxxxxxxxxxxxxxx>+ *+ * 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.,+ * 675 Mass Ave, Cambridge, MA 02139, USA.+ */+#include <command.h>+#include <common.h>+#include <ep93xx.h>+#include <malloc.h>+#include <miiphy.h>+#include <net.h>+#include <linux/types.h>+++/**+ * Send an error message to the terminal.+ */+#define ERROR(x) \+do { \+       char *__foo = strrchr(__FILE__, '/'); \+       \+       printf("%s: %d: %s(): ", (__foo == NULL ? __FILE__ : (__foo + 1)), \+                       __LINE__, __FUNCTION__); \+       printf x; printf("\n"); \+} while (0);+++/**+ * Send a trace message to the terminal.+ */+#if 0+#define TRACE(x) \+do { \+       char *__foo = strrchr(__FILE__, '/'); \+       \+       printf("%s: %d: %s(): ", (__foo == NULL ? __FILE__ : (__foo + 1)), \+               __LINE__, __FUNCTION__); \+       printf x; printf("\n"); \+} while (0);++#else+#define TRACE(x)+#endif+++/* -----------------------------------------------------------------------------+ * EP93xx ethernet MAC functionality+ */+#if defined(CONFIG_DRIVER_EP93XX_MAC)++/**+ * #define this to dump device status and queue info during initialization and+ * following errors.+ */+#undef EP93XX_MAC_DEBUG++/**+ * Number of descriptor and status entries in our RX queues.+ */+#define NUMRXDESC              (8)++/**+ * Number of descriptor and status entries in our TX queues.+ */+#define NUMTXDESC              (1)++/**+ * 944 = (1024 - 64) - 16, Fifo size - Minframesize - 16 (Chip FACT)+ */+#define TXSTARTMAX             (944)+++/**+ * Ethernet MAC interface return values for public functions.+ */+enum eth_status {+       ETH_STATUS_SUCCESS = 0,+       ETH_STATUS_FAILURE = 1,+};+++/**+ * Receive descriptor queue entry+ */+struct rx_descriptor_t {+       union {+               uint32_t word1;++               struct {+                       unsigned buffer_address : 32;+               };+       };++       union {+               uint32_t word2;++               struct {+                       unsigned buffer_length  : 16;+                       unsigned buffer_index   : 15;+                       unsigned not_sof        :  1;+               };+       };+} __attribute__((packed));++typedef struct rx_descriptor_t rx_descriptor_t;+++/**+ * Receive status queue entry+ */+struct rx_status_t {+       union {+               uint32_t word1;++               struct {+                       unsigned                :  8;+                       unsigned hti            :  6;+                       unsigned                :  1;+                       unsigned crci           :  1;+                       unsigned crce           :  1;+                       unsigned edata          :  1;+                       unsigned runt           :  1;+                       unsigned fe             :  1;+                       unsigned oe             :  1;+                       unsigned rx_err         :  1;+                       unsigned am             :  2;+                       unsigned                :  4;+                       unsigned eob            :  1;+                       unsigned eof            :  1;+                       unsigned rwe            :  1;+                       unsigned rfp            :  1;+               };+       };++       union {+               uint32_t word2;++               struct {+                       unsigned frame_length   : 16;+                       unsigned buffer_index   : 15;+                       unsigned rfp            :  1;+               };+       };+} __attribute__((packed));++typedef struct rx_status_t rx_status_t;+++/**+ * Transmit descriptor queue entry+ */+struct tx_descriptor_t+{+       union {+               uint32_t word1;++               struct {+                       unsigned buffer_address : 32;+               };+       };++       union {+               uint32_t word2;++               struct {+                       unsigned buffer_length  : 12;+                       unsigned                :  3;+                       unsigned abort_frame    :  1;+                       unsigned buffer_index   : 15;+                       unsigned eof            :  1;+               };+       };+} __attribute__((packed));++typedef struct tx_descriptor_t tx_descriptor_t;+++/**+ * Transmit status queue entry+ */+struct tx_status_t {+       union {+               uint32_t word1;++               struct {+                       unsigned tbi            : 15;+                       unsigned                :  1;+                       unsigned ncoll          :  5;+                       unsigned                :  3;+                       unsigned ecoll          :  1;+                       unsigned txu            :  1;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -