summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Fiore <mfiore@multitech.com>2013-04-26 11:19:56 -0500
committerMike Fiore <mfiore@multitech.com>2013-04-26 11:19:56 -0500
commitcc4ae07a3689f00978fdf9afbdd3d7ddd38bb81f (patch)
treeab5039e47813ee1f18683290f74564d15f595c02
parent2d017b103415745f536c159e22beac5be534611d (diff)
u-boot: add support for mtocgd (mtr hw)
-rw-r--r--multitech/recipes/u-boot/u-boot-2012.10/mtocgd/u-boot-2012.10-mtocgd.patch114
-rw-r--r--multitech/recipes/u-boot/u-boot_2012.10.bb2
2 files changed, 116 insertions, 0 deletions
diff --git a/multitech/recipes/u-boot/u-boot-2012.10/mtocgd/u-boot-2012.10-mtocgd.patch b/multitech/recipes/u-boot/u-boot-2012.10/mtocgd/u-boot-2012.10-mtocgd.patch
new file mode 100644
index 0000000..aba2dba
--- /dev/null
+++ b/multitech/recipes/u-boot/u-boot-2012.10/mtocgd/u-boot-2012.10-mtocgd.patch
@@ -0,0 +1,114 @@
+Index: git/include/configs/at91sam9x5ek.h
+===================================================================
+--- git.orig/include/configs/at91sam9x5ek.h 2013-02-11 10:22:38.000000000 -0600
++++ git/include/configs/at91sam9x5ek.h 2013-02-11 15:17:13.480341903 -0600
+@@ -54,6 +54,7 @@
+ #define CONFIG_USART_ID ATMEL_ID_SYS
+
+ /* LCD */
++/* MTR has no LCD
+ #define CONFIG_LCD
+ #define LCD_BPP LCD_COLOR16
+ #define LCD_OUTPUT_BPP 24
+@@ -65,6 +66,7 @@
+ #define CONFIG_ATMEL_HLCD
+ #define CONFIG_ATMEL_LCD_RGB565
+ #define CONFIG_SYS_CONSOLE_IS_IN_ENV
++*/
+
+ #define CONFIG_BOOTDELAY 3
+
+@@ -120,12 +122,14 @@
+ /* our CLE is AD22 */
+ #define CONFIG_SYS_NAND_MASK_CLE (1 << 22)
+ #define CONFIG_SYS_NAND_ENABLE_PIN AT91_PIN_PD4
+-#define CONFIG_SYS_NAND_READY_PIN AT91_PIN_PD5
++/* MTR nand ready is PC31 */
++#define CONFIG_SYS_NAND_READY_PIN AT91_PIN_PC31
+
+ /* PMECC & PMERRLOC */
+ #define CONFIG_ATMEL_NAND_HWECC 1
+ #define CONFIG_ATMEL_NAND_HW_PMECC 1
+-#define CONFIG_PMECC_CAP 2
++/* MTR: 4-bit PMECC */
++#define CONFIG_PMECC_CAP 4
+ #define CONFIG_PMECC_SECTOR_SIZE 512
+ #define CONFIG_PMECC_INDEX_TABLE_OFFSET 0x8000
+
+@@ -140,9 +144,12 @@
+
+ /* Ethernet */
+ #define CONFIG_MACB
+-#define CONFIG_RMII
++/* MTR is MII */
++#undef CONFIG_RMII
+ #define CONFIG_NET_RETRY_COUNT 20
+ #define CONFIG_MACB_SEARCH_PHY
++/* enable MII command */
++#define CONFIG_CMD_MII 1
+
+ #define CONFIG_SYS_LOAD_ADDR 0x22000000 /* load address */
+
+@@ -155,9 +162,8 @@
+ #define CONFIG_ENV_OFFSET 0xc0000
+ #define CONFIG_ENV_OFFSET_REDUND 0x100000
+ #define CONFIG_ENV_SIZE 0x20000 /* 1 sector = 128 kB */
+-#define CONFIG_BOOTCOMMAND "nand read " \
+- "0x22000000 0x200000 0x300000; " \
+- "bootm 0x22000000"
++/* MTR: read from env variables for boot */
++#define CONFIG_BOOTCOMMAND "nboot.jffs2 ${loadaddr} 0 ${kernel_addr}; bootm ${loadaddr}"
+ #else
+ #ifdef CONFIG_SYS_USE_SPIFLASH
+ /* bootstrap + u-boot + env + linux in spi flash */
+@@ -172,11 +178,8 @@
+ #endif
+ #endif
+
+-#define CONFIG_BOOTARGS "mem=128M console=ttyS0,115200 " \
+- "mtdparts=atmel_nand:" \
+- "8M(bootstrap/uboot/kernel)ro,-(rootfs) " \
+- "root=/dev/mtdblock1 rw " \
+- "rootfstype=ubifs ubi.mtd=1 root=ubi0:rootfs"
++/* MTR uses jffs2 */
++#define CONFIG_BOOTARGS "mem=128M console=ttyS0,115200 root=/dev/mtdblock8 ro rootfstype=jffs2"
+
+ #define CONFIG_BAUDRATE 115200
+
+@@ -199,4 +202,22 @@
+ #error CONFIG_USE_IRQ not supported
+ #endif
+
++/* MTR defaults */
++#define CONFIG_ENV_OVERWRITE 1 /* Allow Overwrite of serial# & ethaddr */
++#define CONFIG_ETHADDR 00:08:00:87:00:02
++#define CONFIG_IPADDR 192.168.2.1
++#define CONFIG_NETMASK 255.255.255.0
++#define CONFIG_SERVERIP 192.168.2.2
++#define CONFIG_HOSTNAME AT91SAM9G25
++#define CONFIG_LOADADDR 0x22000000
++
++/* MTR - enable watchdog */
++#define CONFIG_AT91SAM9_WATCHDOG 1
++#define CONFIG_HW_WATCHDOG 1
++
++#define CONFIG_EXTRA_ENV_SETTINGS \
++ "kernel_addr=0x200000\0" \
++ ""
++
++
+ #endif
+Index: git/board/atmel/at91sam9x5ek/at91sam9x5ek.c
+===================================================================
+--- git.orig/board/atmel/at91sam9x5ek/at91sam9x5ek.c 2013-02-11 15:17:48.480015992 -0600
++++ git/board/atmel/at91sam9x5ek/at91sam9x5ek.c 2013-02-11 15:18:19.468536809 -0600
+@@ -61,7 +61,8 @@
+ csa = readl(&matrix->ebicsa);
+ csa |= AT91_MATRIX_EBI_CS3A_SMC_SMARTMEDIA;
+ /* NAND flash on D16 */
+- csa |= AT91_MATRIX_NFD0_ON_D16;
++ /* MTR: nand flash is set up by bootstrap, so leave it alone here */
++ /* csa |= AT91_MATRIX_NFD0_ON_D16; */
+
+ /* Configure IO drive */
+ csa &= ~AT91_MATRIX_EBI_EBI_IOSR_NORMAL;
diff --git a/multitech/recipes/u-boot/u-boot_2012.10.bb b/multitech/recipes/u-boot/u-boot_2012.10.bb
index cd9f151..64b7c80 100644
--- a/multitech/recipes/u-boot/u-boot_2012.10.bb
+++ b/multitech/recipes/u-boot/u-boot_2012.10.bb
@@ -15,6 +15,8 @@ SRC_URI += "file://u-boot-2010.06-macb-autoneg-timeout.patch"
SRC_URI_append_mtocgd3 = " file://u-boot-2012.10-mtocgd3.patch"
+SRC_URI_append_mtocgd = " file://u-boot-2012.10-mtocgd.patch"
+
TARGET_LDFLAGS = ""
S = "${WORKDIR}/git"