summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--board/toradex/common/board.c238
-rw-r--r--include/configs/apalis_t30.h45
-rw-r--r--include/configs/colibri_t20.h69
-rw-r--r--include/configs/colibri_t30.h45
4 files changed, 203 insertions, 194 deletions
diff --git a/board/toradex/common/board.c b/board/toradex/common/board.c
index f9af433e87..ea70dbdc11 100644
--- a/board/toradex/common/board.c
+++ b/board/toradex/common/board.c
@@ -98,58 +98,55 @@ enum {
UART_ALL = 0xf
};
-typedef enum
-{
- NvBootFuseBootDevice_Sdmmc,
- NvBootFuseBootDevice_SnorFlash,
- NvBootFuseBootDevice_SpiFlash,
- NvBootFuseBootDevice_NandFlash,
- NvBootFuseBootDevice_NandFlash_x8 = NvBootFuseBootDevice_NandFlash,
- NvBootFuseBootDevice_NandFlash_x16 = NvBootFuseBootDevice_NandFlash,
- NvBootFuseBootDevice_MobileLbaNand,
- NvBootFuseBootDevice_MuxOneNand,
- NvBootFuseBootDevice_Sata,
- NvBootFuseBootDevice_BootRom_Reserved_Sdmmc3, /* !!! this enum is strictly used by BootRom code only !!! */
- NvBootFuseBootDevice_Max, /* Must appear after the last legal item */
- NvBootFuseBootDevice_Force32 = 0x7fffffff
+typedef enum {
+ NvBootFuseBootDevice_Sdmmc,
+ NvBootFuseBootDevice_SnorFlash,
+ NvBootFuseBootDevice_SpiFlash,
+ NvBootFuseBootDevice_NandFlash,
+ NvBootFuseBootDevice_NandFlash_x8 = NvBootFuseBootDevice_NandFlash,
+ NvBootFuseBootDevice_NandFlash_x16 = NvBootFuseBootDevice_NandFlash,
+ NvBootFuseBootDevice_MobileLbaNand,
+ NvBootFuseBootDevice_MuxOneNand,
+ NvBootFuseBootDevice_Sata,
+ NvBootFuseBootDevice_BootRom_Reserved_Sdmmc3, /* !!! this enum is
+ strictly used by BootRom code only !!! */
+ NvBootFuseBootDevice_Max, /* Must appear after the last legal item */
+ NvBootFuseBootDevice_Force32 = 0x7fffffff
} NvBootFuseBootDevice;
-typedef enum
-{
- NvStrapDevSel_Emmc_Primary_x4 = 0, /* eMMC primary (x4) */
- NvStrapDevSel_Emmc_Primary_x8, /* eMMC primary (x8) */
- NvStrapDevSel_Emmc_Secondary_x4, /* eMMC secondary (x4) */
- NvStrapDevSel_Nand, /* NAND (x8 or x16) */
- NvStrapDevSel_Nand_42nm_x8, /* NAND_42nm (x8) */
- NvStrapDevSel_MobileLbaNand, /* mobileLBA NAND */
- NvStrapDevSel_MuxOneNand, /* MuxOneNAND */
- NvStrapDevSel_Esd_x4, /* eSD (x4) */
- NvStrapDevSel_SpiFlash, /* SPI Flash */
- NvStrapDevSel_Snor_Muxed_x16, /* Sync NOR (Muxed, x16) */
- NvStrapDevSel_Snor_Muxed_x32, /* Sync NOR (Muxed, x32) */
- NvStrapDevSel_Snor_NonMuxed_x16, /* Sync NOR (NonMuxed, x16) */
- NvStrapDevSel_FlexMuxOneNand, /* FlexMuxOneNAND */
- NvStrapDevSel_Sata, /* Sata */
- NvStrapDevSel_Emmc_Secondary_x8, /* eMMC secondary (x8) */
- NvStrapDevSel_UseFuses, /* Use fuses instead */
-
- /* The following definitions must be last. */
- NvStrapDevSel_Num, /* Must appear after the last legal item */
- NvStrapDevSel_Force32 = 0x7fffffff
+typedef enum {
+ NvStrapDevSel_Emmc_Primary_x4 = 0, /* eMMC primary (x4) */
+ NvStrapDevSel_Emmc_Primary_x8, /* eMMC primary (x8) */
+ NvStrapDevSel_Emmc_Secondary_x4, /* eMMC secondary (x4) */
+ NvStrapDevSel_Nand, /* NAND (x8 or x16) */
+ NvStrapDevSel_Nand_42nm_x8, /* NAND_42nm (x8) */
+ NvStrapDevSel_MobileLbaNand, /* mobileLBA NAND */
+ NvStrapDevSel_MuxOneNand, /* MuxOneNAND */
+ NvStrapDevSel_Esd_x4, /* eSD (x4) */
+ NvStrapDevSel_SpiFlash, /* SPI Flash */
+ NvStrapDevSel_Snor_Muxed_x16, /* Sync NOR (Muxed, x16) */
+ NvStrapDevSel_Snor_Muxed_x32, /* Sync NOR (Muxed, x32) */
+ NvStrapDevSel_Snor_NonMuxed_x16, /* Sync NOR (NonMuxed, x16) */
+ NvStrapDevSel_FlexMuxOneNand, /* FlexMuxOneNAND */
+ NvStrapDevSel_Sata, /* Sata */
+ NvStrapDevSel_Emmc_Secondary_x8, /* eMMC secondary (x8) */
+ NvStrapDevSel_UseFuses, /* Use fuses instead */
+
+ /* The following definitions must be last. */
+ NvStrapDevSel_Num, /* Must appear after the last legal item */
+ NvStrapDevSel_Force32 = 0x7fffffff
} NvStrapDevSel;
-typedef enum
-{
- Trdx_BootDevice_NandFlash,
- Trdx_BootDevice_eMMC,
- Trdx_BootDevice_extSD,
- Trdx_BootDevice_Unknown,
- Trdx_BootDevice_Max, /* Must appear after the last legal item */
- Trdx_BootDevice_Force32 = 0x7fffffff
+typedef enum {
+ Trdx_BootDevice_NandFlash,
+ Trdx_BootDevice_eMMC,
+ Trdx_BootDevice_extSD,
+ Trdx_BootDevice_Unknown,
+ Trdx_BootDevice_Max, /* Must appear after the last legal item */
+ Trdx_BootDevice_Force32 = 0x7fffffff
} TrdxBootDevice;
-const char* sTrdxBootDeviceStr[] =
-{
+const char *sTrdxBootDeviceStr[] = {
"Trdx_BootDevice_NandFlash",
"Trdx_BootDevice_eMMC",
"Trdx_BootDevice_extSD",
@@ -230,7 +227,7 @@ int board_early_init_f(void)
static TrdxBootDevice board_get_current_bootdev(void)
{
unsigned reg;
-#if GENERATE_FUSE_DEV_INFO
+#if GENERATE_FUSE_DEV_INFO
unsigned reg1 = 0;
unsigned reg2;
#endif /* GENERATE_FUSE_DEV_INFO */
@@ -244,10 +241,13 @@ static TrdxBootDevice board_get_current_bootdev(void)
TrdxBootDevice boot_device;
//get the latched strap pins, bit [26:29]
- reg = readl( ((unsigned *)NV_APB_MISC_BASE) + APB_MISC_PP_STRAPPING_OPT_A_0);
+ reg = readl(((unsigned *)NV_APB_MISC_BASE) +
+ APB_MISC_PP_STRAPPING_OPT_A_0);
/*
- printf("Strappings Reg 0x%x, BootSelect 0x%x, Recovery %x, NorBoot %x, JTAG %x, MIO_WIDTH %x, RAM_Code %x, NOR_Width %x\n",
- reg, (reg>>26)&0xf, (reg>>25)&0x1, (reg>>24)&0x1, (reg>>22)&0x3, (reg>>8)&0x1, (reg>>4)&0xf, (reg)&0x1);
+ printf("Strappings Reg 0x%x, BootSelect 0x%x, Recovery %x, NorBoot %x, "
+ "JTAG %x, MIO_WIDTH %x, RAM_Code %x, NOR_Width %x\n", reg,
+ (reg>>26)&0xf, (reg>>25)&0x1, (reg>>24)&0x1, (reg>>22)&0x3,
+ (reg>>8)&0x1, (reg>>4)&0xf, (reg)&0x1);
*/
strap_select = (reg>>26)&0xf;
@@ -256,20 +256,26 @@ static TrdxBootDevice board_get_current_bootdev(void)
clock_enable(PERIPH_ID_FUSE);
//make fuses visible
- reg = readl( ((unsigned *)CLK_RST_BASE) + CLK_RST_CONTROLLER_MISC_CLK_ENB_0);
+ reg = readl(((unsigned *)CLK_RST_BASE) +
+ CLK_RST_CONTROLLER_MISC_CLK_ENB_0);
reg = reg | (1<<28);
- writel(reg, ((unsigned *)CLK_RST_BASE) + CLK_RST_CONTROLLER_MISC_CLK_ENB_0 );
+ writel(reg, ((unsigned *)CLK_RST_BASE) +
+ CLK_RST_CONTROLLER_MISC_CLK_ENB_0);
printf("1");
- reg = readl( ((unsigned *)NV_ADDRESS_MAP_FUSE_BASE) + FUSE_RESERVED_SW_0);
+ reg = readl(((unsigned *)NV_ADDRESS_MAP_FUSE_BASE) +
+ FUSE_RESERVED_SW_0);
printf("2");
- reg1 = readl( ((unsigned *)NV_ADDRESS_MAP_FUSE_BASE) + FUSE_BOOT_DEVICE_INFO_0);
+ reg1 = readl(((unsigned *)NV_ADDRESS_MAP_FUSE_BASE) +
+ FUSE_BOOT_DEVICE_INFO_0);
printf("3");
//make fuses invisible
- reg2 = readl( ((unsigned *)CLK_RST_BASE) + CLK_RST_CONTROLLER_MISC_CLK_ENB_0);
+ reg2 = readl(((unsigned *)CLK_RST_BASE) +
+ CLK_RST_CONTROLLER_MISC_CLK_ENB_0);
reg2 = reg2 & ~(1<<28);
- writel(reg2, ((unsigned *)CLK_RST_BASE) + CLK_RST_CONTROLLER_MISC_CLK_ENB_0 );
+ writel(reg2, ((unsigned *)CLK_RST_BASE) +
+ CLK_RST_CONTROLLER_MISC_CLK_ENB_0);
clock_disable(PERIPH_ID_FUSE);
#else
@@ -286,16 +292,15 @@ static TrdxBootDevice board_get_current_bootdev(void)
//get the fuse 'BOOT_DEV_SEL', bit [0:2]
fuse_select = reg & 7;
- if(skip_strap || strap_select == NvStrapDevSel_UseFuses)
- {
+ if (skip_strap || strap_select == NvStrapDevSel_UseFuses) {
printf("Using fuses, %u\n", fuse_select);
- //getting fuse device info and sdmmc instance, bit 7 of fuse_device info
+ //getting fuse device info and sdmmc instance,
+ //bit 7 of fuse_device info
#if GENERATE_FUSE_DEV_INFO
fuse_device_info = reg1 & 0x3fff;
- sdmmc_instance = ((reg1 & 0x80)==0x80) ? 2 : 3;
+ sdmmc_instance = ((reg1 & 0x80) == 0x80) ? 2 : 3;
#endif /* GENERATE_FUSE_DEV_INFO */
- switch(fuse_select)
- {
+ switch (fuse_select) {
case NvBootFuseBootDevice_Sdmmc:
boot_device = Trdx_BootDevice_eMMC;
break;
@@ -306,15 +311,12 @@ static TrdxBootDevice board_get_current_bootdev(void)
boot_device = Trdx_BootDevice_Unknown;
break;
}
- }
- else
- {
+ } else {
/* printf("Using straps, %u\n", strap_select);*/
#if GENERATE_FUSE_DEV_INFO
sdmmc_instance = 3;
#endif
- switch(strap_select)
- {
+ switch (strap_select) {
case NvStrapDevSel_Emmc_Primary_x4:
case NvStrapDevSel_Emmc_Secondary_x4:
case NvStrapDevSel_Emmc_Secondary_x8:
@@ -331,8 +333,8 @@ static TrdxBootDevice board_get_current_bootdev(void)
}
}
/*
- if(boot_device < sizeof(sTrdxBootDeviceStr)/sizeof(sTrdxBootDeviceStr[0]))
- {
+ if (boot_device < sizeof(sTrdxBootDeviceStr) /
+ sizeof(sTrdxBootDeviceStr[0])) {
printf("%s is used\n",sTrdxBootDeviceStr[boot_device]);
}
*/
@@ -411,7 +413,8 @@ int board_late_init(void)
int i;
char *addr_str, *end;
- unsigned char bi_enetaddr[6] = {0, 0, 0, 0, 0, 0}; /* Ethernet address */
+ unsigned char bi_enetaddr[6] = {0, 0, 0, 0, 0, 0}; /* Ethernet
+ address */
unsigned char *mac_addr;
unsigned char mac_addr00[6] = {0, 0, 0, 0, 0, 0};
@@ -423,7 +426,7 @@ int board_late_init(void)
unsigned char toradex_oui[3] = { 0x00, 0x14, 0x2d };
int valid = 0;
- int ret;
+ int ret;
#ifdef CONFIG_VIDEO_TEGRA
/* Make sure we finish initing the LCD */
@@ -449,7 +452,8 @@ int board_late_init(void)
#if defined(CONFIG_COLIBRI_T30) || defined(CONFIG_APALIS_T30)
mmc = find_mmc_device(0);
/* Just reading one 512 byte block */
- ret = mmc->block_dev.block_read(0, gd->conf_blk_offset, 1, (unsigned char *)config_block);
+ ret = mmc->block_dev.block_read(0, gd->conf_blk_offset, 1,
+ (unsigned char *)config_block);
if (ret == 1) {
ret = 0;
size = 512;
@@ -459,9 +463,8 @@ int board_late_init(void)
/* Check validity */
if ((ret == 0) && (size > 0)) {
mac_addr = config_block + 8;
- if (!(memcmp(mac_addr, toradex_oui, 3))) {
+ if (!(memcmp(mac_addr, toradex_oui, 3)))
valid = 1;
- }
}
if (!valid) {
@@ -469,16 +472,18 @@ int board_late_init(void)
memset((void *)config_block, 0, size);
} else {
/* Get MAC address from environment */
- if ((addr_str = getenv("ethaddr")) != NULL) {
+ addr_str = getenv("ethaddr");
+ if (addr_str != NULL) {
for (i = 0; i < 6; i++) {
- bi_enetaddr[i] = addr_str ? simple_strtoul(addr_str, &end, 16) : 0;
- if (addr_str) {
+ bi_enetaddr[i] = addr_str ? simple_strtoul(
+ addr_str, &end, 16) : 0;
+ if (addr_str)
addr_str = (*end) ? end + 1 : end;
- }
}
}
- /* Set Ethernet MAC address from config block if not already set */
+ /* Set Ethernet MAC address from config block if not already set
+ */
if (memcmp(mac_addr00, bi_enetaddr, 6) == 0) {
sprintf(env_str, "%02x:%02x:%02x:%02x:%02x:%02x",
mac_addr[0], mac_addr[1], mac_addr[2],
@@ -493,25 +498,29 @@ int board_late_init(void)
/* Default memory arguments */
if (!getenv("memargs")) {
switch (gd->ram_size) {
- case 0x10000000:
- /* 256 MB */
- setenv("memargs", "mem=148M@0M fbmem=12M@148M nvmem=96M@160M");
- break;
- case 0x20000000:
- /* 512 MB */
- setenv("memargs", "mem=372M@0M fbmem=12M@372M nvmem=128M@384M");
- break;
- case 0x40000000:
- /* 1 GB */
- setenv("memargs", "vmalloc=128M mem=1012M@2048M fbmem=12M@3060M");
- break;
- case 0x7ff00000:
- case 0x80000000:
- /* 2 GB */
- setenv("memargs", "vmalloc=256M mem=2035M@2048M fbmem=12M@4083M");
- break;
- default:
- printf("Failed detecting RAM size.\n");
+ case 0x10000000:
+ /* 256 MB */
+ setenv("memargs", "mem=148M@0M fbmem=12M@148M "
+ "nvmem=96M@160M");
+ break;
+ case 0x20000000:
+ /* 512 MB */
+ setenv("memargs", "mem=372M@0M fbmem=12M@372M "
+ "nvmem=128M@384M");
+ break;
+ case 0x40000000:
+ /* 1 GB */
+ setenv("memargs", "vmalloc=128M mem=1012M@2048M"
+ " fbmem=12M@3060M");
+ break;
+ case 0x7ff00000:
+ case 0x80000000:
+ /* 2 GB */
+ setenv("memargs", "vmalloc=256M mem=2035M@2048M"
+ " fbmem=12M@4083M");
+ break;
+ default:
+ printf("Failed detecting RAM size.\n");
}
}
@@ -533,7 +542,7 @@ int board_late_init(void)
#endif /* CONFIG_COLIBRI_T20 */
#if (defined(CONFIG_ENV_IS_IN_MMC) && defined(CONFIG_COLIBRI_T20)) || \
- defined(CONFIG_COLIBRI_T30) || defined(CONFIG_APALIS_T30)
+defined(CONFIG_COLIBRI_T30) || defined(CONFIG_APALIS_T30)
/* Set GPT offset */
if (!getenv("gptoffset")) {
sprintf(env_str, "0x%x", (unsigned)(gd->gpt_offset));
@@ -588,7 +597,7 @@ static void board_voltage_init(void)
i2c_set_bus_num(0); /* PMU is on bus 0 */
//switch v-core to 1.2V
- data_buffer[0] = VDD_CORE_NOMINAL_T30;
+ data_buffer[0] = VDD_CORE_NOMINAL_T30;
reg = PMU_CORE_VOLTAGE_DVFS_REG;
for (i = 0; i < MAX_I2C_RETRY; ++i) {
if (!i2c_write(PMU_CORE_I2C_ADDRESS, reg, 1, data_buffer, 1))
@@ -604,15 +613,17 @@ static void board_voltage_init(void)
break;
udelay(100);
}
- if(data_buffer[0] & 0x7) {
- data_buffer[0] = 0x10; /* kick the dog once before disabling it or disabling will fail */
+ if (data_buffer[0] & 0x7) {
+ data_buffer[0] = 0x10; /* kick the dog once before disabling it
+ or disabling will fail */
reg = 0x54;
for (i = 0; i < MAX_I2C_RETRY; ++i) {
if (!i2c_write(PMU_I2C_ADDRESS, reg, 1, data_buffer, 1))
break;
udelay(100);
}
- data_buffer[0] = 0xf0; /* at least one of the reserved bits must be '1' or disabling will fail */
+ data_buffer[0] = 0xf0; /* at least one of the reserved bits must
+ be '1' or disabling will fail */
reg = 0x69;
for (i = 0; i < MAX_I2C_RETRY; ++i) {
if (!i2c_write(PMU_I2C_ADDRESS, reg, 1, data_buffer, 1))
@@ -693,9 +704,8 @@ u32 get_board_rev(void)
unsigned short major = 0, minor = 0, release = 0;
size_t size = 4096;
- if(config_block == NULL) {
+ if (config_block == NULL)
return 0;
- }
/* Parse revision information in config block */
for (i = 0; i < (size - 8); i++) {
@@ -711,7 +721,8 @@ u32 get_board_rev(void)
/* Check validity */
if (major)
- return ((major & 0xff) << 8) | ((minor & 0xf) << 4) | ((release & 0xf) + 0xa);
+ return ((major & 0xff) << 8) | ((minor & 0xf) << 4) |
+ ((release & 0xf) + 0xa);
else
return 0;
#else
@@ -729,7 +740,7 @@ void get_board_serial(struct tag_serialnr *serialnr)
unsigned int serial = 0;
unsigned int serial_offset = 11;
- if(config_block == NULL) {
+ if (config_block == NULL) {
serialnr->low = 0;
serialnr->high = 0;
return;
@@ -742,15 +753,15 @@ void get_board_serial(struct tag_serialnr *serialnr)
/* Check validity */
if (serial) {
- /* Convert to Linux serial number format (hexadecimal coded decimal) */
+ /* Convert to Linux serial number format (hexadecimal coded
+ decimal) */
i = 7;
while (serial) {
array[i--] = serial % 10;
serial /= 10;
}
- while (i >= 0) {
+ while (i >= 0)
array[i--] = 0;
- }
serial = array[0];
for (i = 1; i < 8; i++) {
serial *= 16;
@@ -768,7 +779,7 @@ void get_board_serial(struct tag_serialnr *serialnr)
#ifdef CONFIG_HW_WATCHDOG
/*
- * kick watchdog in PMU
+ * kick watchdog in PMU
*
*/
extern void hw_watchdog_reset(void)
@@ -780,10 +791,9 @@ extern void hw_watchdog_reset(void)
// only kick the watchdog every 10 seconds, the watchdog timeout is 100s
now = get_ticks();
//first kick after 10 seconds
- if( !i2c_is_initialized || (last_kick == 0) ) {
+ if (!i2c_is_initialized || (last_kick == 0)) {
last_kick = now;
- }
- else if( (signed)(now - last_kick) > (10 * 1000) ) {
+ } else if ((signed)(now - last_kick) > (10 * 1000)) {
last_kick = now;
data_buffer[0] = 0x10;
reg = 0x54;
diff --git a/include/configs/apalis_t30.h b/include/configs/apalis_t30.h
index cbf9591fc6..fb7734a8c5 100644
--- a/include/configs/apalis_t30.h
+++ b/include/configs/apalis_t30.h
@@ -75,46 +75,51 @@
#define DEFAULT_BOOTCOMMAND \
"run emmcboot; run usbboot; run nfsboot"
+#define EMMC_BOOTCMD \
+ "run setup; " \
+ "setenv bootargs ${defargs} ${mmcargs} ${setupargs} " \
+ "${vidargs};" \
+ "echo Booting from internal eMMC chip...; " \
+ "mmc read 0 ${loadaddr} ${lnxoffset} ${mmc_kernel_size} && bootm"
+
#define NFS_BOOTCMD \
"run setup; " \
- "setenv bootargs ${defargs} ${nfsargs} ${setupargs}; " \
- "echo Booting from NFS...; " \
- "usb start; " \
- "dhcp; " \
- "bootm"
+ "setenv bootargs ${defargs} ${nfsargs} ${setupargs} " \
+ "${vidargs}; " \
+ "echo Booting via DHCP/TFTP/NFS...; " \
+ "usb start && dhcp && bootm"
#define USB_BOOTCMD \
- "setenv bootargs ${defargs} root=/dev/sda3 rw rootwait; " \
- "echo Booting from USB Stick...; " \
- "usb start; " \
- "fatload usb 0:1 ${loadaddr} uimage; " \
- "bootm ${loadaddr}"
-
-#define EMMC_BOOTCMD \
"run setup; " \
- "setenv bootargs ${defargs} ${mmcargs} ${setupargs};" \
- "echo Booting from internal eMMC card...; " \
- "mmc read 0 ${loadaddr} ${lnxoffset} ${mmc_kernel_size}; " \
- "bootm ${loadaddr}"
+ "setenv bootargs ${defargs} ${setupargs} ${usbargs} " \
+ "${vidargs}; " \
+ "echo Booting from USB stick...; " \
+ "usb start && fatload usb 0:1 ${loadaddr} uimage && bootm"
#undef CONFIG_BOOTARGS
#undef CONFIG_BOOTCOMMAND
#undef CONFIG_DIRECT_BOOTARGS
#define CONFIG_BOOTCOMMAND DEFAULT_BOOTCOMMAND
#define CONFIG_NFSBOOTCOMMAND NFS_BOOTCMD
-//moved from disk/part_efi.h to here, give the block where the GP1 partition starts
-//compare with sdargs below
+//moved from disk/part_efi.h to here, give the block where the GP1 partition
+//starts compare with sdargs below
#define GPT_PRIMARY_PARTITION_TABLE_LBA (gd->gpt_offset)
#define CONFIG_LOADADDR 0x80408000
#define CONFIG_EXTRA_ENV_SETTINGS \
CONFIG_STD_DEVICES_SETTINGS \
"defargs=video=tegrafb core_edp_mv=1300 usb_high_speed=1\0" \
"emmcboot=" EMMC_BOOTCMD "\0" \
- "mmcargs=ip=off root=/dev/mmcblk0p1 rw,noatime rootfstype=ext3 rootwait\0" \
+ "mmcargs=ip=off root=/dev/mmcblk0p1 rw,noatime rootfstype=ext3 " \
+ "rootwait\0" \
"mmc_kernel_size=0x4000\0" \
"nfsargs=ip=:::::eth0:on root=/dev/nfs rw netdevwait\0" \
- "setup=setenv setupargs gpt gpt_sector=${gptoffset} igb_mac=${ethaddr} no_console_suspend=1 console=tty1 console=ttyS0,${baudrate}n8 debug_uartport=lsport,0 ${memargs} fbcon=map:1\0" \
+ "setup=setenv setupargs gpt gpt_sector=${gptoffset} " \
+ "igb_mac=${ethaddr} no_console_suspend=1 console=tty1 " \
+ "console=ttyS0,${baudrate}n8 debug_uartport=lsport,0 "
+ "${memargs} fbcon=map:1\0" \
+ "usbargs=root=/dev/sda2 rw rootwait\0" \
"usbboot=" USB_BOOTCMD "\0" \
+ "vidargs=video=tegrafb0:640x480-16@60\0" \
""
/* GPIO */
diff --git a/include/configs/colibri_t20.h b/include/configs/colibri_t20.h
index c333431aa4..9e3ab173f3 100644
--- a/include/configs/colibri_t20.h
+++ b/include/configs/colibri_t20.h
@@ -94,48 +94,35 @@
#undef CONFIG_LINUXCONSOLE /* dynamically adjusted */
#define DEFAULT_BOOTCOMMAND \
- "run flashboot; run nfsboot"
+ "run flashboot; run usbboot; run nfsboot"
#define FLASH_BOOTCMD \
"run setup; " \
- "setenv bootargs ${defargs} ${flashargs} ${mtdparts} ${setupargs}; " \
+ "setenv bootargs ${defargs} ${flashargs} ${mtdparts} " \
+ "${setupargs} ${vidargs}; " \
"echo Booting from NAND...; " \
"nboot ${loadaddr} 0 ${lnxoffset} && bootm"
-#define MMC_BOOTCMD \
- "echo Loading RAM disk and kernel from MMC/SD card...; "\
- "mmc init && " \
- "fatload mmc 0:1 0xC08000 rootfs-ext2.img.gz && " \
- "fatload mmc 0:1 ${loadaddr} uImage;" \
- "run ramboot"
-
#define NFS_BOOTCMD \
"run setup; " \
- "setenv bootargs ${defargs} ${nfsargs} ${mtdparts} ${setupargs}; " \
- "echo Booting from NFS...; " \
- "usb start; " \
- "dhcp; " \
- "bootm"
-
-#define RAM_BOOTCMD \
- "run setup; " \
- "setenv bootargs ${defargs} ${ramargs} ${mtdparts} ${setupargs}; " \
- "echo Booting from RAM...; " \
- "bootm"
+ "setenv bootargs ${defargs} ${mtdparts} ${nfsargs} " \
+ "${setupargs} ${vidargs}; " \
+ "echo Booting via DHCP/TFTP/NFS...; " \
+ "usb start; && dhcp && bootm"
#define UBI_BOOTCMD \
"run setup; " \
- "setenv bootargs ${defargs} ${ubiargs} ${mtdparts} ${setupargs}; " \
+ "setenv bootargs ${defargs} ${mtdparts} ${setupargs} " \
+ "${ubiargs} ${vidargs}; " \
"echo Booting from NAND...; " \
- "ubi part kernel-ubi && ubi read ${loadaddr} kernel; " \
- "bootm"
+ "ubi part kernel-ubi && ubi read ${loadaddr} kernel && bootm"
#define USB_BOOTCMD \
- "echo Loading RAM disk and kernel from USB stick...; " \
- "usb start && " \
- "fatload usb 0:1 0xC08000 rootfs-ext2.img.gz && " \
- "fatload usb 0:1 ${loadaddr} uImage;" \
- "run ramboot"
+ "run setup; " \
+ "setenv bootargs ${defargs} ${mtdparts} ${setupargs} " \
+ "${usbargs} ${vidargs}; " \
+ "echo Booting from USB stick...; " \
+ "usb start && fatload usb 0:1 ${loadaddr} uimage && bootm"
#ifndef __CONFIG_SDBOOT_H
#define SD_BOOT_ARGS \
@@ -145,13 +132,14 @@
#else /* !__CONFIG_SDBOOT_H */
#define SD_BOOTCMD \
"run setup; " \
- "setenv bootargs ${defargs} ${sdargs} ${mtdparts} ${setupargs}; " \
+ "setenv bootargs ${defargs} ${mtdparts} ${sdargs} "
+ "${setupargs} ${vidargs}; " \
"echo Booting from MMC/SD card...; " \
- "mmc read 0 ${loadaddr} ${lnxoffset} ${sd_kernel_size}; " \
- "bootm"
+ "mmc read 0 ${loadaddr} ${lnxoffset} ${sd_kernel_size} && bootm"
#define SD_BOOT_ARGS \
- "sdargs=root=/dev/mmcblk0p1 ip=off rw,noatime rootfstype=ext3 rootwait gpt\0" \
+ "sdargs=root=/dev/mmcblk0p1 ip=off rw,noatime " \
+ "rootfstype=ext3 rootwait gpt\0" \
"sd_kernel_size=0x4000\0" \
"sdboot=" SD_BOOTCMD "\0"
@@ -164,9 +152,8 @@
#undef CONFIG_DIRECT_BOOTARGS
#define CONFIG_BOOTCOMMAND DEFAULT_BOOTCOMMAND
#define CONFIG_NFSBOOTCOMMAND NFS_BOOTCMD
-#define CONFIG_RAMBOOTCOMMAND RAM_BOOTCMD
-//moved from disk/part_efi.h to here, give the block where the GP1 partition starts
-//compare with sdargs below
+//moved from disk/part_efi.h to here, give the block where the GP1 partition
+//starts compare with sdargs below
#ifdef __CONFIG_SDBOOT_H
#define GPT_PRIMARY_PARTITION_TABLE_LBA (gd->gpt_offset)
#else
@@ -178,16 +165,18 @@
"defargs=video=tegrafb vmalloc=128M usb_high_speed=1\0" \
"flashargs=ip=off root=/dev/mtdblock0 rw rootfstype=yaffs2\0" \
"flashboot=" FLASH_BOOTCMD "\0" \
- "mmcboot=" MMC_BOOTCMD "\0" \
"nfsargs=ip=:::::eth0:on root=/dev/nfs rw netdevwait\0" \
- "ramargs=initrd=0xA1800000,32M ramdisk_size=32768 root=/dev/ram0 rw\0" \
SD_BOOT_ARGS \
"setup=setenv setupargs " \
- SD_BOOT_SETUP \
- "asix_mac=${ethaddr} no_console_suspend=1 console=tty1 console=ttyS0,${baudrate}n8 debug_uartport=lsport,0 ${memargs}\0" \
- "ubiargs=ubi.mtd=0 root=ubi0:rootfs rootfstype=ubifs\0" \
+ SD_BOOT_SETUP \
+ "asix_mac=${ethaddr} no_console_suspend=1 console=tty1 " \
+ "console=ttyS0,${baudrate}n8 debug_uartport=lsport,0 " \
+ "${memargs}\0" \
+ "ubiargs=ubi.mtd=7 root=ubi0:rootfs rootfstype=ubifs\0" \
"ubiboot=" UBI_BOOTCMD "\0" \
+ "usbargs=root=/dev/sda2 rw rootwait\0" \
"usbboot=" USB_BOOTCMD "\0" \
+ "vidargs=video=tegrafb0:640x480-16@60\0" \
""
/* Dynamic MTD partition support */
diff --git a/include/configs/colibri_t30.h b/include/configs/colibri_t30.h
index 298c15cd11..4e39d931a2 100644
--- a/include/configs/colibri_t30.h
+++ b/include/configs/colibri_t30.h
@@ -75,46 +75,51 @@
#define DEFAULT_BOOTCOMMAND \
"run emmcboot; run usbboot; run nfsboot"
+#define EMMC_BOOTCMD \
+ "run setup; " \
+ "setenv bootargs ${defargs} ${mmcargs} ${setupargs} " \
+ "${vidargs};" \
+ "echo Booting from internal eMMC chip...; " \
+ "mmc read 0 ${loadaddr} ${lnxoffset} ${mmc_kernel_size} && bootm"
+
#define NFS_BOOTCMD \
"run setup; " \
- "setenv bootargs ${defargs} ${nfsargs} ${setupargs}; " \
- "echo Booting from NFS...; " \
- "usb start; " \
- "dhcp; " \
- "bootm"
+ "setenv bootargs ${defargs} ${nfsargs} ${setupargs} " \
+ "${vidargs}; " \
+ "echo Booting via DHCP/TFTP/NFS...; " \
+ "usb start && dhcp && bootm"
#define USB_BOOTCMD \
- "setenv bootargs ${defargs} root=/dev/sda3 rw rootwait; " \
- "echo Booting from USB Stick...; " \
- "usb start; " \
- "fatload usb 0:1 ${loadaddr} uimage; " \
- "bootm ${loadaddr}"
-
-#define EMMC_BOOTCMD \
"run setup; " \
- "setenv bootargs ${defargs} ${mmcargs} ${setupargs};" \
- "echo Booting from internal eMMC card...; " \
- "mmc read 0 ${loadaddr} ${lnxoffset} ${mmc_kernel_size}; " \
- "bootm ${loadaddr}"
+ "setenv bootargs ${defargs} ${setupargs} ${usbargs} " \
+ "${vidargs}; " \
+ "echo Booting from USB stick...; " \
+ "usb start && fatload usb 0:1 ${loadaddr} uimage && bootm"
#undef CONFIG_BOOTARGS
#undef CONFIG_BOOTCOMMAND
#undef CONFIG_DIRECT_BOOTARGS
#define CONFIG_BOOTCOMMAND DEFAULT_BOOTCOMMAND
#define CONFIG_NFSBOOTCOMMAND NFS_BOOTCMD
-//moved from disk/part_efi.h to here, give the block where the GP1 partition starts
-//compare with sdargs below
+//moved from disk/part_efi.h to here, give the block where the GP1 partition
+//starts compare with sdargs below
#define GPT_PRIMARY_PARTITION_TABLE_LBA (gd->gpt_offset)
#define CONFIG_LOADADDR 0x80408000
#define CONFIG_EXTRA_ENV_SETTINGS \
CONFIG_STD_DEVICES_SETTINGS \
"defargs=video=tegrafb core_edp_mv=1300 usb_high_speed=1\0" \
"emmcboot=" EMMC_BOOTCMD "\0" \
- "mmcargs=ip=off root=/dev/mmcblk0p1 rw,noatime rootfstype=ext3 rootwait\0" \
+ "mmcargs=ip=off root=/dev/mmcblk0p1 rw,noatime rootfstype=ext3 " \
+ "rootwait\0" \
"mmc_kernel_size=0x4000\0" \
"nfsargs=ip=:::::eth0:on root=/dev/nfs rw netdevwait\0" \
- "setup=setenv setupargs gpt gpt_sector=${gptoffset} asix_mac=${ethaddr} no_console_suspend=1 console=tty1 console=ttyS0,${baudrate}n8 debug_uartport=lsport,0 ${memargs}\0" \
+ "setup=setenv setupargs gpt gpt_sector=${gptoffset} " \
+ "asix_mac=${ethaddr} no_console_suspend=1 console=tty1 " \
+ "console=ttyS0,${baudrate}n8 debug_uartport=lsport,0 "
+ "${memargs}\0" \
+ "usbargs=root=/dev/sda2 rw rootwait\0" \
"usbboot=" USB_BOOTCMD "\0" \
+ "vidargs=video=tegrafb0:640x480-16@60\0" \
""
/* GPIO */