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

📄 u-boot-1.1.4-imx21-jk1.patch

📁 针对freescale imx21的linux2.6的补丁。因为官方只提供2.4内核
💻 PATCH
📖 第 1 页 / 共 5 页
字号:
+        str     r0, [r1]+        ldr     r2, =0xC0200000         @ precharge all+        ldr     r0, [r2]+        bl      mem_delay++	/* JEDEC 3.11.5.1-7: issue 8 or more autorefresh commands */++        ldr     r0, =0xA2120300         @ auto-refresh command+        str     r0, [r1]+        ldr     r2, =0xC0000000         @ special read from SDRAM+        ldr     r0, [r2]+        ldr     r0, [r2]+        ldr     r0, [r2]+        ldr     r0, [r2]+        ldr     r0, [r2]+        ldr     r0, [r2]+        ldr     r0, [r2]+        ldr     r0, [r2]++	/* Set mode register command */+        ldr     r0, =0xB2120300         @ set mode register+        str     r0, [r1]++	/* + 	 * 0x119800 >> (9cols + 2) = 0x233+	 *+ 	 * Burst Length 	8 	(0x3) +	 * CAS Latency 		3 	(0x30)+	 * Write Burst		enabled	(0x200)+	 *  +	 */+        ldr     r2, =0xC0119800         @ mode register command+        ldr     r0, [r2]+        bl      mem_delay++	/* Goto normal mode */+        ldr     r0, =0x8212F339         @ CAS 3+        str     r0, [r1]                @ set normal mode++	/* led */+	ldr     r0, =OBR_BASE+        ldrh    r1, [r0]+        orr     r1, r1, #(OBR_LED3_ON)                  /* start with LED 3 on */+        bic     r1, r1, #(OBR_LED4_ON)                  /* start with LED 4 off */+        strh    r1, [r0]++        mov     pc, r5                  @ split+++/*+ *  spin for a while.  we need to wait at least 200 usecs.+ */+mem_delay:+        mov     r6, lr                  @ save return addr++        mov     r4, #0x4000             @ way longer than 200 usec+spin:   subs    r4, r4, #1+        bne     spin++        mov     pc, r6+diff -X linux/Documentation/dontdiff -Nur u-boot-1.1.4/board/fs3/Makefile u-boot-1.1.4.imx21/board/fs3/Makefile--- u-boot-1.1.4/board/fs3/Makefile	1970-01-01 01:00:00.000000000 +0100+++ u-boot-1.1.4.imx21/board/fs3/Makefile	2006-07-03 20:00:37.000000000 +0200@@ -0,0 +1,48 @@+#+# board/fs3/Makefile+#+# (c) Copyright 2004+# Techware Information Technology, Inc.+# http://www.techware.com.tw/+#+# Ming-Len Wu <minglen_wu@techware.com.tw>+#+# 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	:= fs3.o flash.o+SOBJS	:= lowlevel_init.o++$(LIB):	$(OBJS) $(SOBJS)+	$(AR) crv $@ $(OBJS) $(SOBJS)++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 -X linux/Documentation/dontdiff -Nur u-boot-1.1.4/board/fs3/u-boot.lds u-boot-1.1.4.imx21/board/fs3/u-boot.lds--- u-boot-1.1.4/board/fs3/u-boot.lds	1970-01-01 01:00:00.000000000 +0100+++ u-boot-1.1.4.imx21/board/fs3/u-boot.lds	2006-07-03 19:52:13.000000000 +0200@@ -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+{+	. = 0xc8000000;++	. = ALIGN(4);+	.text      :+	{+		cpu/arm926ejs/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 = .;++	. = ALIGN(4);+	__bss_start = .;+	.bss : { *(.bss) }+	_end = .;+}diff -X linux/Documentation/dontdiff -Nur u-boot-1.1.4/board/mx21ads/cmd_lcdinit.c u-boot-1.1.4.imx21/board/mx21ads/cmd_lcdinit.c--- u-boot-1.1.4/board/mx21ads/cmd_lcdinit.c	1970-01-01 01:00:00.000000000 +0100+++ u-boot-1.1.4.imx21/board/mx21ads/cmd_lcdinit.c	2006-07-04 17:57:07.000000000 +0200@@ -0,0 +1,67 @@+#include <common.h>+#include <command.h>+#include <asm/arch/imx21-regs.h>++void lcdinit()+{+	memset(0xC3FC0000,0,76800*2);+	imx_gpio_mode(PD15_PF_LD0);+	imx_gpio_mode(PD16_PF_LD1);+	imx_gpio_mode(PD17_PF_LD2);+	imx_gpio_mode(PD18_PF_LD3);+	imx_gpio_mode(PD19_PF_LD4);+	imx_gpio_mode(PD20_PF_LD5);+	imx_gpio_mode(PD21_PF_LD6);+	imx_gpio_mode(PD22_PF_LD7);+	imx_gpio_mode(PD23_PF_LD8);+	imx_gpio_mode(PD24_PF_LD9);+	imx_gpio_mode(PD25_PF_LD10);+	imx_gpio_mode(PD26_PF_LD11);+	imx_gpio_mode(PD27_PF_LD12);+	imx_gpio_mode(PD28_PF_LD13);+	imx_gpio_mode(PD29_PF_LD14);+	imx_gpio_mode(PD30_PF_LD15);+	imx_gpio_mode(PD14_PF_FLM_VSYNC);+	imx_gpio_mode(PD13_PF_LP_HSYNC);+	imx_gpio_mode(PD6_PF_LSCLK);+	imx_gpio_mode(GPIO_PORTD | GPIO_OUT | GPIO_GPIO | 12);+	imx_gpio_mode(PD11_PF_CONTRAST);+	imx_gpio_mode(PD10_PF_SPL_SPR);	++	LCDC_RMCR = 0x00000000;+	LCDC_PCR = 0x78000005;+	LCDC_HCR = 0x08000000;+	LCDC_VCR = 0x08000000;++	LCDC_PWMR = 0x00000391;   /* contrast */+	LCDC_SSA  = 0x0bfc0000;   /* physical screen start address */++	LCDC_SIZE = 0x014000F0;   /* size*/++	LCDC_VPW  = 0x000000A0;   /* Virtual Page Width Register */+	LCDC_POS  = 0x00000000;   /* panning offset 0 (0 pixel offset) */+	+	/* disable Cursor */+	LCDC_CPOS  = 0x00000000;++	/* fixed burst length */+	LCDC_DMACR = 0x00030008;++	/* enable LCD */+	//DR(3)   |= 0x00001000;+	LCDC_RMCR = 0x00000002;+}++int+do_lcdinit (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])+{+	printf ("## initializing LCD...\n");+	lcdinit();+	return 0;+}++U_BOOT_CMD(+	lcdinit, 2, 0,	do_lcdinit,+	"lcdinit - initialize LCD (mx1fs2 specific)\n",+	"\n"+);diff -X linux/Documentation/dontdiff -Nur u-boot-1.1.4/board/mx21ads/config.mk u-boot-1.1.4.imx21/board/mx21ads/config.mk--- u-boot-1.1.4/board/mx21ads/config.mk	1970-01-01 01:00:00.000000000 +0100+++ u-boot-1.1.4.imx21/board/mx21ads/config.mk	2006-05-03 15:02:33.000000000 +0200@@ -0,0 +1,23 @@+#+# board/mx21ads/config.mk+#+# (C) Copyright 2006 Jochen Karrer+#+#+# 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++TEXT_BASE = 0xC0400000+diff -X linux/Documentation/dontdiff -Nur u-boot-1.1.4/board/mx21ads/flash.c u-boot-1.1.4.imx21/board/mx21ads/flash.c--- u-boot-1.1.4/board/mx21ads/flash.c	1970-01-01 01:00:00.000000000 +0100+++ u-boot-1.1.4.imx21/board/mx21ads/flash.c	2006-05-03 15:25:14.000000000 +0200@@ -0,0 +1,663 @@+/*+ * (C) 2000-2004 Wolfgang Denk, DENX Software Engineering, wd@denx.de.+ * (C) 2003 August Hoeraendl, Logotronic GmbH+ *+ * 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+ */++#undef CONFIG_FLASH_16BIT++#include <common.h>++#define FLASH_BANK_SIZE MX21ADS_FLASH_BANK_SIZE+#define MAIN_SECT_SIZE  MX21ADS_FLASH_SECT_SIZE++flash_info_t flash_info[CFG_MAX_FLASH_BANKS];	/* info for FLASH chips   */++/*+ * NOTE - CONFIG_FLASH_16BIT means the CPU interface is 16-bit, it+ *        has nothing to do with the flash chip being 8-bit or 16-bit.+ */+#ifdef CONFIG_FLASH_16BIT+typedef unsigned short FLASH_PORT_WIDTH;+typedef volatile unsigned short FLASH_PORT_WIDTHV;++#define	FLASH_ID_MASK	0xFFFF+#else+typedef unsigned long FLASH_PORT_WIDTH;+typedef volatile unsigned long FLASH_PORT_WIDTHV;++#define	FLASH_ID_MASK	0xFFFFFFFF+#endif++#define FPW	FLASH_PORT_WIDTH+#define FPWV	FLASH_PORT_WIDTHV++#define ORMASK(size) ((-size) & OR_AM_MSK)++/*-----------------------------------------------------------------------+ * Functions+ */+#if 0+static ulong flash_get_size(FPWV * addr, flash_info_t * info);+static void flash_get_offsets(ulong base, flash_info_t * info);+#endif+static void flash_reset(flash_info_t * info);+static int write_word_intel(flash_info_t * info, FPWV * dest, FPW data);+static int write_word_amd(flash_info_t * info, FPWV * dest, FPW data);+#define write_word(in, de, da)   write_word_amd(in, de, da)+#ifdef CFG_FLASH_PROTECTION+static void flash_sync_real_protect(flash_info_t * info);+#endif++/*-----------------------------------------------------------------------+ * flash_init()+ *+ * sets up flash_info and returns size of FLASH (bytes)+ */+ulong+flash_init(void)+{+	int i, j;+	ulong size = 0;++	for (i = 0; i < CFG_MAX_FLASH_BANKS; i++) {+		ulong flashbase = 0;+		flash_info[i].flash_id =+		    (FLASH_MAN_AMD & FLASH_VENDMASK) |+		    (FLASH_AM640U & FLASH_TYPEMASK);+		flash_info[i].size = FLASH_BANK_SIZE;+		flash_info[i].sector_count = CFG_MAX_FLASH_SECT;+		memset(flash_info[i].protect, 0, CFG_MAX_FLASH_SECT);+		switch (i) {+		case 0:+			flashbase = MX21ADS_FLASH_BASE;+			break;+		default:+			panic("configured too many flash banks!\n");+			break;+		}+		for (j = 0; j < flash_info[i].sector_count; j++) {+			flash_info[i].start[j] = flashbase + j * MAIN_SECT_SIZE;+		}+		size += flash_info[i].size;+	}++	/* Protect monitor and environment sectors */+	flash_protect(FLAG_PROTECT_SET,+		      CFG_FLASH_BASE,+		      CFG_FLASH_BASE + _bss_start - _armboot_start,+		      &flash_info[0]);++	flash_protect(FLAG_PROTECT_SET,+		      CFG_ENV_ADDR,+		      CFG_ENV_ADDR + CFG_ENV_SIZE - 1, &flash_info[0]);++	return size;+}++/*-----------------------------------------------------------------------+ */+static void+flash_reset(flash_info_t * info)+{+	FPWV *base = (FPWV *) (info->start[0]);++	/* Put FLASH back in read mode */+	if ((info->flash_id & FLASH_VENDMASK) == FLASH_MAN_INTEL)+		*base = (FPW) 0x00FF00FF;	/* Intel Read Mode */+	else if ((info->flash_id & FLASH_VENDMASK) == FLASH_MAN_AMD)+		*base = (FPW) 0x00F000F0;	/* AMD Read Mode */+}++/*-----------------------------------------------------------------------+ */++void+flash_print_info(flash_info_t * info)+{+	int i;+	uchar *boottype;+	uchar *bootletter;+	uchar *fmt;+	uchar botbootletter[] = "B";+	uchar topbootletter[] = "T";+	uchar botboottype[] = "bottom boot sector";+	uchar topboottype[] = "top boot sector";++	if (info->flash_id == FLASH_UNKNOWN) {+		printf("missing or unknown FLASH type\n");+		return;+	}++	switch (info->flash_id & FLASH_VENDMASK) {+	case FLASH_MAN_AMD:+		printf("AMD ");+		break;+	case FLASH_MAN_BM:+		printf("BRIGHT MICRO ");+		break;+	case FLASH_MAN_FUJ:+		printf("FUJITSU ");+		break;+	case FLASH_MAN_SST:+		printf("SST ");+		break;+	case FLASH_MAN_STM:+		printf("STM ");+		break;+	case FLASH_MAN_INTEL:+		printf("INTEL ");+		break;+	default:+		printf("Unknown Vendor ");+		break;+	}++	/* check for top or bottom boot, if it applies */+	if (info->flash_id & FLASH_BTYPE) {+		boottype = botboottype;+		bootletter = botbootletter;+	} else {+		boottype = topboottype;+		bootletter = topbootletter;+	}++	switch (info->flash_id & FLASH_TYPEMASK) {+	case FLASH_AM640U:+		fmt = "29LV641D (64 Mbit, uniform sectors)\n";+		break;+	case FLASH_28F800C3B:+	case FLASH_28F800C3T:+		fmt = "28F800C3%s (8 Mbit, %s)\n";+		break;+	case FLASH_INTEL800B:+	case FLASH_INTEL800T:+		fmt = "28F800B3%s (8 Mbit, %s)\n";+		break;+	case FLASH_28F160C3B:+	case FLASH_28F160C3T:+		fmt = "28F160C3%s (16 Mbit, %s)\n";+		break;+	case FLASH_INTEL160B:+	case FLASH_INTEL160T:+		fmt = "28F160B3%s (16 Mbit, %s)\n";+		break;+	case FLASH_28F320C3B:+	case FLASH_28F320C3T:+		fmt = "28F320C3%s (32 Mbit, %s)\n";+		break;+	case FLASH_INTEL320B:

⌨️ 快捷键说明

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