projects
/
platform
/
kernel
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mx53loco: Fix build error when CONFIG_VIDEO is disabled
[platform/kernel/u-boot.git]
/
board
/
freescale
/
mx53loco
/
mx53loco.c
diff --git
a/board/freescale/mx53loco/mx53loco.c
b/board/freescale/mx53loco/mx53loco.c
index
fb13895
..
f8f0503
100644
(file)
--- a/
board/freescale/mx53loco/mx53loco.c
+++ b/
board/freescale/mx53loco/mx53loco.c
@@
-31,6
+31,7
@@
#include <asm/arch/iomux.h>
#include <asm/arch/clock.h>
#include <asm/errno.h>
#include <asm/arch/iomux.h>
#include <asm/arch/clock.h>
#include <asm/errno.h>
+#include <asm/imx-common/mx5_video.h>
#include <netdev.h>
#include <i2c.h>
#include <mmc.h>
#include <netdev.h>
#include <i2c.h>
#include <mmc.h>
@@
-39,6
+40,10
@@
#include <pmic.h>
#include <dialog_pmic.h>
#include <fsl_pmic.h>
#include <pmic.h>
#include <dialog_pmic.h>
#include <fsl_pmic.h>
+#include <linux/fb.h>
+#include <ipu_pixfmt.h>
+
+#define MX53LOCO_LCD_POWER IMX_GPIO_NR(3, 24)
DECLARE_GLOBAL_DATA_PTR;
DECLARE_GLOBAL_DATA_PTR;
@@
-71,6
+76,9
@@
u32 get_board_rev(void)
int rev = readl(&fuse->gp[6]);
int rev = readl(&fuse->gp[6]);
+ if (!i2c_probe(CONFIG_SYS_DIALOG_PMIC_I2C_ADDR))
+ rev = 0;
+
return (get_cpu_rev() & ~(0xF << 8)) | (rev & 0xF) << 8;
}
return (get_cpu_rev() & ~(0xF << 8)) | (rev & 0xF) << 8;
}
@@
-97,10
+105,9
@@
static void setup_iomux_uart(void)
#ifdef CONFIG_USB_EHCI_MX5
int board_ehci_hcd_init(int port)
{
#ifdef CONFIG_USB_EHCI_MX5
int board_ehci_hcd_init(int port)
{
- /* request VBUS power enable pin, GPIO
[8}, gpio7
*/
+ /* request VBUS power enable pin, GPIO
7_8
*/
mxc_request_iomux(MX53_PIN_ATA_DA_2, IOMUX_CONFIG_ALT1);
mxc_request_iomux(MX53_PIN_ATA_DA_2, IOMUX_CONFIG_ALT1);
- gpio_direction_output(IOMUX_TO_GPIO(MX53_PIN_ATA_DA_2), 0);
- gpio_set_value(IOMUX_TO_GPIO(MX53_PIN_ATA_DA_2), 1);
+ gpio_direction_output(IOMUX_TO_GPIO(MX53_PIN_ATA_DA_2), 1);
return 0;
}
#endif
return 0;
}
#endif
@@
-159,8
+166,8
@@
static void setup_iomux_fec(void)
#ifdef CONFIG_FSL_ESDHC
struct fsl_esdhc_cfg esdhc_cfg[2] = {
#ifdef CONFIG_FSL_ESDHC
struct fsl_esdhc_cfg esdhc_cfg[2] = {
- {MMC_SDHC1_BASE_ADDR
, 1
},
- {MMC_SDHC3_BASE_ADDR
, 1
},
+ {MMC_SDHC1_BASE_ADDR},
+ {MMC_SDHC3_BASE_ADDR},
};
int board_mmc_getcd(struct mmc *mmc)
};
int board_mmc_getcd(struct mmc *mmc)
@@
-169,14
+176,14
@@
int board_mmc_getcd(struct mmc *mmc)
int ret;
mxc_request_iomux(MX53_PIN_EIM_DA11, IOMUX_CONFIG_ALT1);
int ret;
mxc_request_iomux(MX53_PIN_EIM_DA11, IOMUX_CONFIG_ALT1);
- gpio_direction_input(
75
);
+ gpio_direction_input(
IMX_GPIO_NR(3, 11)
);
mxc_request_iomux(MX53_PIN_EIM_DA13, IOMUX_CONFIG_ALT1);
mxc_request_iomux(MX53_PIN_EIM_DA13, IOMUX_CONFIG_ALT1);
- gpio_direction_input(
77
);
+ gpio_direction_input(
IMX_GPIO_NR(3, 13)
);
if (cfg->esdhc_base == MMC_SDHC1_BASE_ADDR)
if (cfg->esdhc_base == MMC_SDHC1_BASE_ADDR)
- ret = !gpio_get_value(
77); /* GPIO3_13 */
+ ret = !gpio_get_value(
IMX_GPIO_NR(3, 13));
else
else
- ret = !gpio_get_value(
75); /* GPIO3_11 */
+ ret = !gpio_get_value(
IMX_GPIO_NR(3, 11));
return ret;
}
return ret;
}
@@
-186,6
+193,9
@@
int board_mmc_init(bd_t *bis)
u32 index;
s32 status = 0;
u32 index;
s32 status = 0;
+ esdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC_CLK);
+ esdhc_cfg[1].sdhc_clk = mxc_get_clock(MXC_ESDHC3_CLK);
+
for (index = 0; index < CONFIG_SYS_FSL_ESDHC_NUM; index++) {
switch (index) {
case 0:
for (index = 0; index < CONFIG_SYS_FSL_ESDHC_NUM; index++) {
switch (index) {
case 0:
@@
-388,7
+398,7
@@
static int power_init(void)
static void clock_1GHz(void)
{
int ret;
static void clock_1GHz(void)
{
int ret;
- u32 ref_clk =
CONFIG_SYS_MX5
_HCLK;
+ u32 ref_clk =
MXC
_HCLK;
/*
* After increasing voltage to 1.25V, we can switch
* CPU clock to 1GHz and DDR to 400MHz safely
/*
* After increasing voltage to 1.25V, we can switch
* CPU clock to 1GHz and DDR to 400MHz safely
@@
-407,6
+417,7
@@
int board_early_init_f(void)
{
setup_iomux_uart();
setup_iomux_fec();
{
setup_iomux_uart();
setup_iomux_fec();
+ setup_iomux_lcd();
return 0;
}
return 0;
}
@@
-425,23
+436,26
@@
int print_cpuinfo(void)
return 0;
}
return 0;
}
-#ifdef CONFIG_BOARD_LATE_INIT
-int board_late_init(void)
+/*
+ * Do not overwrite the console
+ * Use always serial for U-Boot console
+ */
+int overwrite_console(void)
{
{
- setup_iomux_i2c();
- if (!power_init())
- clock_1GHz();
- print_cpuinfo();
-
- return 0;
+ return 1;
}
}
-#endif
int board_init(void)
{
gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
mxc_set_sata_internal_clock();
int board_init(void)
{
gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
mxc_set_sata_internal_clock();
+ setup_iomux_i2c();
+ if (!power_init())
+ clock_1GHz();
+ print_cpuinfo();
+
+ lcd_enable();
return 0;
}
return 0;
}