
- */
+#include <common.h> +#include <i2c.h> +#include <asm/arch/hardware.h> +#include "../common/misc.h"
+DECLARE_GLOBAL_DATA_PTR;
+int board_init(void) +{
- /* arch number of the board */
- gd->bd->bi_arch_number = MACH_TYPE_DAVINCI_DM357_EVM;
- /* address of boot parameters */
- gd->bd->bi_boot_params = LINUX_BOOT_PARAM_ADDR;
please use RAM_BASE + 0x100 style as other arm boards
- /* Configure AEMIF pins (although this should be configured at boot time
* with pull-up/pull-down resistors) */
- REG(PINMUX0) = 0x00000c1f;
the davinci will need to use the __raw_writel/readl instead of this REG
- davinci_errata_workarounds();
- /* Power on required peripherals */
- lpsc_on(DAVINCI_LPSC_GPIO);
- lpsc_on(DAVINCI_LPSC_USB);
- davinci_enable_uart0();
- davinci_enable_emac();
- davinci_enable_i2c();
- lpsc_on(DAVINCI_LPSC_TIMER1);
- timer_init();
no need please remove
- return 0;
+}
+int misc_init_r(void) +{
- uint8_t video_mode;
- uint8_t eeprom_enetaddr[6];
- dv_display_clk_infos();
as mention by David switch to cpu_info will be better
- /* Read Ethernet MAC address from EEPROM if available. */
- if (dvevm_read_mac_address(eeprom_enetaddr))
dv_configure_mac_address(eeprom_enetaddr);
- if (!eth_hw_init())
printf("ethernet init failed!\n");
- i2c_read(0x39, 0x00, 1, &video_mode, 1);
coud you explain a few more?
- setenv("videostd", ((video_mode & 0x80) ? "pal" : "ntsc"));
- return 0;
+} diff --git a/board/davinci/dm357_evm/u-boot.lds b/board/davinci/dm357_evm/u-boot.lds new file mode 100644 index 0000000..4d50f2c --- /dev/null +++ b/board/davinci/dm357_evm/u-boot.lds
as all davinic use the same lds regroup it will be better as done for the at91 and in preparation for the ompa3
@@ -0,0 +1,52 @@ +/*
- (C) Copyright 2002
- Gary Jennejohn, DENX Software Engineering, gj@denx.de
diff --git a/include/asm-arm/mach-types.h b/include/asm-arm/mach-types.h index 2c1e69b..5c94fbe 100644 --- a/include/asm-arm/mach-types.h +++ b/include/asm-arm/mach-types.h @@ -1990,6 +1990,7 @@ extern unsigned int __machine_arch_type; #define MACH_TYPE_BLAZE 2004 #define MACH_TYPE_LINKSTATION_LS_HGL 2005 #define MACH_TYPE_HTCVENUS 2006 +#define MACH_TYPE_DAVINCI_DM357_EVM 2064
please do not do it I'll update the mach-types myself please send a linux sync request and specify against which arm kernel version
#ifdef CONFIG_ARCH_EBSA110 # ifdef machine_arch_type diff --git a/include/configs/davinci_dm357_evm.h b/include/configs/davinci_dm357_evm.h new file mode 100644 index 0000000..f754ca7 --- /dev/null +++ b/include/configs/davinci_dm357_evm.h @@ -0,0 +1,157 @@ +/*
- Copyright (C) 2009 Texas Instruments
- 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
- */
+#ifndef __CONFIG_H +#define __CONFIG_H +#include <asm/sizes.h>
+/*=======*/ +/* Board */ +/*=======*/
please start to use this style of mutliple line comment /* * */
+#define DV_EVM +#define CONFIG_SYS_NAND_SMALLPAGE +#define CONFIG_SYS_USE_NAND +/*===================*/ +/* SoC Configuration */ +/*===================*/ +#define CONFIG_ARM926EJS /* arm926ejs CPU core */ +#define CONFIG_SYS_CLK_FREQ 270000000 /* Arm Clock frequency */ +#define CONFIG_SYS_TIMERBASE 0x01c21400 /* use timer 0 */ +#define CONFIG_SYS_HZ_CLOCK 27000000
if it's the same as the ARM clk please use the same macro
+#define CONFIG_SYS_HZ 1000 +#define CONFIG_SOC_DM644X +/*====================================================*/ +/* definitions for EEPROM on DM357 EVM */ +/*====================================================*/ +#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 +#define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 +#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 6 +#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 20 +/*=============*/ +/* Memory Info */ +/*=============*/ +#define CONFIG_SYS_MALLOC_LEN (0x10000 + 128*1024) +#define CONFIG_SYS_GBL_DATA_SIZE 128 +#define CONFIG_SYS_MEMTEST_START 0x80000000 /* memtest start */ +#define CONFIG_SYS_MEMTEST_END 0x81000000 /* 16MB RAM test */ +#define CONFIG_NR_DRAM_BANKS 1 /* we have 1 bank of DRAM */ +#define CONFIG_STACKSIZE (256*1024) /* regular stack */
please add a space before and after '*'
+#define PHYS_SDRAM_1 0x80000000 /* DDR Start */ +#define PHYS_SDRAM_1_SIZE 0x10000000 /* DDR size 256MB */ +#define DDR_8BANKS /* 8-bank DDR2 (256MB) */ +/*====================*/ +/* Serial Driver info */ +/*====================*/ +#define CONFIG_SYS_NS16550 +#define CONFIG_SYS_NS16550_SERIAL +#define CONFIG_SYS_NS16550_REG_SIZE -4 +#define CONFIG_SYS_NS16550_COM1 0x01c20000 /* Base address of UART0 */ +#define CONFIG_SYS_NS16550_CLK 27000000 /* Input clock */
please sync we the last David patch
+#define CONFIG_CONS_INDEX 1 /* use UART0 for console */ +#define CONFIG_BAUDRATE 115200 /* Default baud rate */ +#define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 } +/*===================*/ +/* I2C Configuration */ +/*===================*/ +#define CONFIG_HARD_I2C +#define CONFIG_DRIVER_DAVINCI_I2C +#define CONFIG_SYS_I2C_SPEED 80000 +#define CONFIG_SYS_I2C_SLAVE 10 +/*==================================*/ +/* Network & Ethernet Configuration */ +/*==================================*/ +#define CONFIG_DRIVER_TI_EMAC +#define CONFIG_MII +#define CONFIG_BOOTP_DEFAULT +#define CONFIG_BOOTP_DNS +#define CONFIG_BOOTP_DNS2 +#define CONFIG_BOOTP_SEND_HOSTNAME +#define CONFIG_NET_RETRY_COUNT 10
please sync with Ben Patch
+/*=====================*/ +/* Flash & Environment */ +/*=====================*/ +#ifdef CONFIG_SYS_USE_NAND +#define CONFIG_NAND_DAVINCI +#undef CONFIG_ENV_IS_IN_FLASH +#define CONFIG_SYS_NO_FLASH +#define CONFIG_ENV_IS_IN_NAND /* U-Boot env in NAND Flash */ +#ifdef CONFIG_SYS_NAND_SMALLPAGE +#define CONFIG_ENV_SECT_SIZE 512 /* Env sector Size */ +#define CONFIG_ENV_SIZE SZ_16K +#else +#define CONFIG_ENV_SECT_SIZE 2048 /* Env sector Size */ +#define CONFIG_ENV_SIZE SZ_128K +#endif +#define CONFIG_SKIP_LOWLEVEL_INIT /* U-Boot is loaded by a bootloader */ +#define CONFIG_SKIP_RELOCATE_UBOOT /* to a proper address, init done */ +#define CONFIG_SYS_NAND_BASE 0x02000000 +#define CONFIG_SYS_NAND_HW_ECC +#define CONFIG_SYS_MAX_NAND_DEVICE 1 +#define CONFIG_ENV_OFFSET 0x0 +#define DEF_BOOTM ""
??
Best Regards, J.