From 9d940442d39667b3cb78363b583e992ffe76f45e Mon Sep 17 00:00:00 2001 From: Stefano Babic Date: Fri, 5 Aug 2011 09:11:11 +0200 Subject: MX35: added ESDC structure to imx-regs The structure and PLL defines are added to the imx-regs.h file and dropped from board header files. Signed-off-by: Stefano Babic --- board/freescale/mx35pdk/mx35pdk.h | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'board/freescale') diff --git a/board/freescale/mx35pdk/mx35pdk.h b/board/freescale/mx35pdk/mx35pdk.h index 409aeb2..6aeb218 100644 --- a/board/freescale/mx35pdk/mx35pdk.h +++ b/board/freescale/mx35pdk/mx35pdk.h @@ -59,24 +59,6 @@ #define CCM_CCMR_CONFIG 0x003F4208 #define CCM_PDR0_CONFIG 0x00801000 -#define PLL_BRM_OFFSET 31 -#define PLL_PD_OFFSET 26 -#define PLL_MFD_OFFSET 16 -#define PLL_MFI_OFFSET 10 - -#define _PLL_BRM(x) ((x) << PLL_BRM_OFFSET) -#define _PLL_PD(x) (((x) - 1) << PLL_PD_OFFSET) -#define _PLL_MFD(x) (((x) - 1) << PLL_MFD_OFFSET) -#define _PLL_MFI(x) ((x) << PLL_MFI_OFFSET) -#define _PLL_MFN(x) (x) -#define _PLL_SETTING(brm, pd, mfd, mfi, mfn) \ - (_PLL_BRM(brm) | _PLL_PD(pd) | _PLL_MFD(mfd) | _PLL_MFI(mfi) |\ - _PLL_MFN(mfn)) - -#define CCM_MPLL_532_HZ _PLL_SETTING(1, 1, 12, 11, 1) -#define CCM_MPLL_399_HZ _PLL_SETTING(0, 1, 16, 8, 5) -#define CCM_PPLL_300_HZ _PLL_SETTING(0, 1, 4, 6, 1) - /* MEMORY SETTING */ #define ESDCTL_0x92220000 0x92220000 #define ESDCTL_0xA2220000 0xA2220000 -- cgit v1.1 From 1f83d009e4fb086c3ee210f78b2ca601fd2cd0dc Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Mon, 24 Oct 2011 05:32:28 +0000 Subject: mx31pdk: Add MC13783 PMIC support Add MC13783 PMIC support. Tested by using the 'date' command, which reads the MC13783 RTC registers: MX31PDK U-Boot > date Date: 1970-01-01 (Thursday) Time: 2:22:35 Signed-off-by: Fabio Estevam --- board/freescale/mx31pdk/mx31pdk.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'board/freescale') diff --git a/board/freescale/mx31pdk/mx31pdk.c b/board/freescale/mx31pdk/mx31pdk.c index 0e7e0ce..9f8bc53 100644 --- a/board/freescale/mx31pdk/mx31pdk.c +++ b/board/freescale/mx31pdk/mx31pdk.c @@ -30,6 +30,8 @@ #include #include #include +#include +#include DECLARE_GLOBAL_DATA_PTR; @@ -79,6 +81,16 @@ int board_init(void) int board_late_init(void) { + u32 val; + struct pmic *p; + + pmic_init(); + p = get_pmic(); + + /* Enable RTC battery */ + pmic_reg_read(p, REG_POWER_CTL0, &val); + pmic_reg_write(p, REG_POWER_CTL0, val | COINCHEN); + pmic_reg_write(p, REG_INT_STATUS1, RTCRSTI); #ifdef CONFIG_HW_WATCHDOG mxc_hw_watchdog_enable(); #endif -- cgit v1.1 From d736ebea1cc335e89643656c3db33f5df55ffb16 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Tue, 25 Oct 2011 03:14:00 +0000 Subject: mx51evk: Use GPIO API for configuring the IOMUX GPIO API provides mxc_request_iomux function for setting the IOMUX mode. Use this function instead of directly writing to the IOMUX register. Signed-off-by: Fabio Estevam --- board/freescale/mx51evk/mx51evk.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'board/freescale') diff --git a/board/freescale/mx51evk/mx51evk.c b/board/freescale/mx51evk/mx51evk.c index 2a0dad0..afb1c30 100644 --- a/board/freescale/mx51evk/mx51evk.c +++ b/board/freescale/mx51evk/mx51evk.c @@ -254,16 +254,14 @@ static void power_init(void) pmic_reg_write(p, REG_MODE_1, val); udelay(200); - gpio_direction_output(46, 0); - - /* Reset the ethernet controller over GPIO */ - writel(0x1, IOMUXC_BASE_ADDR + 0x0AC); - /* Enable VGEN3, VCAM, VAUDIO, VVIDEO, VSD regulators */ val = VGEN3EN | VGEN3CONFIG | VCAMEN | VCAMCONFIG | VVIDEOEN | VAUDIOEN | VSDEN; pmic_reg_write(p, REG_MODE_1, val); + mxc_request_iomux(MX51_PIN_EIM_A20, IOMUX_CONFIG_ALT1); + gpio_direction_output(46, 0); + udelay(500); gpio_set_value(46, 1); -- cgit v1.1 From 9c818b1b98b9f23b6cf301389af641e194f061b9 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Wed, 26 Oct 2011 09:01:00 +0000 Subject: mx51evk: Remove unused get_board_rev function No board information is passed for MX51EVK, so remove get_board_rev function. Signed-off-by: Fabio Estevam --- board/freescale/mx51evk/mx51evk.c | 9 --------- 1 file changed, 9 deletions(-) (limited to 'board/freescale') diff --git a/board/freescale/mx51evk/mx51evk.c b/board/freescale/mx51evk/mx51evk.c index afb1c30..37e6e4d 100644 --- a/board/freescale/mx51evk/mx51evk.c +++ b/board/freescale/mx51evk/mx51evk.c @@ -38,8 +38,6 @@ DECLARE_GLOBAL_DATA_PTR; -static u32 system_rev; - #ifdef CONFIG_FSL_ESDHC struct fsl_esdhc_cfg esdhc_cfg[2] = { {MMC_SDHC1_BASE_ADDR, 1}, @@ -47,11 +45,6 @@ struct fsl_esdhc_cfg esdhc_cfg[2] = { }; #endif -u32 get_board_rev(void) -{ - return system_rev; -} - int dram_init(void) { /* dram_init must store complete ramsize in gd->ram_size */ @@ -404,8 +397,6 @@ int board_early_init_f(void) int board_init(void) { - system_rev = get_cpu_rev(); - /* address of boot parameters */ gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100; -- cgit v1.1 From aa2bcf4be5b97f41ed1a10b5cfe68442cd588fb8 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Thu, 27 Oct 2011 01:29:44 +0000 Subject: mx53loco: Remove unused get_board_rev function No board information is passed for MX53LOCO, so remove get_board_rev function. Cc: Jason Liu Signed-off-by: Fabio Estevam Acked-by: Jason Liu --- board/freescale/mx53loco/mx53loco.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'board/freescale') diff --git a/board/freescale/mx53loco/mx53loco.c b/board/freescale/mx53loco/mx53loco.c index 156f8b5..b4c7f33 100644 --- a/board/freescale/mx53loco/mx53loco.c +++ b/board/freescale/mx53loco/mx53loco.c @@ -38,11 +38,6 @@ DECLARE_GLOBAL_DATA_PTR; -u32 get_board_rev(void) -{ - return get_cpu_rev(); -} - int dram_init(void) { u32 size1, size2; -- cgit v1.1 From 850f4d67733dc0f58ddf15cb59cded81aa874b78 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Thu, 27 Oct 2011 01:29:41 +0000 Subject: mx53evk: Remove unused get_board_rev function No board information is passed for MX53EVK, so remove get_board_rev function. Cc: Jason Liu Signed-off-by: Fabio Estevam Acked-by: Jason Liu --- board/freescale/mx53evk/mx53evk.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'board/freescale') diff --git a/board/freescale/mx53evk/mx53evk.c b/board/freescale/mx53evk/mx53evk.c index eab9c5f..335661f 100644 --- a/board/freescale/mx53evk/mx53evk.c +++ b/board/freescale/mx53evk/mx53evk.c @@ -39,11 +39,6 @@ DECLARE_GLOBAL_DATA_PTR; -u32 get_board_rev(void) -{ - return get_cpu_rev(); -} - int dram_init(void) { /* dram_init must store complete ramsize in gd->ram_size */ -- cgit v1.1 From d7f71414f4296fbea578e80ada1bf2435ed0a2cd Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Thu, 27 Oct 2011 01:29:42 +0000 Subject: mx53ard: Remove unused get_board_rev function No board information is passed for MX53ARD, so remove get_board_rev function. Signed-off-by: Fabio Estevam --- board/freescale/mx53ard/mx53ard.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'board/freescale') diff --git a/board/freescale/mx53ard/mx53ard.c b/board/freescale/mx53ard/mx53ard.c index c89da13..be32aee 100644 --- a/board/freescale/mx53ard/mx53ard.c +++ b/board/freescale/mx53ard/mx53ard.c @@ -37,11 +37,6 @@ DECLARE_GLOBAL_DATA_PTR; -u32 get_board_rev(void) -{ - return get_cpu_rev(); -} - int dram_init(void) { u32 size1, size2; -- cgit v1.1 From 6bc31fbe08f9036f5854a9e2399a43f3a96d1e2e Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Thu, 27 Oct 2011 01:29:43 +0000 Subject: mx53smd: Remove unused get_board_rev function No board information is passed for MX53SMD, so remove get_board_rev function. Signed-off-by: Fabio Estevam --- board/freescale/mx53smd/mx53smd.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'board/freescale') diff --git a/board/freescale/mx53smd/mx53smd.c b/board/freescale/mx53smd/mx53smd.c index 776784f..87fa7fa 100644 --- a/board/freescale/mx53smd/mx53smd.c +++ b/board/freescale/mx53smd/mx53smd.c @@ -35,11 +35,6 @@ DECLARE_GLOBAL_DATA_PTR; -u32 get_board_rev(void) -{ - return get_cpu_rev(); -} - int dram_init(void) { u32 size1, size2; -- cgit v1.1 From 867b96a5b7b1de56181b57bdfb25151c01a0fb3f Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Tue, 1 Nov 2011 08:16:37 +0000 Subject: mx31pdk: Enable D and I caches Enable D and I caches on mx31pdk. Signed-off-by: Fabio Estevam Acked-by: Stefano Babic --- board/freescale/mx31pdk/mx31pdk.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'board/freescale') diff --git a/board/freescale/mx31pdk/mx31pdk.c b/board/freescale/mx31pdk/mx31pdk.c index 9f8bc53..1d7b4f6 100644 --- a/board/freescale/mx31pdk/mx31pdk.c +++ b/board/freescale/mx31pdk/mx31pdk.c @@ -71,11 +71,19 @@ int board_early_init_f(void) return 0; } +void enable_caches(void) +{ + icache_enable(); + dcache_enable(); +} + int board_init(void) { /* adress of boot parameters */ gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100; + enable_caches(); + return 0; } -- cgit v1.1