./0000775000175000017500000000000012622320460011432 5ustar nielsenrnielsenr./0008-enable-booting-all-board.patch0000664000175000017500000001557112511507072017574 0ustar nielsenrnielsenrFrom 874e5220a7c7bce3f34dfadcfaeeadce63c3c688 Mon Sep 17 00:00:00 2001 From: Ralf Nielsen Date: Thu, 25 Sep 2014 08:29:45 +0200 Subject: [PATCH] enable booting all board --- arch/arm/lib/board.c | 3 +-- board/ti/am335x/board.c | 20 ++++++++++++++++++-- board/ti/am335x/board.h | 16 ++++++++++------ board/ti/am335x/mux.c | 2 +- common/autoboot.c | 16 ++++++++++++++++ common/stdio.c | 6 +++--- drivers/video/cfb_console.c | 20 ++++++++++++++++++++ include/configs/am335x_evm.h | 7 ++++--- 8 files changed, 73 insertions(+), 17 deletions(-) diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c index 76adaf3..22e9d7d 100644 --- a/arch/arm/lib/board.c +++ b/arch/arm/lib/board.c @@ -551,6 +551,7 @@ void board_init_r(gd_t *id, ulong dest_addr) arch_early_init_r(); #endif power_init_board(); + stdio_init(); /* get the devices list going. */ #if !defined(CONFIG_SYS_NO_FLASH) puts("Flash: "); @@ -613,8 +614,6 @@ void board_init_r(gd_t *id, ulong dest_addr) arm_pci_init(); #endif - stdio_init(); /* get the devices list going. */ - jumptable_init(); #if defined(CONFIG_API) diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c index 6bbf853..e4f82ac 100644 --- a/board/ti/am335x/board.c +++ b/board/ti/am335x/board.c @@ -203,8 +203,8 @@ static int board_video_init(void) // else // da8xx_video_init(&lcd_panels[1], &lcd_cfg, lcd_cfg.bpp); - //enable_pwm(); - enable_backlight(); +// enable_pwm(); +// enable_backlight(); return 0; } @@ -237,6 +237,21 @@ static int read_eeprom(struct am335x_baseboard_id *header) return -EIO; } + if (header->magic == 0xFFFFFFFF) + { + header->magic = 0xEE3355AA; + header->name[0] = 'A'; + header->name[1] = '3'; + header->name[2] = '3'; + header->name[3] = '5'; + header->name[4] = 'S'; + header->name[5] = 'E'; + header->name[6] = 'C'; + header->name[7] = 'A'; + printf("Set magic number to 0xEE3355AA\n"); + printf("Set magic name to 0xA335SECA\n"); + } + if (header->magic != 0xEE3355AA) { /* * read the eeprom using i2c again, @@ -606,6 +621,7 @@ void set_uart_mux_conf(void) void set_mux_conf_regs(void) { + set_gpio(53, 1); __maybe_unused struct am335x_baseboard_id header; if (read_eeprom(&header) < 0) diff --git a/board/ti/am335x/board.h b/board/ti/am335x/board.h index c99e725..8cb9eb0 100644 --- a/board/ti/am335x/board.h +++ b/board/ti/am335x/board.h @@ -29,11 +29,6 @@ struct am335x_baseboard_id { char mac_addr[HDR_NO_OF_MAC_ADDR][HDR_ETH_ALEN]; }; -static inline int board_is_bone_seca(struct am335x_baseboard_id *header) -{ - return !strncmp(header->name, "A335BNLT", HDR_NAME_LEN); -} - static inline int board_is_bone(struct am335x_baseboard_id *header) { return !strncmp(header->name, "A335BONE", HDR_NAME_LEN); @@ -41,7 +36,16 @@ static inline int board_is_bone(struct am335x_baseboard_id *header) static inline int board_is_bone_lt(struct am335x_baseboard_id *header) { - return !strncmp(header->name, "A335SECA", HDR_NAME_LEN); + if (!strncmp(header->name, "A335SECA", HDR_NAME_LEN)) + { + return 1; + } + if (!strncmp(header->name, "A335BNLT", HDR_NAME_LEN)) + { + printf("Found BBB found: 0xA335BNLT\n"); + return 1; + } + return 0; } static inline int board_is_evm_sk(struct am335x_baseboard_id *header) diff --git a/board/ti/am335x/mux.c b/board/ti/am335x/mux.c index 5420190..33af913 100644 --- a/board/ti/am335x/mux.c +++ b/board/ti/am335x/mux.c @@ -408,7 +408,7 @@ void enable_board_pin_mux(struct am335x_baseboard_id *header) configure_module_pin_mux(mmc0_pin_mux); configure_module_pin_mux(mmc1_pin_mux); } else { - puts("Unknown board, cannot configure pinmux."); + puts("Unknown board\n"); hang(); } } diff --git a/common/autoboot.c b/common/autoboot.c index 30102a4..631634f 100644 --- a/common/autoboot.c +++ b/common/autoboot.c @@ -141,6 +141,16 @@ static int abortboot_keyed(int bootdelay) static int menukey; #endif +static int set_gpio(int gpio, int state) +{ + gpio_request(gpio, "temp"); + gpio_direction_output(gpio, state); + gpio_set_value(gpio, state); + gpio_free(gpio); + return 0; +} + + static int abortboot_normal(int bootdelay) { int abort = 0; @@ -150,7 +160,13 @@ static int abortboot_normal(int bootdelay) printf(CONFIG_MENUPROMPT); #else if (bootdelay >= 0) + { + set_gpio(53, 1); + set_gpio(54, 1); + set_gpio(55, 1); + set_gpio(56, 1); printf("Hit any key to stop autoboot: %2d ", bootdelay); + } #endif #if defined CONFIG_ZERO_BOOTDELAY_CHECK diff --git a/common/stdio.c b/common/stdio.c index 844f98c..cad16ea 100644 --- a/common/stdio.c +++ b/common/stdio.c @@ -181,6 +181,9 @@ int stdio_deregister(const char *devname) int stdio_init (void) { +#if defined(CONFIG_VIDEO) || defined(CONFIG_CFB_CONSOLE) + drv_video_init (); +#endif #if defined(CONFIG_NEEDS_MANUAL_RELOC) /* already relocated for current ARM implementation */ ulong relocation_offset = gd->reloc_off; @@ -206,9 +209,6 @@ int stdio_init (void) #ifdef CONFIG_LCD drv_lcd_init (); #endif -#if defined(CONFIG_VIDEO) || defined(CONFIG_CFB_CONSOLE) - drv_video_init (); -#endif #ifdef CONFIG_KEYBOARD drv_keyboard_init (); #endif diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c index c11251e..15e20e6 100644 --- a/drivers/video/cfb_console.c +++ b/drivers/video/cfb_console.c @@ -90,6 +90,7 @@ #include #include #include +#include /* * Console device defines with SMI graphic @@ -1981,6 +1982,22 @@ static void plot_logo_or_black(void *screen, int width, int x, int y, int black) #endif } +static int set_gpio(int gpio, int state) +{ + gpio_request(gpio, "temp"); + gpio_direction_output(gpio, state); + gpio_set_value(gpio, state); + gpio_free(gpio); + return 0; +} + +static int enable_backlight(void) +{ + printf("Enable backlight\n"); + set_gpio(50, 1); + return 0; +} + static void *video_logo(void) { char info[128]; @@ -2124,6 +2141,7 @@ void video_clear(void) bgx /* fill color */ ); #else + printf("Video clear Color: %d\n", bgx); memsetl(video_fb_address, (VIDEO_VISIBLE_ROWS * VIDEO_LINE_LEN) / sizeof(int), bgx); #endif @@ -2232,6 +2250,8 @@ static int video_init(void) if (cfb_do_flush_cache) flush_cache(VIDEO_FB_ADRS, VIDEO_SIZE); + enable_backlight(); + return 0; } diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h index 99a433b..331ecf2 100644 --- a/include/configs/am335x_evm.h +++ b/include/configs/am335x_evm.h @@ -354,15 +354,16 @@ #endif #define CONFIG_BOOTCOMMAND \ + "gpio clear 53; " \ + "gpio clear 54; " \ + "gpio clear 55; " \ + "gpio clear 56; " \ "gpio set 53; " \ "i2c mw 0x24 1 0x3e; " \ "run findfdt; " \ "setenv mmcdev 0; " \ "setenv bootpart 0:1; " \ "run mmcboot;" \ - "gpio clear 56; " \ - "gpio clear 55; " \ - "gpio clear 54; " \ "setenv mmcdev 1; " \ "setenv bootpart 1:1; " \ "run mmcboot;" \ -- 1.7.9.5 ./0007-mmcboot-set-to-mmcblk0p2.patch0000664000175000017500000000133012511507072017475 0ustar nielsenrnielsenrFrom 7aa73935d312b8fd1fff74d835bed7a46f5d3c3f Mon Sep 17 00:00:00 2001 From: Ralf Nielsen Date: Tue, 9 Sep 2014 10:35:11 +0200 Subject: [PATCH] mmcboot set to mmcblk0p2 --- include/configs/am335x_evm.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h index 5aff203..b6e5a62 100644 --- a/include/configs/am335x_evm.h +++ b/include/configs/am335x_evm.h @@ -343,6 +343,8 @@ "run mmcargs;" \ "bootz ${loadaddr} ${rdaddr}:${rdsize} ${fdtaddr}; " \ "else " \ + "echo mmcroot set to dev0; "\ + "setenv mmcroot /dev/mmcblk0p2 ro;" \ "run mmcargs;" \ "bootz ${loadaddr} - ${fdtaddr}; " \ "fi;" \ -- 1.7.9.5 ./0010-LED-on-part2.patch0000664000175000017500000000124412511507072015101 0ustar nielsenrnielsenrFrom 5fd0a02d98d92c9340153919af9c3c13486b5e37 Mon Sep 17 00:00:00 2001 From: Ralf Nielsen Date: Thu, 30 Oct 2014 11:01:45 +0100 Subject: [PATCH] LED on part2 --- board/ti/am335x/board.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c index e4f82ac..53ddd8f 100644 --- a/board/ti/am335x/board.c +++ b/board/ti/am335x/board.c @@ -701,6 +701,10 @@ void sdram_init(void) int board_init(void) { printf ("board_init\n"); + // Switch LED on Power Buttonon + set_gpio(40, 0); // White + //set_gpio(41, 0); // Green + #if defined(CONFIG_HW_WATCHDOG) hw_watchdog_init(); #endif -- 1.7.9.5 ./0011-Disable-LOGO.patch0000664000175000017500000000423312511507072015140 0ustar nielsenrnielsenrFrom 1117b9dbba80375498f6d9ce1e7ac9c896aaab49 Mon Sep 17 00:00:00 2001 From: Ralf Nielsen Date: Tue, 6 Jan 2015 15:43:57 +0100 Subject: [PATCH] Disable LOGO --- board/ti/am335x/board.c | 18 +++++++++--------- common/autoboot.c | 1 + include/configs/am335x_evm.h | 4 +++- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c index 53ddd8f..6febb62 100644 --- a/board/ti/am335x/board.c +++ b/board/ti/am335x/board.c @@ -33,6 +33,15 @@ #include #include "board.h" +static int set_gpio(int gpio, int state) +{ + gpio_request(gpio, "temp"); + gpio_direction_output(gpio, state); + gpio_set_value(gpio, state); + gpio_free(gpio); + return 0; +} + #ifdef CONFIG_VIDEO #include "../../../drivers/video/da8xx-fb.h" static struct da8xx_panel lcd_panels[] = { @@ -93,15 +102,6 @@ static const struct lcd_ctrl_config lcd_cfg = { .raster_order = 0, }; -static int set_gpio(int gpio, int state) -{ - gpio_request(gpio, "temp"); - gpio_direction_output(gpio, state); - gpio_set_value(gpio, state); - gpio_free(gpio); - return 0; -} - static int enable_backlight(void) { set_gpio(BOARD_LCD_POWER, 1); diff --git a/common/autoboot.c b/common/autoboot.c index 631634f..455cf27 100644 --- a/common/autoboot.c +++ b/common/autoboot.c @@ -11,6 +11,7 @@ #include #include #include +#include DECLARE_GLOBAL_DATA_PTR; diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h index 331ecf2..4225001 100644 --- a/include/configs/am335x_evm.h +++ b/include/configs/am335x_evm.h @@ -389,7 +389,7 @@ #define CONFIG_POWER_TPS65910 /* Video support */ -#define CONFIG_VIDEO +/*#define CONFIG_VIDEO*/ #ifdef CONFIG_VIDEO #define CONFIG_VIDEO_DA8XX #define CONFIG_CFB_CONSOLE @@ -409,6 +409,7 @@ #endif /* SPL */ +#ifdef CONFIG_SPL_BUILD #ifndef CONFIG_NOR_BOOT #define CONFIG_SPL_POWER_SUPPORT #define CONFIG_SPL_YMODEM_SUPPORT @@ -453,6 +454,7 @@ #define CONFIG_SYS_NAND_U_BOOT_OFFS 0x80000 #endif #endif +#endif /* * For NOR boot, we must set this to the start of where NOR is mapped -- 1.7.9.5 ./0004-Display-enable.patch0000664000175000017500000004711512511507072015700 0ustar nielsenrnielsenrFrom 99142d77612323a51d28251478f964940a7b83d5 Mon Sep 17 00:00:00 2001 From: Ralf Nielsen Date: Mon, 8 Sep 2014 08:12:29 +0200 Subject: [PATCH 4/6] Display-enable --- arch/arm/include/asm/arch-am33xx/hardware_am33xx.h | 4 + board/ti/am335x/board.c | 186 ++++++++++++++++++++ board/ti/am335x/mux.c | 29 +++ common/cmd_writeconfig.c | 140 +++++++++++++++ common/lcd.c | 3 + drivers/video/cfb_console.c | 13 +- drivers/video/da8xx-fb.c | 21 ++- include/configs/am335x_evm.h | 24 +++ 8 files changed, 413 insertions(+), 7 deletions(-) create mode 100644 common/cmd_writeconfig.c diff --git a/arch/arm/include/asm/arch-am33xx/hardware_am33xx.h b/arch/arm/include/asm/arch-am33xx/hardware_am33xx.h index c67a080..fc5966b 100644 --- a/arch/arm/include/asm/arch-am33xx/hardware_am33xx.h +++ b/arch/arm/include/asm/arch-am33xx/hardware_am33xx.h @@ -63,6 +63,10 @@ /* LCD Controller */ #define LCD_CNTL_BASE 0x4830E000 +#define BOARD_LCD_POWER 50 +#define BOARD_BACK_LIGHT 50 +#define BOARD_TOUCH_POWER 50 + /* PWMSS */ #define PWMSS0_BASE 0x48300000 #define AM33XX_ECAP0_BASE 0x48300100 diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c index da780ed..6bbf853 100644 --- a/board/ti/am335x/board.c +++ b/board/ti/am335x/board.c @@ -33,6 +33,183 @@ #include #include "board.h" +#ifdef CONFIG_VIDEO +#include "../../../drivers/video/da8xx-fb.h" +static struct da8xx_panel lcd_panels[] = { + /* AUO G156XW01 V1 */ + [0] = { + .name = "AUO_G156XW01_V1", + .width = 800, + .height = 480, + .hfp = 40, + .hbp = 40, + .hsw = 48, + .vfp = 13, + .vbp = 30, + .vsw = 3, + .pxl_clk = 30000000, + .invert_pxl_clk = 0, + }, + /* + * Settings from factoryset + * stored in EEPROM + */ + [1] = { + .name = "factoryset", + .width = 0, + .height = 0, + .hfp = 0, + .hbp = 0, + .hsw = 0, + .vfp = 0, + .vbp = 0, + .vsw = 0, + .pxl_clk = 60000000, + .invert_pxl_clk = 0, + }, +}; + +static const struct display_panel disp_panel = { + WVGA, + 32, + 16, + COLOR_ACTIVE, +}; + +static const struct lcd_ctrl_config lcd_cfg = { + &disp_panel, + .ac_bias = 255, + .ac_bias_intrpt = 0, + .dma_burst_sz = 16, + .bpp = 16, + .fdd = 16, + .tft_alt_mode = 0, + .stn_565_mode = 0, + .mono_8bit_mode = 0, + .invert_line_clock = 1, + .invert_frm_clock = 1, + .sync_edge = 0, + .sync_ctrl = 1, + .raster_order = 0, +}; + +static int set_gpio(int gpio, int state) +{ + gpio_request(gpio, "temp"); + gpio_direction_output(gpio, state); + gpio_set_value(gpio, state); + gpio_free(gpio); + return 0; +} + +static int enable_backlight(void) +{ + set_gpio(BOARD_LCD_POWER, 1); + set_gpio(BOARD_BACK_LIGHT, 1); + set_gpio(BOARD_TOUCH_POWER, 1); + return 0; +} + +static int enable_pwm(void) +{ + struct pwmss_regs *pwmss = (struct pwmss_regs *)PWMSS0_BASE; + struct pwmss_ecap_regs *ecap; + int ticks = PWM_TICKS; + int duty = PWM_DUTY; + + ecap = (struct pwmss_ecap_regs *)AM33XX_ECAP0_BASE; + /* enable clock */ + setbits_le32(&pwmss->clkconfig, ECAP_CLK_EN); + /* TimeStam Counter register */ + writel(0xdb9, &ecap->tsctr); + /* config period */ + writel(ticks - 1, &ecap->cap3); + writel(ticks - 1, &ecap->cap1); + setbits_le16(&ecap->ecctl2, + (ECTRL2_MDSL_ECAP | ECTRL2_SYNCOSEL_MASK | 0xd0)); + /* config duty */ + writel(duty, &ecap->cap2); + writel(duty, &ecap->cap4); + /* start */ + setbits_le16(&ecap->ecctl2, ECTRL2_CTRSTP_FREERUN); + return 0; +} + +static struct dpll_regs dpll_lcd_regs = { + .cm_clkmode_dpll = CM_WKUP + 0x98, + .cm_idlest_dpll = CM_WKUP + 0x48, + .cm_clksel_dpll = CM_WKUP + 0x54, +}; + +/* no console on this board */ +int board_cfb_skip(void) +{ + return 1; +} + +#define PLL_GET_M(v) ((v >> 8) & 0x7ff) +#define PLL_GET_N(v) (v & 0x7f) + +static int get_clk(struct dpll_regs *dpll_regs) +{ + unsigned int val; + unsigned int m, n; + int f = 0; + + val = readl(dpll_regs->cm_clksel_dpll); + m = PLL_GET_M(val); + n = PLL_GET_N(val); + f = (m * V_OSCK) / n; + + return f; +}; + +int clk_get(int clk) +{ + return get_clk(&dpll_lcd_regs); +}; + +static int conf_disp_pll(int m, int n) +{ + struct cm_perpll *cmper = (struct cm_perpll *)CM_PER; + struct cm_dpll *cmdpll = (struct cm_dpll *)CM_DPLL; + struct dpll_params dpll_lcd = {m, n, -1, -1, -1, -1, -1}; + + u32 *const clk_domains[] = { + &cmper->lcdclkctrl, + 0 + }; + u32 *const clk_modules_explicit_en[] = { + &cmper->lcdclkctrl, + &cmper->lcdcclkstctrl, + &cmper->epwmss0clkctrl, + 0 + }; + do_enable_clocks(clk_domains, clk_modules_explicit_en, 1); + writel(0x0, &cmdpll->clklcdcpixelclk); + + do_setup_dpll(&dpll_lcd_regs, &dpll_lcd); + + return 0; +} + +static int board_video_init(void) +{ + conf_disp_pll(24, 1); + //printf("Readback : 0x%08x\n",(unsigned int)rbint); + printf("Board Video Init\n"); +// if (factory_dat.pxm50) + da8xx_video_init(&lcd_panels[0], &lcd_cfg, lcd_cfg.bpp); +// else +// da8xx_video_init(&lcd_panels[1], &lcd_cfg, lcd_cfg.bpp); + + //enable_pwm(); + enable_backlight(); + + return 0; +} +#endif + DECLARE_GLOBAL_DATA_PTR; /* GPIO that controls power to DDR on EVM-SK */ @@ -507,6 +684,7 @@ void sdram_init(void) */ int board_init(void) { + printf ("board_init\n"); #if defined(CONFIG_HW_WATCHDOG) hw_watchdog_init(); #endif @@ -515,6 +693,11 @@ int board_init(void) #if defined(CONFIG_NOR) || defined(CONFIG_NAND) gpmc_init(); #endif + +#ifdef CONFIG_VIDEO + board_video_init(); +#endif + return 0; } @@ -699,3 +882,6 @@ int board_eth_init(bd_t *bis) return n; } #endif + + + diff --git a/board/ti/am335x/mux.c b/board/ti/am335x/mux.c index b2bfda5..5420190 100644 --- a/board/ti/am335x/mux.c +++ b/board/ti/am335x/mux.c @@ -190,6 +190,30 @@ static struct module_pin_mux nand_pin_mux[] = { {-1}, }; +//#if defined(CONFIG_VIDEO) +static struct module_pin_mux lcd_pin_mux[] = { + {OFFSET(lcd_data0), MODE(0) | PULLUDEN | RXACTIVE}, /* NOR_A0 */ + {OFFSET(lcd_data1), MODE(0) | PULLUDEN | RXACTIVE}, /* NOR_A1 */ + {OFFSET(lcd_data2), MODE(0) | PULLUDEN | RXACTIVE}, /* NOR_A2 */ + {OFFSET(lcd_data3), MODE(0) | PULLUDEN | RXACTIVE}, /* NOR_A3 */ + {OFFSET(lcd_data4), MODE(0) | PULLUDEN | RXACTIVE}, /* NOR_A4 */ + {OFFSET(lcd_data5), MODE(0) | PULLUDEN | RXACTIVE}, /* NOR_A5 */ + {OFFSET(lcd_data6), MODE(0) | PULLUDEN | RXACTIVE}, /* NOR_A6 */ + {OFFSET(lcd_data7), MODE(0) | PULLUDEN | RXACTIVE}, /* NOR_A7 */ + {OFFSET(lcd_pclk), MODE(0)| PULLUDEN | RXACTIVE}, /* NOR_A10 */ + {OFFSET(lcd_ac_bias_en), MODE(0)| PULLUDEN | RXACTIVE}, /* NOR_A11 */ + {OFFSET(lcd_data8), MODE(0) | PULLUDEN | RXACTIVE}, /* NOR_A12 */ + {OFFSET(lcd_data9), MODE(0) | PULLUDEN | RXACTIVE}, /* NOR_A13 */ + {OFFSET(lcd_data10), MODE(0) | PULLUDEN | RXACTIVE}, /* NOR_A14 */ + {OFFSET(lcd_data11), MODE(0) | PULLUDEN | RXACTIVE}, /* NOR_A15 */ + {OFFSET(lcd_data12), MODE(0) | PULLUDEN | RXACTIVE}, /* NOR_A16 */ + {OFFSET(lcd_data13), MODE(0) | PULLUDEN | RXACTIVE}, /* NOR_A17 */ + {OFFSET(lcd_data14), MODE(0) | PULLUDEN | RXACTIVE}, /* NOR_A18 */ + {OFFSET(lcd_data15), MODE(0) | PULLUDEN | RXACTIVE}, /* NOR_A19 */ + {-1} +}; +//#endif + #if defined(CONFIG_NOR) && !defined(CONFIG_NOR_BOOT) static struct module_pin_mux bone_norcape_pin_mux[] = { {OFFSET(lcd_data0), MODE(1) | PULLUDEN | RXACTIVE}, /* NOR_A0 */ @@ -330,7 +354,11 @@ static unsigned short detect_daughter_board_profile(void) void enable_board_pin_mux(struct am335x_baseboard_id *header) { + printf ("enable_board_pin_mux\n"); /* Do board-specific muxes. */ + + configure_module_pin_mux(lcd_pin_mux); + if (board_is_bone(header)) { /* Beaglebone pinmux */ configure_module_pin_mux(i2c1_pin_mux); @@ -339,6 +367,7 @@ void enable_board_pin_mux(struct am335x_baseboard_id *header) #ifndef CONFIG_NOR configure_module_pin_mux(mmc1_pin_mux); #endif + #if defined(CONFIG_NOR) && !defined(CONFIG_NOR_BOOT) configure_module_pin_mux(bone_norcape_pin_mux); #endif diff --git a/common/cmd_writeconfig.c b/common/cmd_writeconfig.c new file mode 100644 index 0000000..287eb93 --- /dev/null +++ b/common/cmd_writeconfig.c @@ -0,0 +1,140 @@ +/* + * (C) Copyright 2013 + * Ralf Nielsen, himself, ralf.nielsen@seca.com + * + * Write configuration to eeprom. + * + */ + +/* + * Tool to write the Magic Number and Board IT to the EEPROM + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include + + +static unsigned int magic = 0xEE3355AA; +static int magicAddr = 0; +static char name[9] = "A335SECA"; +static int nameAddr = 4; +static char version[5] = "0001"; +static int versionAddr = 12; +static char date[5] = "4813"; +static int dateAddr = 16; +static char sign[9] = "TEMB0001"; +static int signAddr = 20; + +static unsigned int clear = 0xFFFFFFFF; + + +//static struct seca_baseboard_id header = { + +static int do_writeconfig ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +{ + int num; + char rbchar[20]; + + unsigned int rbint; + + if (argc > 2) + return CMD_RET_USAGE; + + if (argc == 2) + { + num = simple_strtoul(argv[1], NULL, 16); + if (num > 5 || num < 0) + return CMD_RET_USAGE; + } + else + num = 0; + + if (num==0 || num==1) + { + i2c_write(CONFIG_SYS_I2C_EEPROM_ADDR, magicAddr, CONFIG_SYS_I2C_EEPROM_ADDR_LEN, (uchar *)&magic, 4); + printf("Magic Num: 0x%08x\t",magic); + udelay(11000); + i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR, magicAddr, CONFIG_SYS_I2C_EEPROM_ADDR_LEN, (uchar *)&rbint, 4); + printf("Readback : 0x%08x\n",(unsigned int)rbint); + } + + if (num==0 || num==2) + { + i2c_write(CONFIG_SYS_I2C_EEPROM_ADDR, nameAddr, CONFIG_SYS_I2C_EEPROM_ADDR_LEN, (uchar *)name, 8); + printf("Board ID : %s \t", name); + udelay(11000); + i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR, nameAddr, CONFIG_SYS_I2C_EEPROM_ADDR_LEN, (uchar *)rbchar, 8); + rbchar[8] = '\0'; + printf("Readback : %s\n",rbchar); + + } + + if (num==0 || num==3) + { + i2c_write(CONFIG_SYS_I2C_EEPROM_ADDR, versionAddr, CONFIG_SYS_I2C_EEPROM_ADDR_LEN, (uchar *)version, 4); + printf("Version : %s \t", version); + udelay(11000); + i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR, versionAddr, CONFIG_SYS_I2C_EEPROM_ADDR_LEN, (uchar *)rbchar, 4); + rbchar[4] = '\0'; + printf("Readback : %s\n",rbchar); + } + + if (num==0 || num==4) + { + i2c_write(CONFIG_SYS_I2C_EEPROM_ADDR, dateAddr, CONFIG_SYS_I2C_EEPROM_ADDR_LEN, (uchar *)date, 4); + printf("Date WWYY: %s \t", date); + udelay(11000); + i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR, dateAddr, CONFIG_SYS_I2C_EEPROM_ADDR_LEN, (uchar *)rbchar, 4); + rbchar[4] = '\0'; + printf("Readback : %s\n",rbchar); + } + + if (num==0 || num==5) + { + i2c_write(CONFIG_SYS_I2C_EEPROM_ADDR, signAddr, CONFIG_SYS_I2C_EEPROM_ADDR_LEN, (uchar *)sign, 8); + printf("Sign : %s \t", sign); + udelay(11000); + i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR, signAddr, CONFIG_SYS_I2C_EEPROM_ADDR_LEN, (uchar *)rbchar, 8); + rbchar[8] = '\0'; + printf("Readback : %s\n",rbchar); + } + return 0; +} + +U_BOOT_CMD( + wrconf, CONFIG_SYS_MAXARGS, 2, do_writeconfig, + "write standard configuration to eeprom", + "0 or no arg = write all\n1 = magic number\n2 = board id\n3 = version\n4 = date WWYY\n5 = sign\n" +); + +static int do_clearconfig ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +{ + int i; + + if (argc > 1) + return CMD_RET_USAGE; + + for (i=0; i<40; i+=4) + { + i2c_write(CONFIG_SYS_I2C_EEPROM_ADDR, i, CONFIG_SYS_I2C_EEPROM_ADDR_LEN, (uchar *)&clear, 4); + udelay(11000); + } + + printf("EEPROM is clear\n"); + + return 0; +} + +U_BOOT_CMD( + wrclear, CONFIG_SYS_MAXARGS, 1, do_clearconfig, + "clear configuration from eeprom", + "Write 0xFF to all addresses" +); + diff --git a/common/lcd.c b/common/lcd.c index 19b86b7..79784ca 100644 --- a/common/lcd.c +++ b/common/lcd.c @@ -726,6 +726,7 @@ static void splash_align_axis(int *axis, unsigned long panel_size, unsigned long panel_picture_delta = panel_size - picture_size; unsigned long axis_alignment; + printf ("splash_align_axis\n"); if (*axis == BMP_ALIGN_CENTER) axis_alignment = panel_picture_delta / 2; else if (*axis < 0) @@ -896,6 +897,8 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y) #if !defined(CONFIG_MCC200) ushort *cmap = NULL; #endif + + printf ("lcd_display_bitmap\n"); ushort *cmap_base = NULL; ushort i, j; uchar *fb; diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c index b52e9ed..75efaaa 100644 --- a/drivers/video/cfb_console.c +++ b/drivers/video/cfb_console.c @@ -1858,6 +1858,7 @@ U_BOOT_CMD( static void plot_logo_or_black(void *screen, int width, int x, int y, int black) { + printf("plot_logo_or_black black:%d width:%d x:%d y:%d\n", black, width, x, y); int xcount, i; int skip = (width - VIDEO_LOGO_WIDTH) * VIDEO_PIXEL_SIZE; @@ -1899,7 +1900,7 @@ static void plot_logo_or_black(void *screen, int width, int x, int y, int black) logo_green = linux_logo_green; logo_blue = linux_logo_blue; #endif - + printf ("VIDEO_DATA_FORMAT: 0x%x\n", VIDEO_DATA_FORMAT); if (VIDEO_DATA_FORMAT == GDF__8BIT_INDEX) { for (i = 0; i < VIDEO_LOGO_COLORS; i++) { video_set_lut(i + VIDEO_LOGO_LUT_OFFSET, @@ -1913,7 +1914,10 @@ static void plot_logo_or_black(void *screen, int width, int x, int y, int black) int xpos = x; #endif xcount = VIDEO_LOGO_WIDTH; + //printf ("VIDEO_DATA_FORMAT - ycount\n"); while (xcount--) { + //printf ("VIDEO_DATA_FORMAT - xcount\n"); + if (black) { r = 0x00; g = 0x00; @@ -1923,7 +1927,7 @@ static void plot_logo_or_black(void *screen, int width, int x, int y, int black) g = logo_green[*source - VIDEO_LOGO_LUT_OFFSET]; b = logo_blue[*source - VIDEO_LOGO_LUT_OFFSET]; } - + //printf ("VIDEO_DATA_FORMAT: 0x%x\n", VIDEO_DATA_FORMAT); switch (VIDEO_DATA_FORMAT) { case GDF__8BIT_INDEX: *dest = *source; @@ -1980,6 +1984,7 @@ static void plot_logo_or_black(void *screen, int width, int x, int y, int black) free(logo_green); free(logo_blue); #endif + printf ("plot_logo_or_black - END \n"); } static void *video_logo(void) @@ -1992,9 +1997,11 @@ static void *video_logo(void) splash_get_pos(&video_logo_xpos, &video_logo_ypos); + printf("video_logo\n"); #ifdef CONFIG_SPLASH_SCREEN s = getenv("splashimage"); if (s != NULL) { + printf("video_logo - splash s: 0x%s\n",s); splash_screen_prepare(); addr = simple_strtoul(s, NULL, 16); @@ -2220,7 +2227,7 @@ static int video_init(void) #ifdef CONFIG_VIDEO_LOGO /* Plot the logo and get start point of console */ - debug("Video: Drawing the logo ...\n"); + printf("Video: Drawing the logo ...\n"); video_console_address = video_logo(); #else video_console_address = video_fb_address; diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c index 3a5f325..0c4153b 100644 --- a/drivers/video/da8xx-fb.c +++ b/drivers/video/da8xx-fb.c @@ -157,11 +157,14 @@ const struct lcd_ctrl_config *da8xx_lcd_cfg; static inline unsigned int lcdc_read(u32 *addr) { - return (unsigned int)readl(addr); + unsigned int tmp = (unsigned int)readl(addr); + //printf ("lcdc_read addr: 0x%p, value: 0x%x\n", addr, tmp); + return tmp; } static inline void lcdc_write(unsigned int val, u32 *addr) { + //printf ("lcdc_write addr: 0x%p, value: 0x%x\n", addr, val); writel(val, addr); } @@ -650,7 +653,7 @@ static void lcd_calc_clk_divider(struct da8xx_fb_par *par) lcd_clk = clk_get(2); div = lcd_clk / par->pxl_clk; - debug("LCD Clock: %d Divider: %d PixClk: %d\n", + printf("LCD Clock: %d Divider: %d PixClk: %d\n", lcd_clk, div, par->pxl_clk); /* Configure the LCD clock divisor. */ @@ -668,7 +671,7 @@ static int lcd_init(struct da8xx_fb_par *par, const struct lcd_ctrl_config *cfg, { u32 bpp; int ret = 0; - + printf ("lcd_init\n"); lcd_reset(par); /* Calculate the divider */ @@ -716,7 +719,7 @@ static int lcd_init(struct da8xx_fb_par *par, const struct lcd_ctrl_config *cfg, cfg->raster_order); if (ret < 0) return ret; - + printf ("lcd_init - Configure FDD \n"); /* Configure FDD */ lcdc_write((lcdc_read(&da8xx_fb_reg_base->raster_ctrl) & 0xfff00fff) | (cfg->fdd << 12), &da8xx_fb_reg_base->raster_ctrl); @@ -726,6 +729,7 @@ static int lcd_init(struct da8xx_fb_par *par, const struct lcd_ctrl_config *cfg, static void lcdc_dma_start(void) { + printf ("lcdc_dma_start\n"); struct da8xx_fb_par *par = da8xx_fb_info->par; lcdc_write(par->dma_start, &da8xx_fb_reg_base->dma_frm_buf_base_addr_0); @@ -739,11 +743,13 @@ static void lcdc_dma_start(void) static u32 lcdc_irq_handler_rev01(void) { + printf ("lcdc_irq_handler_rev01\n"); struct da8xx_fb_par *par = da8xx_fb_info->par; u32 stat = lcdc_read(&da8xx_fb_reg_base->stat); u32 reg_ras; if ((stat & LCD_SYNC_LOST) && (stat & LCD_FIFO_UNDERFLOW)) { + printf ("lcdc_irq_handler_rev01 - LCD_SYNC_LOST\n"); debug("LCD_SYNC_LOST\n"); lcd_disable_raster(NO_WAIT_FOR_FRAME_DONE); lcdc_write(stat, &da8xx_fb_reg_base->stat); @@ -751,6 +757,7 @@ static u32 lcdc_irq_handler_rev01(void) return LCD_SYNC_LOST; } else if (stat & LCD_PL_LOAD_DONE) { debug("LCD_PL_LOAD_DONE\n"); + printf ("lcdc_irq_handler_rev01 - LCD_PL_LOAD_DONE\n"); /* * Must disable raster before changing state of any control bit. * And also must be disabled before clearing the PL loading @@ -770,6 +777,7 @@ static u32 lcdc_irq_handler_rev01(void) lcd_blit(LOAD_DATA, par); return LCD_PL_LOAD_DONE; } else { + printf ("lcdc_irq_handler_rev01 - LOAD_DONE\n"); lcdc_write(stat, &da8xx_fb_reg_base->stat); if (stat & LCD_END_OF_FRAME0) @@ -787,6 +795,7 @@ static u32 lcdc_irq_handler_rev01(void) static u32 lcdc_irq_handler_rev02(void) { + printf ("lcdc_irq_handler_rev02\n"); struct da8xx_fb_par *par = da8xx_fb_info->par; u32 stat = lcdc_read(&da8xx_fb_reg_base->masked_stat); u32 reg_int; @@ -871,6 +880,7 @@ void *video_hw_init(void) u32 rev; char *p; + printf ("video_hw_init\n"); if (!lcd_panel) { printf("Display not initialized\n"); return NULL; @@ -1024,6 +1034,7 @@ void *video_hw_init(void) /* Wait until DMA is working */ wait_for_event(LCD_END_OF_FRAME0); + printf ("video_hw_init - End\n"); return (void *)&gpanel; err_release_fb_mem: @@ -1048,7 +1059,9 @@ void video_set_lut(unsigned int index, /* color number */ void da8xx_video_init(const struct da8xx_panel *panel, const struct lcd_ctrl_config *lcd_cfg, int bits_pixel) { + printf ("da8xx_video_init\n"); lcd_panel = panel; da8xx_lcd_cfg = lcd_cfg; bits_x_pixel = bits_pixel; } + diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h index a4f2aca..f40744e 100644 --- a/include/configs/am335x_evm.h +++ b/include/configs/am335x_evm.h @@ -115,6 +115,7 @@ "hostname=\0" \ "device=eth0\0" \ "autoconf=off\0" \ + "splashimage=88000000\0" \ "root_dir=/home/userid/targetNFS\0" \ "nfs_options=,vers=3\0" \ "nfsrootfstype=ext4 rootwait fixrtc\0" \ @@ -383,6 +384,29 @@ #define CONFIG_POWER_TPS65217 #define CONFIG_POWER_TPS65910 +/* Video support */ +//#define CONFIG_VIDEO +#if defined(CONFIG_VIDEO) +#define CONFIG_VIDEO_DA8XX +#define CONFIG_CFB_CONSOLE +#define CONFIG_VGA_AS_SINGLE_DEVICE +#define CONFIG_SPLASH_SCREEN +#define CONFIG_SPLASH_SCREEN_ALIGN +#define CONFIG_VIDEO_LOGO +#define CONFIG_VIDEO_BMP_RLE8 +#define CONFIG_VIDEO_BMP_GZIP +#define CONFIG_VIDEO_BMP_LOGO +#define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE (800*480 + 256*4 + 10*1024) +#define CONFIG_CMD_BMP +#define CONFIG_BMP_16BPP +#define DA8XX_LCD_CNTL_BASE LCD_CNTL_BASE +#define PWM_TICKS 0x1388 +#define PWM_DUTY 0x200 +#define CONFIG_SYS_CONSOLE_BG_COL 0xff +#define CONFIG_SYS_CONSOLE_FG_COL 0x00 +#endif + + /* SPL */ #ifndef CONFIG_NOR_BOOT #define CONFIG_SPL_POWER_SUPPORT -- 1.7.9.5 ./Add-COPYING-file-to-u-boot.patch0000664000175000017500000004143712511507071017024 0ustar nielsenrnielsenrFrom 729fd40a82786ecb1f35eb9aef3f98494d6a21e2 Mon Sep 17 00:00:00 2001 From: Ralf Nielsen Date: Thu, 28 Nov 2013 07:58:30 +0100 Subject: [PATCH] Add COPYING file to u-boot --- COPYING | 306 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 306 insertions(+) create mode 100644 COPYING diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..44d1983 --- /dev/null +++ b/COPYING @@ -0,0 +1,306 @@ + U-Boot is Free Software. It is copyrighted by Wolfgang Denk and +many others who contributed code (see the actual source code for +details). You can redistribute U-Boot and/or modify it under the +terms of version 2 of the GNU General Public License as published by +the Free Software Foundation. Most of it can also be distributed, +at your option, under any later version of the GNU General Public +License -- see individual files for exceptions. + + NOTE! This license does *not* cover the so-called "standalone" +applications that use U-Boot services by means of the jump table +provided by U-Boot exactly for this purpose - this is merely +considered normal use of U-Boot, and does *not* fall under the +heading of "derived work". + + The header files "include/image.h" and "include/asm-*/u-boot.h" +define interfaces to U-Boot. Including these (unmodified) header +files in another file is considered normal use of U-Boot, and does +*not* fall under the heading of "derived work". + + Also note that the GPL below is copyrighted by the Free Software +Foundation, but the instance of code that it refers to (the U-Boot +source code) is copyrighted by me and others who actually wrote it. +-- Wolfgang Denk + +======================================================================= + + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS -- 1.7.9.5 ./0001-After-RCN-Patch.patch0000664000175000017500000002367512511507071015566 0ustar nielsenrnielsenrFrom 8b969893fa7ed8e087cd8b9011d5501beaba3326 Mon Sep 17 00:00:00 2001 From: Ralf Nielsen Date: Fri, 5 Sep 2014 11:55:02 +0200 Subject: [PATCH 1/6] After RCN Patch --- include/configs/am335x_evm.h | 208 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 189 insertions(+), 19 deletions(-) diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h index a48b386..03e81ce 100644 --- a/include/configs/am335x_evm.h +++ b/include/configs/am335x_evm.h @@ -17,6 +17,7 @@ #define __CONFIG_AM335X_EVM_H #include +#define CONFIG_SUPPORT_RAW_INITRD #ifndef CONFIG_SPL_BUILD # define CONFIG_FIT @@ -79,7 +80,8 @@ DEFAULT_LINUX_BOOT_ENV \ "boot_fdt=try\0" \ "bootpart=0:2\0" \ - "bootdir=/boot\0" \ + "bootdir=\0" \ + "fdtdir=/dtbs\0" \ "bootfile=zImage\0" \ "fdtfile=undefined\0" \ "console=ttyO0,115200n8\0" \ @@ -87,9 +89,13 @@ "uuid_disk=${uuid_gpt_disk};" \ "name=rootfs,start=2MiB,size=-,uuid=${uuid_gpt_rootfs}\0" \ "optargs=\0" \ + "cape_disable=\0" \ + "cape_enable=\0" \ + "cmdline=\0" \ "mmcdev=0\0" \ + "mmcpart=1\0" \ "mmcroot=/dev/mmcblk0p2 ro\0" \ - "mmcrootfstype=ext4 rootwait\0" \ + "mmcrootfstype=ext4 rootwait fixrtc\0" \ "rootpath=/export/rootfs\0" \ "nfsopts=nolock\0" \ "static_ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}" \ @@ -98,8 +104,29 @@ "ramrootfstype=ext2\0" \ "mmcargs=setenv bootargs console=${console} " \ "${optargs} " \ + "${cape_disable} " \ + "${cape_enable} " \ "root=${mmcroot} " \ - "rootfstype=${mmcrootfstype}\0" \ + "rootfstype=${mmcrootfstype} " \ + "${cmdline}\0" \ + "server_ip=192.168.1.100\0" \ + "gw_ip=192.168.1.1\0" \ + "netmask=255.255.255.0\0" \ + "hostname=\0" \ + "device=eth0\0" \ + "autoconf=off\0" \ + "root_dir=/home/userid/targetNFS\0" \ + "nfs_options=,vers=3\0" \ + "nfsrootfstype=ext4 rootwait fixrtc\0" \ + "nfsargs=setenv bootargs console=${console} " \ + "${optargs} " \ + "${cape_disable} " \ + "${cape_enable} " \ + "root=/dev/nfs rw " \ + "rootfstype=${nfsrootfstype} " \ + "nfsroot=${nfsroot} " \ + "ip=${ip} " \ + "${cmdline}\0" \ "spiroot=/dev/mtdblock4 rw\0" \ "spirootfstype=jffs2\0" \ "spisrcaddr=0xe0000\0" \ @@ -115,7 +142,7 @@ "nfsroot=${serverip}:${rootpath},${nfsopts} rw " \ "ip=dhcp\0" \ "bootenv=uEnv.txt\0" \ - "loadbootenv=load mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \ + "loadbootenv=load mmc ${bootpart} ${loadaddr} ${bootenv}\0" \ "importbootenv=echo Importing environment from mmc ...; " \ "env import -t $loadaddr $filesize\0" \ "ramargs=setenv bootargs console=${console} " \ @@ -124,7 +151,14 @@ "rootfstype=${ramrootfstype}\0" \ "loadramdisk=load mmc ${mmcdev} ${rdaddr} ramdisk.gz\0" \ "loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \ - "loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \ + "loadrd=load mmc ${bootpart} ${rdaddr} ${bootdir}/${rdfile}; setenv rdsize ${filesize}\0" \ + "loadfdt=echo loading ${fdtdir}/${fdtfile} ...; load mmc ${bootpart} ${fdtaddr} ${fdtdir}/${fdtfile}\0" \ + "script=boot.scr\0" \ + "scriptfile=${script}\0" \ + "loadbootscript=" \ + "load mmc ${bootpart} ${loadaddr} ${scriptfile};\0" \ + "bootscript=echo Running bootscript from mmc ...; " \ + "source ${loadaddr}\0" \ "mmcloados=run mmcargs; " \ "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ "if run loadfdt; then " \ @@ -141,18 +175,79 @@ "fi;\0" \ "mmcboot=mmc dev ${mmcdev}; " \ "if mmc rescan; then " \ + "gpio set 54;" \ "echo SD/MMC found on device ${mmcdev};" \ - "if run loadbootenv; then " \ - "echo Loaded environment from ${bootenv};" \ - "run importbootenv;" \ - "fi;" \ - "if test -n $uenvcmd; then " \ - "echo Running uenvcmd ...;" \ - "run uenvcmd;" \ - "fi;" \ - "if run loadimage; then " \ - "run mmcloados;" \ - "fi;" \ + "setenv bootpart ${mmcdev}:1; " \ + "echo Checking for: /uEnv.txt ...;" \ + "if test -e mmc ${bootpart} /uEnv.txt; then " \ + "if run loadbootenv; then " \ + "gpio set 55;" \ + "echo Loaded environment from ${bootenv};" \ + "run importbootenv;" \ + "fi;" \ + "if test -n ${cape}; then " \ + "if test -e mmc ${bootpart} ${fdtdir}/${fdtbase}-${cape}.dtb; then " \ + "setenv fdtfile ${fdtbase}-${cape}.dtb; " \ + "fi; " \ + "echo using: $fdtfile...; " \ + "fi; " \ + "echo Checking if uenvcmd is set ...;" \ + "if test -n ${uenvcmd}; then " \ + "gpio set 56; " \ + "echo Running uenvcmd ...;" \ + "run uenvcmd;" \ + "fi;" \ + "echo Checking if client_ip is set ...;" \ + "if test -n ${client_ip}; then " \ + "if test -n ${dtb}; then " \ + "setenv fdtfile ${dtb};" \ + "echo using ${fdtfile} ...;" \ + "fi;" \ + "gpio set 56; " \ + "echo Running nfsboot ...;" \ + "run nfsboot;" \ + "fi;" \ + "fi; " \ + "echo Checking for: /${script} ...;" \ + "if test -e mmc ${bootpart} /${script}; then " \ + "gpio set 55;" \ + "setenv scriptfile ${script};" \ + "run loadbootscript;" \ + "echo Loaded script from ${scriptfile};" \ + "gpio set 56; " \ + "run bootscript;" \ + "fi; " \ + "echo Checking for: /boot/${script} ...;" \ + "if test -e mmc ${bootpart} /boot/${script}; then " \ + "gpio set 55;" \ + "setenv scriptfile /boot/${script};" \ + "run loadbootscript;" \ + "echo Loaded script from ${scriptfile};" \ + "gpio set 56; " \ + "run bootscript;" \ + "fi; " \ + "echo Checking for: /boot/uEnv.txt ...;" \ + "for i in 1 2 3 4 5 6 7 ; do " \ + "setenv mmcpart ${i};" \ + "setenv bootpart ${mmcdev}:${mmcpart};" \ + "if test -e mmc ${bootpart} /boot/uEnv.txt; then " \ + "gpio set 55;" \ + "load mmc ${bootpart} ${loadaddr} /boot/uEnv.txt;" \ + "env import -t ${loadaddr} ${filesize};" \ + "echo Loaded environment from /boot/uEnv.txt;" \ + "if test -n ${dtb}; then " \ + "setenv fdtfile ${dtb};" \ + "echo Using: dtb=${fdtfile} ...;" \ + "fi;" \ + "echo Checking if uname_r is set in /boot/uEnv.txt...;" \ + "if test -n ${uname_r}; then " \ + "gpio set 56; " \ + "echo Running uname_boot ...;" \ + "setenv mmcroot /dev/mmcblk${mmcdev}p${mmcpart} ro;" \ + "run uname_boot;" \ + "fi;" \ + "fi;" \ + "done;" \ "fi;\0" \ "spiboot=echo Booting from spi ...; " \ "run spiargs; " \ @@ -166,29 +261,104 @@ "tftp ${fdtaddr} ${fdtfile}; " \ "run netargs; " \ "bootz ${loadaddr} - ${fdtaddr}\0" \ + "nfsboot=echo Booting from ${server_ip} ...; " \ + "setenv nfsroot ${server_ip}:${root_dir}${nfs_options}; " \ + "setenv ip ${client_ip}:${server_ip}:${gw_ip}:${netmask}:${hostname}:${device}:${autoconf}; " \ + "setenv autoload no; " \ + "setenv serverip ${server_ip}; " \ + "setenv ipaddr ${client_ip}; " \ + "tftp ${loadaddr} ${bootfile}; " \ + "tftp ${fdtaddr} dtbs/${fdtfile}; " \ + "run nfsargs; " \ + "bootz ${loadaddr} - ${fdtaddr}\0" \ "ramboot=echo Booting from ramdisk ...; " \ "run ramargs; " \ "bootz ${loadaddr} ${rdaddr} ${fdtaddr}\0" \ "findfdt="\ "if test $board_name = A335BONE; then " \ - "setenv fdtfile am335x-bone.dtb; fi; " \ + "setenv fdtfile am335x-bone.dtb; setenv fdtbase am335x-bone; fi; " \ "if test $board_name = A335BNLT; then " \ - "setenv fdtfile am335x-boneblack.dtb; fi; " \ + "setenv fdtfile am335x-boneblack.dtb; setenv fdtbase am335x-boneblack; fi; " \ "if test $board_name = A33515BB; then " \ "setenv fdtfile am335x-evm.dtb; fi; " \ "if test $board_name = A335X_SK; then " \ "setenv fdtfile am335x-evmsk.dtb; fi; " \ "if test $fdtfile = undefined; then " \ "echo WARNING: Could not determine device tree to use; fi; \0" \ + "uname_boot="\ + "setenv bootdir /boot; " \ + "setenv bootfile vmlinuz-${uname_r}; " \ + "if test -e mmc ${bootpart} ${bootdir}/${bootfile}; then " \ + "echo loading ${bootdir}/${bootfile} ...; "\ + "run loadimage;" \ + "setenv fdtdir /boot/dtbs/${uname_r}; " \ + "if test -e mmc ${bootpart} ${fdtdir}/${fdtfile}; then " \ + "run loadfdt;" \ + "else " \ + "setenv fdtdir /usr/lib/linux-image-${uname_r}; " \ + "if test -e mmc ${bootpart} ${fdtdir}/${fdtfile}; then " \ + "run loadfdt;" \ + "else " \ + "setenv fdtdir /lib/firmware/${uname_r}/device-tree; " \ + "if test -e mmc ${bootpart} ${fdtdir}/${fdtfile}; then " \ + "run loadfdt;" \ + "else " \ + "setenv fdtdir /boot/dtb-${uname_r}; " \ + "if test -e mmc ${bootpart} ${fdtdir}/${fdtfile}; then " \ + "run loadfdt;" \ + "else " \ + "setenv fdtdir /boot/dtbs; " \ + "if test -e mmc ${bootpart} ${fdtdir}/${fdtfile}; then " \ + "run loadfdt;" \ + "else " \ + "setenv fdtdir /boot/dtb; " \ + "if test -e mmc ${bootpart} ${fdtdir}/${fdtfile}; then " \ + "run loadfdt;" \ + "else " \ + "setenv fdtdir /boot; " \ + "if test -e mmc ${bootpart} ${fdtdir}/${fdtfile}; then " \ + "run loadfdt;" \ + "else " \ + "echo; echo unable to find ${fdtfile} ...; echo booting legacy ...;"\ + "run mmcargs;" \ + "bootz ${loadaddr}; " \ + "fi;" \ + "fi;" \ + "fi;" \ + "fi;" \ + "fi;" \ + "fi;" \ + "fi; " \ + "setenv rdfile initrd.img-${uname_r}; " \ + "if test -e mmc ${bootpart} ${bootdir}/${rdfile}; then " \ + "echo loading ${bootdir}/${rdfile} ...; "\ + "run loadrd;" \ + "if test -n ${uuid}; then " \ + "setenv mmcroot UUID=${uuid} ro;" \ + "fi;" \ + "run mmcargs;" \ + "bootz ${loadaddr} ${rdaddr}:${rdsize} ${fdtaddr}; " \ + "else " \ + "run mmcargs;" \ + "bootz ${loadaddr} - ${fdtaddr}; " \ + "fi;" \ + "fi;\0" \ NANDARGS \ DFUARGS #endif #define CONFIG_BOOTCOMMAND \ + "gpio set 53; " \ + "i2c mw 0x24 1 0x3e; " \ "run findfdt; " \ + "setenv mmcdev 0; " \ + "setenv bootpart 0:1; " \ "run mmcboot;" \ + "gpio clear 56; " \ + "gpio clear 55; " \ + "gpio clear 54; " \ "setenv mmcdev 1; " \ - "setenv bootpart 1:2; " \ + "setenv bootpart 1:1; " \ "run mmcboot;" \ "run nandboot;" -- 1.7.9.5 ./0009-Switch-power-LED-on.patch0000664000175000017500000000131012511507072016446 0ustar nielsenrnielsenrFrom 20a03e94a8c96be38b2253474fde212b3c8cd76c Mon Sep 17 00:00:00 2001 From: Ralf Nielsen Date: Thu, 30 Oct 2014 09:37:08 +0100 Subject: [PATCH] Switch power LED on --- arch/arm/lib/board.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c index 22e9d7d..2ed242e 100644 --- a/arch/arm/lib/board.c +++ b/arch/arm/lib/board.c @@ -552,6 +552,10 @@ void board_init_r(gd_t *id, ulong dest_addr) #endif power_init_board(); stdio_init(); /* get the devices list going. */ + // Switch LED on Power Buttonon + set_gpio(40, 0); // White + //set_gpio(41, 0); // Green + #if !defined(CONFIG_SYS_NO_FLASH) puts("Flash: "); -- 1.7.9.5 ./0006-Center-the-LOGO.patch0000664000175000017500000000134412511507072015577 0ustar nielsenrnielsenrFrom 89d993c725901cbc915f2737ab89f8ab8a09bfc2 Mon Sep 17 00:00:00 2001 From: Ralf Nielsen Date: Mon, 8 Sep 2014 09:01:25 +0200 Subject: [PATCH 6/6] Center the LOGO --- include/configs/am335x_evm.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h index 2c2e632..5aff203 100644 --- a/include/configs/am335x_evm.h +++ b/include/configs/am335x_evm.h @@ -115,7 +115,8 @@ "hostname=\0" \ "device=eth0\0" \ "autoconf=off\0" \ - "splashimage=88000000\0" \ + "splashimage=88000000\0" \ + "splashpos=m,m\0" \ "root_dir=/home/userid/targetNFS\0" \ "nfs_options=,vers=3\0" \ "nfsrootfstype=ext4 rootwait fixrtc\0" \ -- 1.7.9.5 ./0017-boot-dev-is-always-0.patch0000664000175000017500000000424012527325627016641 0ustar nielsenrnielsenrFrom 0a7373ed69ee346f8a79910404176439690787a8 Mon Sep 17 00:00:00 2001 From: Ralf Nielsen Date: Thu, 21 May 2015 11:54:35 +0200 Subject: [PATCH 3/3] boot dev is always 0 --- include/configs/am335x_evm.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h index 0c1a2db..22a1d97 100644 --- a/include/configs/am335x_evm.h +++ b/include/configs/am335x_evm.h @@ -259,7 +259,8 @@ "if test -n ${uname_r}; then " \ "gpio set 56; " \ "echo bootonce - running uname_boot ...;" \ - "setenv mmcroot /dev/mmcblk${mmcdev}p${mmcpart} ro;" \ + "setenv mmcroot /dev/mmcblk0p${mmcpart} ro;" \ + "echo rotfs on ${mmcroot}; " \ "run uname_boot;" \ "fi;" \ "fi;" \ @@ -287,7 +288,8 @@ "if test -n ${uname_r}; then " \ "gpio set 56; " \ "echo Running uname_boot ...;" \ - "setenv mmcroot /dev/mmcblk${mmcdev}p${mmcpart} ro;" \ + "setenv mmcroot /dev/mmcblk0p${mmcpart} ro;" \ + "echo rotfs on ${mmcroot}; " \ "run uname_boot;" \ "fi;" \ "fi;" \ @@ -333,6 +335,7 @@ "if test $fdtfile = undefined; then " \ "echo WARNING: Could not determine device tree to use; fi; \0" \ "uname_boot="\ + "echo rootfs ${mmcroot}; " \ "setenv bootdir /boot; " \ "setenv bootfile vmlinuz-${uname_r}; " \ "if test -e mmc ${bootpart} ${bootdir}/${bootfile}; then " \ @@ -368,6 +371,7 @@ "else " \ "echo; echo unable to find ${fdtfile} ...; echo booting legacy ...;"\ "run mmcargs;" \ + "echo args ${mmcargs}; " \ "bootz ${loadaddr}; " \ "fi;" \ "fi;" \ @@ -384,11 +388,12 @@ "setenv mmcroot UUID=${uuid} ro;" \ "fi;" \ "run mmcargs;" \ + "echo args ${mmcargs}; " \ "bootz ${loadaddr} ${rdaddr}:${rdsize} ${fdtaddr}; " \ "else " \ - "echo mmcroot set to dev0; "\ - "setenv mmcroot /dev/mmcblk0p2 ro;" \ + "echo start Kernel now; "\ "run mmcargs;" \ + "echo args ${mmcargs}; " \ "bootz ${loadaddr} - ${fdtaddr}; " \ "fi;" \ "fi;\0" \ -- 2.4.1 ./0002-seca-board-enable.patch0000664000175000017500000000340512511507071016262 0ustar nielsenrnielsenrFrom 78daac15c156030b1e6daa7496260b08f5417bb1 Mon Sep 17 00:00:00 2001 From: Ralf Nielsen Date: Mon, 8 Sep 2014 08:06:47 +0200 Subject: [PATCH 2/6] seca board enable --- board/ti/am335x/board.h | 7 ++++++- include/configs/am335x_evm.h | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/board/ti/am335x/board.h b/board/ti/am335x/board.h index bc700d5..c99e725 100644 --- a/board/ti/am335x/board.h +++ b/board/ti/am335x/board.h @@ -29,6 +29,11 @@ struct am335x_baseboard_id { char mac_addr[HDR_NO_OF_MAC_ADDR][HDR_ETH_ALEN]; }; +static inline int board_is_bone_seca(struct am335x_baseboard_id *header) +{ + return !strncmp(header->name, "A335BNLT", HDR_NAME_LEN); +} + static inline int board_is_bone(struct am335x_baseboard_id *header) { return !strncmp(header->name, "A335BONE", HDR_NAME_LEN); @@ -36,7 +41,7 @@ static inline int board_is_bone(struct am335x_baseboard_id *header) static inline int board_is_bone_lt(struct am335x_baseboard_id *header) { - return !strncmp(header->name, "A335BNLT", HDR_NAME_LEN); + return !strncmp(header->name, "A335SECA", HDR_NAME_LEN); } static inline int board_is_evm_sk(struct am335x_baseboard_id *header) diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h index 03e81ce..a4f2aca 100644 --- a/include/configs/am335x_evm.h +++ b/include/configs/am335x_evm.h @@ -275,6 +275,8 @@ "run ramargs; " \ "bootz ${loadaddr} ${rdaddr} ${fdtaddr}\0" \ "findfdt="\ + "if test $board_name = A335SECA; then " \ + "setenv fdtfile am335x-boneblack.dtb; setenv fdtbase am335x-boneblack; fi; " \ "if test $board_name = A335BONE; then " \ "setenv fdtfile am335x-bone.dtb; setenv fdtbase am335x-bone; fi; " \ "if test $board_name = A335BNLT; then " \ -- 1.7.9.5 ./0019-reset-system-after-uncompletet-boot.patch0000664000175000017500000000220712571767710022124 0ustar nielsenrnielsenrFrom 57ecfec4910df87f5b0298079c86964aa3911017 Mon Sep 17 00:00:00 2001 From: Ralf Nielsen Date: Thu, 3 Sep 2015 08:59:07 +0200 Subject: [PATCH] reset system after uncompletet boot --- include/configs/am335x_evm.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h index 22a1d97..88f238d 100644 --- a/include/configs/am335x_evm.h +++ b/include/configs/am335x_evm.h @@ -175,6 +175,11 @@ "else " \ "bootz; " \ "fi;\0" \ + "reboot=echo Not able to start rebooting system ...; " \ + "gpio set 40; " \ + "gpio clear 41; " \ + "print;" \ + "reset;\0" \ "mmcboot=mmc dev ${mmcdev}; " \ "if mmc rescan; then " \ "gpio set 54;" \ @@ -402,6 +407,8 @@ #endif #define CONFIG_BOOTCOMMAND \ + "gpio clear 40; " \ + "gpio set 41; " \ "gpio clear 53; " \ "gpio clear 54; " \ "gpio clear 55; " \ @@ -415,7 +422,7 @@ "setenv mmcdev 1; " \ "setenv bootpart 1:1; " \ "run mmcboot;" \ - "run nandboot;" + "run reboot;" /* NS16550 Configuration */ #define CONFIG_SYS_NS16550_COM1 0x44e09000 /* Base EVM has UART0 */ -- 2.5.1 ./0015-bootonce-eingebaut.patch0000664000175000017500000000513112527325627016625 0ustar nielsenrnielsenrFrom dfe668fe66e4a4d9a5fd526caf179418183376bb Mon Sep 17 00:00:00 2001 From: Ralf Nielsen Date: Fri, 24 Apr 2015 08:40:17 +0200 Subject: [PATCH 1/3] bootonce eingebaut --- include/configs/am335x_evm.h | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h index 3577a45..4e539df 100644 --- a/include/configs/am335x_evm.h +++ b/include/configs/am335x_evm.h @@ -228,13 +228,50 @@ "gpio set 56; " \ "run bootscript;" \ "fi; " \ - "echo Checking for: /boot/uEnv.txt ...;" \ + "echo Checking for: /bootonce.txt entry ...;" \ + "if test -e mmc ${bootpart} /bootonce.txt; then " \ + "load mmc ${bootpart} ${loadaddr} /bootonce.txt;" \ + "echo Read bytes: ${filesize} ...;" \ + "if itest ${filesize} -gt 9; then " \ + "env import -t ${loadaddr} ${filesize};" \ + "echo Loaded environment from /bootonce.txt;" \ + "echo bootpartition is ${bootonce} ...;" \ + "echo set bootonce.txt to empty ...;" \ + "mw.b ${loadaddr} 0x0a;" \ + "fatwrite mmc ${bootpart} ${loadaddr} bootonce.txt 1;" \ + "for i in 2 3; do " \ + "if itest -e ${bootonce} -eq ${i}; then " \ + "setenv bootpart ${mmcdev}:${bootonce};" \ + "echo Loading Kernel from ${mmcdev}:${bootonce};" \ + "echo Checking for: /boot/uEnv.txt ...;" \ + "if test -e mmc ${bootpart} /boot/uEnv.txt; then " \ + "gpio set 55;" \ + "load mmc ${bootpart} ${loadaddr} /boot/uEnv.txt;" \ + "env import -t ${loadaddr} ${filesize};" \ + "echo Loaded environment from /boot/uEnv.txt;" \ + "if test -n ${dtb}; then " \ + "setenv fdtfile ${dtb};" \ + "echo Using: dtb=${fdtfile} ...;" \ + "fi;" \ + "echo Checking if uname_r is set in /boot/uEnv.txt...;" \ + "if test -n ${uname_r}; then " \ + "gpio set 56; " \ + "echo Running uname_boot ...;" \ + "setenv mmcroot /dev/mmcblk${mmcdev}p${mmcpart} ro;" \ + "run uname_boot;" \ + "fi;" \ + "fi;" \ + "fi;" \ + "done;" \ + "fi; " \ + "fi; " \ "for i in 2 3; do " \ "setenv mmcpart ${i};" \ "setenv bootpart ${mmcdev}:${mmcpart};" \ "echo Checking for Aktive Partition ...;" \ "if test -e mmc ${bootpart} /boot/Bootselected; then " \ "echo Loading Kernel from ${mmcdev}:${mmcpart};" \ + "echo Checking for: /boot/uEnv.txt ...;" \ "if test -e mmc ${bootpart} /boot/uEnv.txt; then " \ "gpio set 55;" \ "load mmc ${bootpart} ${loadaddr} /boot/uEnv.txt;" \ -- 2.4.1 ./0013-Enable-Spread-spectrum-for-pll.patch0000664000175000017500000000230412511507072020651 0ustar nielsenrnielsenrFrom f78cc9c5330d8f4648417716e151fbbb79b92e66 Mon Sep 17 00:00:00 2001 From: Ralf Nielsen Date: Wed, 14 Jan 2015 08:05:12 +0100 Subject: [PATCH] Enable Spread spectrum for pll --- board/ti/am335x/board.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c index 6febb62..7c7c40c 100644 --- a/board/ti/am335x/board.c +++ b/board/ti/am335x/board.c @@ -695,11 +695,18 @@ void sdram_init(void) } #endif + +#define DISPL_PLL_SPREAD_SPECTRUM + /* * Basic board specific setup. Pinmux has been handled already. */ int board_init(void) { +#if defined(DISPL_PLL_SPREAD_SPECTRUM) + struct cm_wkuppll *cmwkup = (struct cm_wkuppll *)CM_WKUP; +#endif + printf ("board_init\n"); // Switch LED on Power Buttonon set_gpio(40, 0); // White @@ -718,6 +725,15 @@ int board_init(void) board_video_init(); #endif + +#if defined(DISPL_PLL_SPREAD_SPECTRUM) + printf ("Enable Spread Spectrum\n"); + writel(0x30, &cmwkup->resv6[3]); /* 0x50 */ + writel(0x100, &cmwkup->resv6[2]); /* 0x4c */ + writel(readl(&cmwkup->clkmoddplldisp) | (1 << 12), + &cmwkup->clkmoddplldisp); /* 0x98 */ +#endif + return 0; } -- 2.2.1 ./0018-Write-magic-automaticaly.patch0000664000175000017500000001132012551402246017704 0ustar nielsenrnielsenrFrom 693e0ba205b30cda5d4c067799acf9f911c7f556 Mon Sep 17 00:00:00 2001 From: Ralf Nielsen Date: Wed, 15 Jul 2015 08:58:37 +0200 Subject: [PATCH] Write magic automaticaly --- board/ti/am335x/board.c | 2 ++ board/ti/am335x/board.h | 1 + board/ti/am335x/mux.c | 87 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 90 insertions(+) diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c index 38f2e22..b7f8176 100644 --- a/board/ti/am335x/board.c +++ b/board/ti/am335x/board.c @@ -222,6 +222,7 @@ static struct ctrl_dev *cdev = (struct ctrl_dev *)CTRL_DEVICE_BASE; */ static int read_eeprom(struct am335x_baseboard_id *header) { + header->magicvalid = 1; /* Check if baseboard eeprom is available */ if (i2c_probe(CONFIG_SYS_I2C_EEPROM_ADDR)) { puts("Could not probe the EEPROM; something fundamentally " @@ -250,6 +251,7 @@ static int read_eeprom(struct am335x_baseboard_id *header) header->name[7] = 'A'; printf("Set magic number to 0xEE3355AA\n"); printf("Set magic name to 0xA335SECA\n"); + header->magicvalid = 0; } if (header->magic != 0xEE3355AA) { diff --git a/board/ti/am335x/board.h b/board/ti/am335x/board.h index 8cb9eb0..44245cd 100644 --- a/board/ti/am335x/board.h +++ b/board/ti/am335x/board.h @@ -27,6 +27,7 @@ struct am335x_baseboard_id { char serial[12]; char config[32]; char mac_addr[HDR_NO_OF_MAC_ADDR][HDR_ETH_ALEN]; + unsigned int magicvalid; }; static inline int board_is_bone(struct am335x_baseboard_id *header) diff --git a/board/ti/am335x/mux.c b/board/ti/am335x/mux.c index 33af913..d144139 100644 --- a/board/ti/am335x/mux.c +++ b/board/ti/am335x/mux.c @@ -18,9 +18,12 @@ #include #include #include +#include #include #include "board.h" +static void writeMagic(void); + static struct module_pin_mux uart0_pin_mux[] = { {OFFSET(uart0_rxd), (MODE(0) | PULLUP_EN | RXACTIVE)}, /* UART0_RXD */ {OFFSET(uart0_txd), (MODE(0) | PULLUDEN)}, /* UART0_TXD */ @@ -283,6 +286,83 @@ void enable_norboot_pin_mux(void) } #endif +static int set_gpio(int gpio, int state) +{ + gpio_request(gpio, "temp"); + gpio_direction_output(gpio, state); + gpio_set_value(gpio, state); + gpio_free(gpio); + return 0; +} + +static unsigned int magic = 0xEE3355AA; +static int magicAddr = 0; +static char name[9] = "A335SECA"; +static int nameAddr = 4; +static char version[5] = "0001"; +static int versionAddr = 12; +static char date[5] = "4813"; +static int dateAddr = 16; +static char sign[9] = "TEMB0001"; +static int signAddr = 20; + +static void writeMagic () +{ + int num = 0; + char rbchar[20]; + + unsigned int rbint; + + if (num==0 || num==1) + { + i2c_write(CONFIG_SYS_I2C_EEPROM_ADDR, magicAddr, CONFIG_SYS_I2C_EEPROM_ADDR_LEN, (uchar *)&magic, 4); + printf("Magic Num: 0x%08x\t",magic); + udelay(11000); + i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR, magicAddr, CONFIG_SYS_I2C_EEPROM_ADDR_LEN, (uchar *)&rbint, 4); + printf("Readback : 0x%08x\n",(unsigned int)rbint); + } + + if (num==0 || num==2) + { + i2c_write(CONFIG_SYS_I2C_EEPROM_ADDR, nameAddr, CONFIG_SYS_I2C_EEPROM_ADDR_LEN, (uchar *)name, 8); + printf("Board ID : %s \t", name); + udelay(11000); + i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR, nameAddr, CONFIG_SYS_I2C_EEPROM_ADDR_LEN, (uchar *)rbchar, 8); + rbchar[8] = '\0'; + printf("Readback : %s\n",rbchar); + } + + if (num==0 || num==3) + { + i2c_write(CONFIG_SYS_I2C_EEPROM_ADDR, versionAddr, CONFIG_SYS_I2C_EEPROM_ADDR_LEN, (uchar *)version, 4); + printf("Version : %s \t", version); + udelay(11000); + i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR, versionAddr, CONFIG_SYS_I2C_EEPROM_ADDR_LEN, (uchar *)rbchar, 4); + rbchar[4] = '\0'; + printf("Readback : %s\n",rbchar); + } + + if (num==0 || num==4) + { + i2c_write(CONFIG_SYS_I2C_EEPROM_ADDR, dateAddr, CONFIG_SYS_I2C_EEPROM_ADDR_LEN, (uchar *)date, 4); + printf("Date WWYY: %s \t", date); + udelay(11000); + i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR, dateAddr, CONFIG_SYS_I2C_EEPROM_ADDR_LEN, (uchar *)rbchar, 4); + rbchar[4] = '\0'; + printf("Readback : %s\n",rbchar); + } + + if (num==0 || num==5) + { + i2c_write(CONFIG_SYS_I2C_EEPROM_ADDR, signAddr, CONFIG_SYS_I2C_EEPROM_ADDR_LEN, (uchar *)sign, 8); + printf("Sign : %s \t", sign); + udelay(11000); + i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR, signAddr, CONFIG_SYS_I2C_EEPROM_ADDR_LEN, (uchar *)rbchar, 8); + rbchar[8] = '\0'; + printf("Readback : %s\n",rbchar); + } +} + void enable_uart0_pin_mux(void) { configure_module_pin_mux(uart0_pin_mux); @@ -411,4 +491,11 @@ void enable_board_pin_mux(struct am335x_baseboard_id *header) puts("Unknown board\n"); hang(); } + + if (header->magicvalid == 0) + { + set_gpio(23, 0); + writeMagic (); + set_gpio(23, 1); + } } -- 2.4.5 ./0005-Bootscreen.patch0000664000175000017500000001103512511507072015143 0ustar nielsenrnielsenrFrom b16bf13b1aba888ba8be496f08858c12928b1ad4 Mon Sep 17 00:00:00 2001 From: Ralf Nielsen Date: Mon, 8 Sep 2014 08:13:16 +0200 Subject: [PATCH 5/6] Bootscreen --- drivers/video/cfb_console.c | 8 -------- drivers/video/da8xx-fb.c | 6 +----- include/configs/am335x_evm.h | 13 +++++-------- tools/Makefile | 2 +- 4 files changed, 7 insertions(+), 22 deletions(-) diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c index 75efaaa..c11251e 100644 --- a/drivers/video/cfb_console.c +++ b/drivers/video/cfb_console.c @@ -1900,7 +1900,6 @@ static void plot_logo_or_black(void *screen, int width, int x, int y, int black) logo_green = linux_logo_green; logo_blue = linux_logo_blue; #endif - printf ("VIDEO_DATA_FORMAT: 0x%x\n", VIDEO_DATA_FORMAT); if (VIDEO_DATA_FORMAT == GDF__8BIT_INDEX) { for (i = 0; i < VIDEO_LOGO_COLORS; i++) { video_set_lut(i + VIDEO_LOGO_LUT_OFFSET, @@ -1914,10 +1913,7 @@ static void plot_logo_or_black(void *screen, int width, int x, int y, int black) int xpos = x; #endif xcount = VIDEO_LOGO_WIDTH; - //printf ("VIDEO_DATA_FORMAT - ycount\n"); while (xcount--) { - //printf ("VIDEO_DATA_FORMAT - xcount\n"); - if (black) { r = 0x00; g = 0x00; @@ -1927,7 +1923,6 @@ static void plot_logo_or_black(void *screen, int width, int x, int y, int black) g = logo_green[*source - VIDEO_LOGO_LUT_OFFSET]; b = logo_blue[*source - VIDEO_LOGO_LUT_OFFSET]; } - //printf ("VIDEO_DATA_FORMAT: 0x%x\n", VIDEO_DATA_FORMAT); switch (VIDEO_DATA_FORMAT) { case GDF__8BIT_INDEX: *dest = *source; @@ -1984,7 +1979,6 @@ static void plot_logo_or_black(void *screen, int width, int x, int y, int black) free(logo_green); free(logo_blue); #endif - printf ("plot_logo_or_black - END \n"); } static void *video_logo(void) @@ -1997,11 +1991,9 @@ static void *video_logo(void) splash_get_pos(&video_logo_xpos, &video_logo_ypos); - printf("video_logo\n"); #ifdef CONFIG_SPLASH_SCREEN s = getenv("splashimage"); if (s != NULL) { - printf("video_logo - splash s: 0x%s\n",s); splash_screen_prepare(); addr = simple_strtoul(s, NULL, 16); diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c index 0c4153b..8d4223b 100644 --- a/drivers/video/da8xx-fb.c +++ b/drivers/video/da8xx-fb.c @@ -157,14 +157,11 @@ const struct lcd_ctrl_config *da8xx_lcd_cfg; static inline unsigned int lcdc_read(u32 *addr) { - unsigned int tmp = (unsigned int)readl(addr); - //printf ("lcdc_read addr: 0x%p, value: 0x%x\n", addr, tmp); - return tmp; + return (unsigned int)readl(addr); } static inline void lcdc_write(unsigned int val, u32 *addr) { - //printf ("lcdc_write addr: 0x%p, value: 0x%x\n", addr, val); writel(val, addr); } @@ -729,7 +726,6 @@ static int lcd_init(struct da8xx_fb_par *par, const struct lcd_ctrl_config *cfg, static void lcdc_dma_start(void) { - printf ("lcdc_dma_start\n"); struct da8xx_fb_par *par = da8xx_fb_info->par; lcdc_write(par->dma_start, &da8xx_fb_reg_base->dma_frm_buf_base_addr_0); diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h index f40744e..2c2e632 100644 --- a/include/configs/am335x_evm.h +++ b/include/configs/am335x_evm.h @@ -385,28 +385,25 @@ #define CONFIG_POWER_TPS65910 /* Video support */ -//#define CONFIG_VIDEO -#if defined(CONFIG_VIDEO) +#define CONFIG_VIDEO +#ifdef CONFIG_VIDEO #define CONFIG_VIDEO_DA8XX #define CONFIG_CFB_CONSOLE #define CONFIG_VGA_AS_SINGLE_DEVICE -#define CONFIG_SPLASH_SCREEN -#define CONFIG_SPLASH_SCREEN_ALIGN #define CONFIG_VIDEO_LOGO #define CONFIG_VIDEO_BMP_RLE8 #define CONFIG_VIDEO_BMP_GZIP #define CONFIG_VIDEO_BMP_LOGO +#define CONFIG_SPLASH_SCREEN_ALIGN #define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE (800*480 + 256*4 + 10*1024) #define CONFIG_CMD_BMP -#define CONFIG_BMP_16BPP #define DA8XX_LCD_CNTL_BASE LCD_CNTL_BASE #define PWM_TICKS 0x1388 #define PWM_DUTY 0x200 -#define CONFIG_SYS_CONSOLE_BG_COL 0xff -#define CONFIG_SYS_CONSOLE_FG_COL 0x00 +#define CONFIG_SYS_CONSOLE_BG_COL 0x00 +#define CONFIG_SYS_CONSOLE_FG_COL 0xff #endif - /* SPL */ #ifndef CONFIG_NOR_BOOT #define CONFIG_SPL_POWER_SUPPORT diff --git a/tools/Makefile b/tools/Makefile index 61b2048..c0379cb 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -174,7 +174,7 @@ LOGO-$(CONFIG_VIDEO_LOGO) += $(LOGO_DATA_H) # Generic logo ifeq ($(LOGO_BMP),) -LOGO_BMP= $(srctree)/$(src)/logos/denx.bmp +LOGO_BMP= $(srctree)/$(src)/../../startscreen.bmp # Use board logo and fallback to vendor ifneq ($(wildcard $(srctree)/$(src)/logos/$(BOARD).bmp),) -- 1.7.9.5 ./0012-load-image-from-fat.patch0000664000175000017500000000126512511411161016543 0ustar nielsenrnielsenrFrom 14a38c00a0ec3222abed331b39a50696aea3261b Mon Sep 17 00:00:00 2001 From: Ralf Nielsen Date: Fri, 19 Dec 2014 15:33:33 +0100 Subject: [PATCH] load image from fat --- include/configs/am335x_evm.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h index cdc2057..acadc79 100644 --- a/include/configs/am335x_evm.h +++ b/include/configs/am335x_evm.h @@ -354,6 +354,9 @@ #endif #define CONFIG_BOOTCOMMAND \ + "fatload mmc 0 0x88000000 startscreen.bmp; " \ + "bmp info 0x88000000; " \ + "bmp display 0x88000000 0 0; " \ "gpio clear 53; " \ "gpio clear 54; " \ "gpio clear 55; " \ -- 1.7.9.5 ./0016-set-bootpart-for-bootonce.patch0000664000175000017500000000435212527325627020076 0ustar nielsenrnielsenrFrom 0ed2c167af3b23ed417ce862d365f593a224ebeb Mon Sep 17 00:00:00 2001 From: Ralf Nielsen Date: Thu, 21 May 2015 09:50:59 +0200 Subject: [PATCH 2/3] set bootpart for bootonce --- include/configs/am335x_evm.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h index 4e539df..0c1a2db 100644 --- a/include/configs/am335x_evm.h +++ b/include/configs/am335x_evm.h @@ -232,7 +232,7 @@ "if test -e mmc ${bootpart} /bootonce.txt; then " \ "load mmc ${bootpart} ${loadaddr} /bootonce.txt;" \ "echo Read bytes: ${filesize} ...;" \ - "if itest ${filesize} -gt 9; then " \ + "if itest.b ${filesize} -gt 9; then " \ "env import -t ${loadaddr} ${filesize};" \ "echo Loaded environment from /bootonce.txt;" \ "echo bootpartition is ${bootonce} ...;" \ @@ -240,15 +240,17 @@ "mw.b ${loadaddr} 0x0a;" \ "fatwrite mmc ${bootpart} ${loadaddr} bootonce.txt 1;" \ "for i in 2 3; do " \ - "if itest -e ${bootonce} -eq ${i}; then " \ + "setenv mmcpart ${i};" \ + "setenv bootpart ${mmcdev}:${mmcpart};" \ + "if itest.b ${bootonce} -eq ${i}; then " \ "setenv bootpart ${mmcdev}:${bootonce};" \ - "echo Loading Kernel from ${mmcdev}:${bootonce};" \ + "echo bootonce - try loading Kernel from ${mmcdev}:${mmcpart};" \ "echo Checking for: /boot/uEnv.txt ...;" \ "if test -e mmc ${bootpart} /boot/uEnv.txt; then " \ "gpio set 55;" \ "load mmc ${bootpart} ${loadaddr} /boot/uEnv.txt;" \ "env import -t ${loadaddr} ${filesize};" \ - "echo Loaded environment from /boot/uEnv.txt;" \ + "echo bootonce - Loaded environment from /boot/uEnv.txt;" \ "if test -n ${dtb}; then " \ "setenv fdtfile ${dtb};" \ "echo Using: dtb=${fdtfile} ...;" \ @@ -256,7 +258,7 @@ "echo Checking if uname_r is set in /boot/uEnv.txt...;" \ "if test -n ${uname_r}; then " \ "gpio set 56; " \ - "echo Running uname_boot ...;" \ + "echo bootonce - running uname_boot ...;" \ "setenv mmcroot /dev/mmcblk${mmcdev}p${mmcpart} ro;" \ "run uname_boot;" \ "fi;" \ -- 2.4.1 ./0014-Bootselected-switch.patch0000664000175000017500000000430212511507072016752 0ustar nielsenrnielsenrFrom 6b773aa41a9fa688c7e32e1688abed45b7397772 Mon Sep 17 00:00:00 2001 From: Ralf Nielsen Date: Mon, 16 Mar 2015 15:12:02 +0100 Subject: [PATCH] Bootselected switch --- include/configs/am335x_evm.h | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h index 4225001..3577a45 100644 --- a/include/configs/am335x_evm.h +++ b/include/configs/am335x_evm.h @@ -229,24 +229,28 @@ "run bootscript;" \ "fi; " \ "echo Checking for: /boot/uEnv.txt ...;" \ - "for i in 1 2 3 4 5 6 7 ; do " \ + "for i in 2 3; do " \ "setenv mmcpart ${i};" \ "setenv bootpart ${mmcdev}:${mmcpart};" \ - "if test -e mmc ${bootpart} /boot/uEnv.txt; then " \ - "gpio set 55;" \ - "load mmc ${bootpart} ${loadaddr} /boot/uEnv.txt;" \ - "env import -t ${loadaddr} ${filesize};" \ - "echo Loaded environment from /boot/uEnv.txt;" \ - "if test -n ${dtb}; then " \ - "setenv fdtfile ${dtb};" \ - "echo Using: dtb=${fdtfile} ...;" \ - "fi;" \ - "echo Checking if uname_r is set in /boot/uEnv.txt...;" \ - "if test -n ${uname_r}; then " \ - "gpio set 56; " \ - "echo Running uname_boot ...;" \ - "setenv mmcroot /dev/mmcblk${mmcdev}p${mmcpart} ro;" \ - "run uname_boot;" \ + "echo Checking for Aktive Partition ...;" \ + "if test -e mmc ${bootpart} /boot/Bootselected; then " \ + "echo Loading Kernel from ${mmcdev}:${mmcpart};" \ + "if test -e mmc ${bootpart} /boot/uEnv.txt; then " \ + "gpio set 55;" \ + "load mmc ${bootpart} ${loadaddr} /boot/uEnv.txt;" \ + "env import -t ${loadaddr} ${filesize};" \ + "echo Loaded environment from /boot/uEnv.txt;" \ + "if test -n ${dtb}; then " \ + "setenv fdtfile ${dtb};" \ + "echo Using: dtb=${fdtfile} ...;" \ + "fi;" \ + "echo Checking if uname_r is set in /boot/uEnv.txt...;" \ + "if test -n ${uname_r}; then " \ + "gpio set 56; " \ + "echo Running uname_boot ...;" \ + "setenv mmcroot /dev/mmcblk${mmcdev}p${mmcpart} ro;" \ + "run uname_boot;" \ + "fi;" \ "fi;" \ "fi;" \ "done;" \ -- 2.3.2 ./0003-Add-writeconfig-command-to-u-boot.patch0000664000175000017500000000134512511507072021306 0ustar nielsenrnielsenrFrom 20b59851215d18349ddce6f1bccb307753b2b792 Mon Sep 17 00:00:00 2001 From: Ralf Nielsen Date: Mon, 8 Sep 2014 08:08:25 +0200 Subject: [PATCH 3/6] Add-writeconfig-command-to-u-boot --- common/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/common/Makefile b/common/Makefile index de5cce8..d24ae24 100644 --- a/common/Makefile +++ b/common/Makefile @@ -114,6 +114,7 @@ obj-$(CONFIG_CMD_FUSE) += cmd_fuse.o obj-$(CONFIG_CMD_GETTIME) += cmd_gettime.o obj-$(CONFIG_CMD_GPIO) += cmd_gpio.o obj-$(CONFIG_CMD_I2C) += cmd_i2c.o +obj-$(CONFIG_CMD_I2C) += cmd_writeconfig.o obj-$(CONFIG_CMD_IOTRACE) += cmd_iotrace.o obj-$(CONFIG_CMD_HASH) += cmd_hash.o obj-$(CONFIG_CMD_IDE) += cmd_ide.o -- 1.7.9.5