From 8d196e52b58d1e50a80c2f5067b201cda521c75c Mon Sep 17 00:00:00 2001 From: Eric Nelson Date: Tue, 30 Sep 2014 15:40:01 -0700 Subject: ARM: prevent compiler warnings from bootm.c Without preceding declarations, "make C=1" generates "Should it be static?" warnings for symbols do_bootm_linux, boot_prep_vxworks, and boot_jump_vxworks Include of bootm.h also identified a signature mismatch (const on argv[]). Signed-off-by: Eric Nelson Acked-by: Albert ARIBAUD diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c index 39fe7a1..4949d57 100644 --- a/arch/arm/lib/bootm.c +++ b/arch/arm/lib/bootm.c @@ -22,6 +22,8 @@ #include #include #include +#include +#include #if defined(CONFIG_ARMV7_NONSEC) || defined(CONFIG_ARMV7_VIRT) #include @@ -299,7 +301,8 @@ static void boot_jump_linux(bootm_headers_t *images, int flag) * DIFFERENCE: Instead of calling prep and go at the end * they are called if subcommand is equal 0. */ -int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) +int do_bootm_linux(int flag, int argc, char * const argv[], + bootm_headers_t *images) { /* No need for those on ARM */ if (flag & BOOTM_STATE_OS_BD_T || flag & BOOTM_STATE_OS_CMDLINE) -- cgit v0.10.2 From f6d48b29cbf5950187e42cb3c108ea5d9c7adaa9 Mon Sep 17 00:00:00 2001 From: Eric Nelson Date: Tue, 30 Sep 2014 15:40:02 -0700 Subject: ARM: i.MX6: include prototype for get_board_rev() Include to see the prototype for get_board_rev() and prevent warning "Should it be static?" with "make C=1". Signed-off-by: Eric Nelson diff --git a/arch/arm/cpu/armv7/mx6/soc.c b/arch/arm/cpu/armv7/mx6/soc.c index 6352422..6dc2600 100644 --- a/arch/arm/cpu/armv7/mx6/soc.c +++ b/arch/arm/cpu/armv7/mx6/soc.c @@ -20,6 +20,7 @@ #include #include #include +#include enum ldo_reg { LDO_ARM, -- cgit v0.10.2 From 3acb011c3c2c26cb6a6ee1b1d61ab8992b4f140b Mon Sep 17 00:00:00 2001 From: Eric Nelson Date: Tue, 30 Sep 2014 15:40:03 -0700 Subject: ARM: i.MX: provide declaration for board_spi_cs_gpio Provide a public declaration of the board_spi_cs_gpio() callback for i.MX SPI chip selects to prevent the warning "Should it be static?" when compiling with "make C=1". Signed-off-by: Eric Nelson diff --git a/arch/arm/include/asm/imx-common/spi.h b/arch/arm/include/asm/imx-common/spi.h new file mode 100644 index 0000000..1d4473a --- /dev/null +++ b/arch/arm/include/asm/imx-common/spi.h @@ -0,0 +1,17 @@ +/* + * Copyright 2011 Freescale Semiconductor, Inc. + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#ifndef __MXC_SPI_H_ +#define __MXC_SPI_H_ + +/* + * Board-level chip-select callback + * Should return GPIO # to be used for chip-select + */ + +int board_spi_cs_gpio(unsigned bus, unsigned cs); + +#endif diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c index 951b820..fcd4d82 100644 --- a/board/boundary/nitrogen6x/nitrogen6x.c +++ b/board/boundary/nitrogen6x/nitrogen6x.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include diff --git a/board/compulab/cm_fx6/common.c b/board/compulab/cm_fx6/common.c index 1f39679..59c9d1a 100644 --- a/board/compulab/cm_fx6/common.c +++ b/board/compulab/cm_fx6/common.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include "common.h" diff --git a/board/embest/mx6boards/mx6boards.c b/board/embest/mx6boards/mx6boards.c index a725f15..02fb3fa 100644 --- a/board/embest/mx6boards/mx6boards.c +++ b/board/embest/mx6boards/mx6boards.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/mx6qsabreauto/mx6qsabreauto.c b/board/freescale/mx6qsabreauto/mx6qsabreauto.c index 1cb7561..9ab502f 100644 --- a/board/freescale/mx6qsabreauto/mx6qsabreauto.c +++ b/board/freescale/mx6qsabreauto/mx6qsabreauto.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/mx6slevk/mx6slevk.c b/board/freescale/mx6slevk/mx6slevk.c index a0832f4..a500133 100644 --- a/board/freescale/mx6slevk/mx6slevk.c +++ b/board/freescale/mx6slevk/mx6slevk.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/board/gateworks/gw_ventana/gw_ventana.c b/board/gateworks/gw_ventana/gw_ventana.c index 1038d9d..df491a8 100644 --- a/board/gateworks/gw_ventana/gw_ventana.c +++ b/board/gateworks/gw_ventana/gw_ventana.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include diff --git a/board/genesi/mx51_efikamx/efikamx.c b/board/genesi/mx51_efikamx/efikamx.c index 137e4ed..6ba55cd 100644 --- a/board/genesi/mx51_efikamx/efikamx.c +++ b/board/genesi/mx51_efikamx/efikamx.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include diff --git a/board/ttcontrol/vision2/vision2.c b/board/ttcontrol/vision2/vision2.c index b5249e7..247991d 100644 --- a/board/ttcontrol/vision2/vision2.c +++ b/board/ttcontrol/vision2/vision2.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/spi/mxc_spi.c b/drivers/spi/mxc_spi.c index 026f680..be10269 100644 --- a/drivers/spi/mxc_spi.c +++ b/drivers/spi/mxc_spi.c @@ -12,6 +12,7 @@ #include #include #include +#include #ifdef CONFIG_MX27 /* i.MX27 has a completely wrong register layout and register definitions in the -- cgit v0.10.2 From a5a9fba42b34f9503e5a496a0c52df18a762abd5 Mon Sep 17 00:00:00 2001 From: Eric Nelson Date: Tue, 30 Sep 2014 15:40:04 -0700 Subject: ARM: i.MX video: declare displays and display_count publicly Declare displays[] and display_count in imx-common/video.h to prevent "Should it be static?" messages when compiling board files with "make C=1". Signed-off-by: Eric Nelson diff --git a/arch/arm/imx-common/video.c b/arch/arm/imx-common/video.c index 0121cd7..8651b80 100644 --- a/arch/arm/imx-common/video.c +++ b/arch/arm/imx-common/video.c @@ -6,9 +6,6 @@ #include #include -extern struct display_info_t const displays[]; -extern size_t display_count; - int board_video_skip(void) { int i; diff --git a/arch/arm/include/asm/imx-common/video.h b/arch/arm/include/asm/imx-common/video.h index 2d94850..1a907d4 100644 --- a/arch/arm/include/asm/imx-common/video.h +++ b/arch/arm/include/asm/imx-common/video.h @@ -21,4 +21,9 @@ struct display_info_t { extern int detect_hdmi(struct display_info_t const *dev); #endif +#ifdef CONFIG_IMX_VIDEO_SKIP +extern struct display_info_t const displays[]; +extern size_t display_count; +#endif + #endif -- cgit v0.10.2 From 257d5614f49c2afd8a4045718b654c662371693a Mon Sep 17 00:00:00 2001 From: Christian Gmeiner Date: Tue, 7 Oct 2014 10:58:51 +0200 Subject: ot1200: remove superfluous "string" tag Signed-off-by: Christian Gmeiner Reviewed-by: Masahiro Yamada diff --git a/board/bachmann/ot1200/Kconfig b/board/bachmann/ot1200/Kconfig index 55a825d..6cf2573 100644 --- a/board/bachmann/ot1200/Kconfig +++ b/board/bachmann/ot1200/Kconfig @@ -1,23 +1,18 @@ if TARGET_OT1200 config SYS_CPU - string default "armv7" config SYS_BOARD - string default "ot1200" config SYS_VENDOR - string default "bachmann" config SYS_SOC - string default "mx6" config SYS_CONFIG_NAME - string default "ot1200" endif -- cgit v0.10.2 From 510922ac61067a969dd5f53ce83b1de63e052002 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Mon, 22 Sep 2014 13:55:52 -0300 Subject: mx6qsabreauto: Add HDMI support Let HDMI splash screen support work by default. Signed-off-by: Fabio Estevam diff --git a/board/freescale/mx6qsabreauto/mx6qsabreauto.c b/board/freescale/mx6qsabreauto/mx6qsabreauto.c index 9ab502f..0dc0160 100644 --- a/board/freescale/mx6qsabreauto/mx6qsabreauto.c +++ b/board/freescale/mx6qsabreauto/mx6qsabreauto.c @@ -24,6 +24,9 @@ #include #include #include +#include +#include +#include DECLARE_GLOBAL_DATA_PTR; @@ -235,10 +238,65 @@ u32 get_board_rev(void) return (get_cpu_rev() & ~(0xF << 8)) | rev; } +#if defined(CONFIG_VIDEO_IPUV3) +static void do_enable_hdmi(struct display_info_t const *dev) +{ + imx_enable_hdmi_phy(); +} + +struct display_info_t const displays[] = {{ + .bus = -1, + .addr = 0, + .pixfmt = IPU_PIX_FMT_RGB24, + .detect = detect_hdmi, + .enable = do_enable_hdmi, + .mode = { + .name = "HDMI", + .refresh = 60, + .xres = 1024, + .yres = 768, + .pixclock = 15385, + .left_margin = 220, + .right_margin = 40, + .upper_margin = 21, + .lower_margin = 7, + .hsync_len = 60, + .vsync_len = 10, + .sync = FB_SYNC_EXT, + .vmode = FB_VMODE_NONINTERLACED, +} } }; +size_t display_count = ARRAY_SIZE(displays); + +static void setup_display(void) +{ + struct mxc_ccm_reg *mxc_ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR; + int reg; + + enable_ipu_clock(); + imx_setup_hdmi(); + + reg = readl(&mxc_ccm->chsccdr); + reg |= (CHSCCDR_CLK_SEL_LDB_DI0 + << MXC_CCM_CHSCCDR_IPU1_DI0_CLK_SEL_OFFSET); + writel(reg, &mxc_ccm->chsccdr); +} +#endif /* CONFIG_VIDEO_IPUV3 */ + +/* + * Do not overwrite the console + * Use always serial for U-Boot console + */ +int overwrite_console(void) +{ + return 1; +} + int board_early_init_f(void) { setup_iomux_uart(); - +#ifdef CONFIG_VIDEO_IPUV3 + setup_display(); +#endif return 0; } diff --git a/include/configs/mx6qsabreauto.h b/include/configs/mx6qsabreauto.h index 0ab3127..48fec6f 100644 --- a/include/configs/mx6qsabreauto.h +++ b/include/configs/mx6qsabreauto.h @@ -45,4 +45,21 @@ #define CONFIG_SYS_I2C_MXC #define CONFIG_SYS_I2C_SPEED 100000 +/* Framebuffer */ +#define CONFIG_VIDEO +#define CONFIG_VIDEO_IPUV3 +#define CONFIG_CFB_CONSOLE +#define CONFIG_VGA_AS_SINGLE_DEVICE +#define CONFIG_SYS_CONSOLE_IS_IN_ENV +#define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE +#define CONFIG_VIDEO_BMP_RLE8 +#define CONFIG_SPLASH_SCREEN +#define CONFIG_SPLASH_SCREEN_ALIGN +#define CONFIG_BMP_16BPP +#define CONFIG_VIDEO_LOGO +#define CONFIG_VIDEO_BMP_LOGO +#define CONFIG_IPUV3_CLK 260000000 +#define CONFIG_IMX_HDMI +#define CONFIG_IMX_VIDEO_SKIP + #endif /* __MX6QSABREAUTO_CONFIG_H */ -- cgit v0.10.2 From 04451ba347385ee598e485c3406712819a847459 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Mon, 22 Sep 2014 13:55:53 -0300 Subject: mx6sabre_common: Add HDMI config to common code HDMI config options can be placed into the common mx6sabre_common.h file to avoid duplication. Signed-off-by: Fabio Estevam diff --git a/include/configs/mx6qsabreauto.h b/include/configs/mx6qsabreauto.h index 48fec6f..0ab3127 100644 --- a/include/configs/mx6qsabreauto.h +++ b/include/configs/mx6qsabreauto.h @@ -45,21 +45,4 @@ #define CONFIG_SYS_I2C_MXC #define CONFIG_SYS_I2C_SPEED 100000 -/* Framebuffer */ -#define CONFIG_VIDEO -#define CONFIG_VIDEO_IPUV3 -#define CONFIG_CFB_CONSOLE -#define CONFIG_VGA_AS_SINGLE_DEVICE -#define CONFIG_SYS_CONSOLE_IS_IN_ENV -#define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE -#define CONFIG_VIDEO_BMP_RLE8 -#define CONFIG_SPLASH_SCREEN -#define CONFIG_SPLASH_SCREEN_ALIGN -#define CONFIG_BMP_16BPP -#define CONFIG_VIDEO_LOGO -#define CONFIG_VIDEO_BMP_LOGO -#define CONFIG_IPUV3_CLK 260000000 -#define CONFIG_IMX_HDMI -#define CONFIG_IMX_VIDEO_SKIP - #endif /* __MX6QSABREAUTO_CONFIG_H */ diff --git a/include/configs/mx6sabre_common.h b/include/configs/mx6sabre_common.h index 2d93d6c..c81e9e9 100644 --- a/include/configs/mx6sabre_common.h +++ b/include/configs/mx6sabre_common.h @@ -260,4 +260,21 @@ #define CONFIG_CMD_CACHE #endif +/* Framebuffer */ +#define CONFIG_VIDEO +#define CONFIG_VIDEO_IPUV3 +#define CONFIG_CFB_CONSOLE +#define CONFIG_VGA_AS_SINGLE_DEVICE +#define CONFIG_SYS_CONSOLE_IS_IN_ENV +#define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE +#define CONFIG_VIDEO_BMP_RLE8 +#define CONFIG_SPLASH_SCREEN +#define CONFIG_SPLASH_SCREEN_ALIGN +#define CONFIG_BMP_16BPP +#define CONFIG_VIDEO_LOGO +#define CONFIG_VIDEO_BMP_LOGO +#define CONFIG_IPUV3_CLK 260000000 +#define CONFIG_IMX_HDMI +#define CONFIG_IMX_VIDEO_SKIP + #endif /* __MX6QSABRE_COMMON_CONFIG_H */ diff --git a/include/configs/mx6sabresd.h b/include/configs/mx6sabresd.h index e666ebb..938030d 100644 --- a/include/configs/mx6sabresd.h +++ b/include/configs/mx6sabresd.h @@ -32,23 +32,6 @@ #define CONFIG_SYS_MMC_ENV_DEV 1 /* SDHC3 */ #endif -/* Framebuffer */ -#define CONFIG_VIDEO -#define CONFIG_VIDEO_IPUV3 -#define CONFIG_CFB_CONSOLE -#define CONFIG_VGA_AS_SINGLE_DEVICE -#define CONFIG_SYS_CONSOLE_IS_IN_ENV -#define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE -#define CONFIG_VIDEO_BMP_RLE8 -#define CONFIG_SPLASH_SCREEN -#define CONFIG_SPLASH_SCREEN_ALIGN -#define CONFIG_BMP_16BPP -#define CONFIG_VIDEO_LOGO -#define CONFIG_VIDEO_BMP_LOGO -#define CONFIG_IPUV3_CLK 260000000 -#define CONFIG_IMX_HDMI -#define CONFIG_IMX_VIDEO_SKIP - #define CONFIG_CMD_PCI #ifdef CONFIG_CMD_PCI #define CONFIG_PCI -- cgit v0.10.2 From 2e3a1f4d1d38eeb641b7f2e40b234372c45a44b5 Mon Sep 17 00:00:00 2001 From: Christian Gmeiner Date: Wed, 22 Oct 2014 11:29:51 +0200 Subject: ot1200: fix sf detection Commit 155fa9af95ac5be857a7327e7a968a296e60d4c8 changed the way to define a GPIO line, which can be used to force CS high across multiple transactions. In order to fix sf detection change board code to make use of board_spi_cs_gpio(..). Signed-off-by: Christian Gmeiner Acked-by: Stefano Babic Acked-by: Nikita Kiryanov diff --git a/board/bachmann/ot1200/ot1200.c b/board/bachmann/ot1200/ot1200.c index 0d5ede5..2962e0c 100644 --- a/board/bachmann/ot1200/ot1200.c +++ b/board/bachmann/ot1200/ot1200.c @@ -98,6 +98,11 @@ static void setup_iomux_spi(void) imx_iomux_v3_setup_multiple_pads(ecspi1_pads, ARRAY_SIZE(ecspi1_pads)); } +int board_spi_cs_gpio(unsigned bus, unsigned cs) +{ + return (bus == 2 && cs == 0) ? (IMX_GPIO_NR(1, 3)) : -1; +} + int board_early_init_f(void) { setup_iomux_uart(); diff --git a/include/configs/ot1200.h b/include/configs/ot1200.h index 071880f..d7696bd 100644 --- a/include/configs/ot1200.h +++ b/include/configs/ot1200.h @@ -47,7 +47,7 @@ #define CONFIG_SPI_FLASH_SST #define CONFIG_MXC_SPI #define CONFIG_SF_DEFAULT_BUS 2 -#define CONFIG_SF_DEFAULT_CS (0|(IMX_GPIO_NR(1, 3)<<8)) +#define CONFIG_SF_DEFAULT_CS 0 #define CONFIG_SF_DEFAULT_SPEED 25000000 #define CONFIG_SF_DEFAULT_MODE (SPI_MODE_0) -- cgit v0.10.2 From 3f97af5302ee15530411232b464d255eb2ff2ffb Mon Sep 17 00:00:00 2001 From: Christian Gmeiner Date: Wed, 22 Oct 2014 11:55:04 +0200 Subject: ot1200: add sata support One of the possible boot devices can be sata. Signed-off-by: Christian Gmeiner diff --git a/board/bachmann/ot1200/ot1200.c b/board/bachmann/ot1200/ot1200.c index 2962e0c..acf95cb 100644 --- a/board/bachmann/ot1200/ot1200.c +++ b/board/bachmann/ot1200/ot1200.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -230,6 +231,10 @@ int board_init(void) /* enable ecspi3 clocks */ enable_cspi_clock(1, 2); +#ifdef CONFIG_CMD_SATA + setup_sata(); +#endif + return 0; } -- cgit v0.10.2