[U-Boot] [PATCH] am3517evm: Use generic MMC driver
From: Vaibhav Hiremath Switch from the legacy mmc driver to the new generic mmc driver. This patch is based on similar patch for beagle[1]. [1] http://git.denx.de/?p=u-boot.git;a=commitdiff_plain;h=0cd31144240 Signed-off-by: Vaibhav Hiremath Signed-off-by: Sanjeev Premi --- board/logicpd/am3517evm/am3517evm.c |9 + include/configs/am3517_evm.h| 12 +++- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/board/logicpd/am3517evm/am3517evm.c b/board/logicpd/am3517evm/am3517evm.c index bbb6e83..c0a006a 100644 --- a/board/logicpd/am3517evm/am3517evm.c +++ b/board/logicpd/am3517evm/am3517evm.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include "am3517evm.h" @@ -74,3 +75,11 @@ void set_muxconf_regs(void) { MUX_AM3517EVM(); } + +#ifdef CONFIG_GENERIC_MMC +int board_mmc_init(bd_t *bis) +{ + omap_mmc_init(0); + return 0; +} +#endif diff --git a/include/configs/am3517_evm.h b/include/configs/am3517_evm.h index 70e8f07..caae7fe 100644 --- a/include/configs/am3517_evm.h +++ b/include/configs/am3517_evm.h @@ -95,7 +95,8 @@ #define CONFIG_SYS_BAUDRATE_TABLE {4800, 9600, 19200, 38400, 57600,\ 115200} #define CONFIG_MMC 1 -#define CONFIG_OMAP3_MMC 1 +#define CONFIG_GENERIC_MMC 1 +#define CONFIG_OMAP_HSMMC 1 #define CONFIG_DOS_PARTITION 1 /* @@ -191,17 +192,18 @@ #define CONFIG_EXTRA_ENV_SETTINGS \ "loadaddr=0x8200\0" \ - "console=ttyS2,115200n8\0" \ + "console=ttyO2,115200n8\0" \ + "mmcdev=0\0" \ "mmcargs=setenv bootargs console=${console} " \ "root=/dev/mmcblk0p2 rw " \ "rootfstype=ext3 rootwait\0" \ "nandargs=setenv bootargs console=${console} " \ "root=/dev/mtdblock4 rw " \ "rootfstype=jffs2\0" \ - "loadbootscript=fatload mmc 0 ${loadaddr} boot.scr\0" \ + "loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \ "bootscript=echo Running bootscript from mmc ...; " \ "source ${loadaddr}\0" \ - "loaduimage=fatload mmc 0 ${loadaddr} uImage\0" \ + "loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \ "mmcboot=echo Booting from mmc ...; " \ "run mmcargs; " \ "bootm ${loadaddr}\0" \ @@ -211,7 +213,7 @@ "bootm ${loadaddr}\0" \ #define CONFIG_BOOTCOMMAND \ - "if mmc init; then " \ + "if mmc rescan ${mmcdev}; then " \ "if run loadbootscript; then " \ "run bootscript; " \ "else " \ -- 1.6.2.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] omap3evm: Use generic MMC driver
From: Vaibhav Hiremath Switch from the legacy mmc driver to the new generic mmc driver. This patch is based on similar patch for beagle[1]. [1] http://git.denx.de/?p=u-boot.git;a=commitdiff_plain;h=0cd31144240 Signed-off-by: Vaibhav Hiremath Signed-off-by: Sanjeev Premi --- board/ti/evm/evm.c |9 + include/configs/omap3_evm.h | 10 ++ 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/board/ti/evm/evm.c b/board/ti/evm/evm.c index aaf3033..916a13e 100644 --- a/board/ti/evm/evm.c +++ b/board/ti/evm/evm.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include "evm.h" @@ -192,3 +193,11 @@ int board_eth_init(bd_t *bis) #endif return rc; } + +#ifdef CONFIG_GENERIC_MMC +int board_mmc_init(bd_t *bis) +{ + omap_mmc_init(0); + return 0; +} +#endif diff --git a/include/configs/omap3_evm.h b/include/configs/omap3_evm.h index 6455b0e..72c00ab 100644 --- a/include/configs/omap3_evm.h +++ b/include/configs/omap3_evm.h @@ -99,7 +99,8 @@ #define CONFIG_SYS_BAUDRATE_TABLE {4800, 9600, 19200, 38400, 57600,\ 115200} #define CONFIG_MMC 1 -#define CONFIG_OMAP3_MMC 1 +#define CONFIG_GENERIC_MMC 1 +#define CONFIG_OMAP_HSMMC 1 #define CONFIG_DOS_PARTITION 1 /* DDR - I use Micron DDR */ @@ -200,6 +201,7 @@ #define CONFIG_EXTRA_ENV_SETTINGS \ "loadaddr=0x8200\0" \ "usbtty=cdc_acm\0" \ + "mmcdev=0\0" \ "console=ttyS2,115200n8\0" \ "mmcargs=setenv bootargs console=${console} " \ "root=/dev/mmcblk0p2 rw " \ @@ -207,10 +209,10 @@ "nandargs=setenv bootargs console=${console} " \ "root=/dev/mtdblock4 rw " \ "rootfstype=jffs2\0" \ - "loadbootscript=fatload mmc 0 ${loadaddr} boot.scr\0" \ + "loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \ "bootscript=echo Running bootscript from mmc ...; " \ "source ${loadaddr}\0" \ - "loaduimage=fatload mmc 0 ${loadaddr} uImage\0" \ + "loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \ "mmcboot=echo Booting from mmc ...; " \ "run mmcargs; " \ "bootm ${loadaddr}\0" \ @@ -220,7 +222,7 @@ "bootm ${loadaddr}\0" \ #define CONFIG_BOOTCOMMAND \ - "if mmc init; then " \ + "if mmc rescan ${mmcdev}; then " \ "if run loadbootscript; then " \ "run bootscript; " \ "else " \ -- 1.6.2.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] omap3:clock: configure GFX clock to 200MHz for AM/DM37x
From: Vaibhav Hiremath AM/DM37x is another OMAP3 variant, where the GFX clock has been boosted to 192MHz/200MHz. So fix the GFX_DIV value for this change. HW Errata: Due to dependency of TV out clock of 54MHz, it is not possible to configure GFX to 192MHz. So as per HW errats, the recommended GFX clock is 200MHz (=CORE_CLK/2). Signed-off-by: Vaibhav Hiremath --- arch/arm/cpu/armv7/omap3/clock.c |2 +- arch/arm/include/asm/arch-omap3/clocks_omap3.h |1 + 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/arch/arm/cpu/armv7/omap3/clock.c b/arch/arm/cpu/armv7/omap3/clock.c index 064fd3f..892d013 100644 --- a/arch/arm/cpu/armv7/omap3/clock.c +++ b/arch/arm/cpu/armv7/omap3/clock.c @@ -380,7 +380,7 @@ static void dpll3_init_36xx(u32 sil_index, u32 clk_index) /* L3 */ sr32(&prcm_base->clksel_core, 0, 2, CORE_L3_DIV); /* GFX */ - sr32(&prcm_base->clksel_gfx, 0, 3, GFX_DIV); + sr32(&prcm_base->clksel_gfx, 0, 3, GFX_DIV_36X); /* RESET MGR */ sr32(&prcm_base->clksel_wkup, 1, 2, WKUP_RSM); /* FREQSEL (CORE_DPLL_FREQSEL): CM_CLKEN_PLL[4:7] */ diff --git a/arch/arm/include/asm/arch-omap3/clocks_omap3.h b/arch/arm/include/asm/arch-omap3/clocks_omap3.h index 30ef690..c3c9ee3 100644 --- a/arch/arm/include/asm/arch-omap3/clocks_omap3.h +++ b/arch/arm/include/asm/arch-omap3/clocks_omap3.h @@ -39,6 +39,7 @@ #define CORE_L4_DIV2 /* 83MHz : L4 */ #define CORE_L3_DIV2 /* 166MHz : L3 {DDR} */ #define GFX_DIV2 /* 83MHz : CM_CLKSEL_GFX */ +#define GFX_DIV_36X5 /* 200MHz : CM_CLKSEL_GFX */ #define WKUP_RSM 2 /* 41.5MHz: CM_CLKSEL_WKUP */ /* PER DPLL */ -- 1.6.2.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] omap3:clock: check cpu_family before enabling clks for IVA & CAM
From: Vaibhav Hiremath In case of AM3517 and AM3505 (which is OMAP3 varients), IVA2 and ISP-CAMERA modules have been removed. So add check for cpu_family before enabling clocks for these modules, else this impacts subsequent power consumption and system suspend/resume functionality. Signed-off-by: Vaibhav Hiremath Signed-off-by: Ranjith Lohithakshan --- arch/arm/cpu/armv7/omap3/clock.c | 13 + 1 files changed, 9 insertions(+), 4 deletions(-) diff --git a/arch/arm/cpu/armv7/omap3/clock.c b/arch/arm/cpu/armv7/omap3/clock.c index 2238c52..064fd3f 100644 --- a/arch/arm/cpu/armv7/omap3/clock.c +++ b/arch/arm/cpu/armv7/omap3/clock.c @@ -587,7 +587,8 @@ void prcm_init(void) dpll3_init_34xx(sil_index, clk_index); dpll4_init_34xx(sil_index, clk_index); - iva_init_34xx(sil_index, clk_index); + if (get_cpu_family() != CPU_AM35XX) + iva_init_34xx(sil_index, clk_index); mpu_init_34xx(sil_index, clk_index); /* Lock MPU DPLL to set frequency */ @@ -654,7 +655,9 @@ void per_clocks_enable(void) /* Enable the ICLK for 32K Sync Timer as its used in udelay */ sr32(&prcm_base->iclken_wkup, 2, 1, 0x1); - sr32(&prcm_base->fclken_iva2, 0, 32, FCK_IVA2_ON); + if (get_cpu_family() != CPU_AM35XX) + sr32(&prcm_base->fclken_iva2, 0, 32, FCK_IVA2_ON); + sr32(&prcm_base->fclken1_core, 0, 32, FCK_CORE1_ON); sr32(&prcm_base->iclken1_core, 0, 32, ICK_CORE1_ON); sr32(&prcm_base->iclken2_core, 0, 32, ICK_CORE2_ON); @@ -662,8 +665,10 @@ void per_clocks_enable(void) sr32(&prcm_base->iclken_wkup, 0, 32, ICK_WKUP_ON); sr32(&prcm_base->fclken_dss, 0, 32, FCK_DSS_ON); sr32(&prcm_base->iclken_dss, 0, 32, ICK_DSS_ON); - sr32(&prcm_base->fclken_cam, 0, 32, FCK_CAM_ON); - sr32(&prcm_base->iclken_cam, 0, 32, ICK_CAM_ON); + if (get_cpu_family() != CPU_AM35XX) { + sr32(&prcm_base->fclken_cam, 0, 32, FCK_CAM_ON); + sr32(&prcm_base->iclken_cam, 0, 32, ICK_CAM_ON); + } sr32(&prcm_base->fclken_per, 0, 32, FCK_PER_ON); sr32(&prcm_base->iclken_per, 0, 32, ICK_PER_ON); -- 1.6.2.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] OMAP3/4: Increase console I/O buffer size
From: Vaibhav Hiremath Increase the console I/O buffer size (SYS_CBSIZE) to 512 (from 256) required especially for bootargs string, as multiple options (e.g Video settings) are passed to the kernel through bootargs. Signed-off-by: Vaibhav Hiremath --- include/configs/omap3_beagle.h |2 +- include/configs/omap3_evm.h |2 +- include/configs/omap3_overo.h |2 +- include/configs/omap3_pandora.h |2 +- include/configs/omap3_sdp3430.h |2 +- include/configs/omap3_zoom1.h |2 +- include/configs/omap3_zoom2.h |2 +- include/configs/omap4_panda.h |2 +- include/configs/omap4_sdp4430.h |2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h index 9fd80ed..14586eb 100644 --- a/include/configs/omap3_beagle.h +++ b/include/configs/omap3_beagle.h @@ -262,7 +262,7 @@ #define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */ #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " #define CONFIG_SYS_PROMPT "OMAP3 beagleboard.org # " -#define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ +#define CONFIG_SYS_CBSIZE 512 /* Console I/O Buffer Size */ /* Print Buffer Size */ #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \ sizeof(CONFIG_SYS_PROMPT) + 16) diff --git a/include/configs/omap3_evm.h b/include/configs/omap3_evm.h index 13a4fbf..ed230b6 100644 --- a/include/configs/omap3_evm.h +++ b/include/configs/omap3_evm.h @@ -238,7 +238,7 @@ #define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */ #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " #define CONFIG_SYS_PROMPT "OMAP3_EVM # " -#define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ +#define CONFIG_SYS_CBSIZE 512 /* Console I/O Buffer Size */ /* Print Buffer Size */ #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \ sizeof(CONFIG_SYS_PROMPT) + 16) diff --git a/include/configs/omap3_overo.h b/include/configs/omap3_overo.h index 242b317..8cf67fd 100644 --- a/include/configs/omap3_overo.h +++ b/include/configs/omap3_overo.h @@ -214,7 +214,7 @@ #define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */ #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " #define CONFIG_SYS_PROMPT "Overo # " -#define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ +#define CONFIG_SYS_CBSIZE 512 /* Console I/O Buffer Size */ /* Print Buffer Size */ #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \ sizeof(CONFIG_SYS_PROMPT) + 16) diff --git a/include/configs/omap3_pandora.h b/include/configs/omap3_pandora.h index 39c87a8..88f421b 100644 --- a/include/configs/omap3_pandora.h +++ b/include/configs/omap3_pandora.h @@ -197,7 +197,7 @@ #define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */ #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " #define CONFIG_SYS_PROMPT "Pandora # " -#define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ +#define CONFIG_SYS_CBSIZE 512 /* Console I/O Buffer Size */ /* Print Buffer Size */ #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \ sizeof(CONFIG_SYS_PROMPT) + 16) diff --git a/include/configs/omap3_sdp3430.h b/include/configs/omap3_sdp3430.h index 55bbcd4..f957354 100644 --- a/include/configs/omap3_sdp3430.h +++ b/include/configs/omap3_sdp3430.h @@ -270,7 +270,7 @@ #define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */ #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " #define CONFIG_SYS_PROMPT "OMAP34XX SDP # " -#define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ +#define CONFIG_SYS_CBSIZE 512 /* Console I/O Buffer Size */ /* Print Buffer Size */ #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \ sizeof(CONFIG_SYS_PROMPT) + 16) diff --git a/include/configs/omap3_zoom1.h b/include/configs/omap3_zoom1.h index 9183849..f26b28f 100644 --- a/include/configs/omap3_zoom1.h +++ b/include/configs/omap3_zoom1.h @@ -221,7 +221,7 @@ #define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */ #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " #define CONFIG_SYS_PROMPT "OMAP3 Zoom1 # " -#define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ +#define CONFIG_SYS_CBSIZE 512 /* Console I/O Buffer Size */ /* Print Buffer Size */ #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \ sizeof(CONFIG_SYS_PROMPT) + 16) diff --git a/include/configs/omap3_zoom2.h b/include/configs/omap3_zoom2.h index 3573edf..f0cfd41 100644 --- a/include/configs/omap3_zoom2.h +++ b/include/configs/omap3_zoo
[U-Boot] [PATCH] AM3517:EMIF4: fix SDRAM size to 256Mb
From: Vaibhav Hiremath With addition of "dram_init_banksize()" function from Heiko,Schocher (commit ID: 561142af20f1fd7b425d9425730014e656defb91), the DRAM size is getting configured wrongly to 512Mb (CS0 & CS1). So fix it to 256Mb. Signed-off-by: Vaibhav Hiremath --- arch/arm/cpu/armv7/omap3/emif4.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/arm/cpu/armv7/omap3/emif4.c b/arch/arm/cpu/armv7/omap3/emif4.c index 0870857..2227576 100644 --- a/arch/arm/cpu/armv7/omap3/emif4.c +++ b/arch/arm/cpu/armv7/omap3/emif4.c @@ -48,10 +48,11 @@ u32 is_mem_sdr(void) */ u32 get_sdr_cs_size(u32 cs) { - u32 size; + u32 size = 0; /* TODO: Calculate the size based on EMIF4 configuration */ - size = CONFIG_SYS_CS0_SIZE; + if (cs == CS0) + size = CONFIG_SYS_CS0_SIZE; return size; } -- 1.6.2.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] AM3517:Build FIX: undef CONFIG_CMD_NFS support
From: Vaibhav Hiremath Without CONFIG_CMD_NET support CONFIG_CMD_NFS leads to linking error, so disable CONFIG_CMD_NFS option. Signed-off-by: Vaibhav Hiremath --- include/configs/am3517_evm.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/include/configs/am3517_evm.h b/include/configs/am3517_evm.h index 3dda1e9..70e8f07 100644 --- a/include/configs/am3517_evm.h +++ b/include/configs/am3517_evm.h @@ -163,6 +163,7 @@ #define CONFIG_DRIVER_OMAP34XX_I2C 1 #undef CONFIG_CMD_NET +#undef CONFIG_CMD_NFS /* * Board NAND Info. */ -- 1.6.2.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] AM3517:Fix for ARM Relocation support
From: Vaibhav Hiremath Also change the CONFIG_SYS_TEXT_BASE to 0x80008000, required with relocation support. This is the load address for primary boot loader (x-loader). Signed-off-by: Vaibhav Hiremath --- board/logicpd/am3517evm/config.mk |2 +- include/configs/am3517_evm.h |6 ++ 2 files changed, 7 insertions(+), 1 deletions(-) diff --git a/board/logicpd/am3517evm/config.mk b/board/logicpd/am3517evm/config.mk index 102d32b..71ec5d0 100644 --- a/board/logicpd/am3517evm/config.mk +++ b/board/logicpd/am3517evm/config.mk @@ -27,4 +27,4 @@ # (mem base + reserved) # For use with external or internal boots. -CONFIG_SYS_TEXT_BASE = 0x80e8 +CONFIG_SYS_TEXT_BASE = 0x80008000 diff --git a/include/configs/am3517_evm.h b/include/configs/am3517_evm.h index 9a9ba88..3dda1e9 100644 --- a/include/configs/am3517_evm.h +++ b/include/configs/am3517_evm.h @@ -330,4 +330,10 @@ extern unsigned int boot_flash_sec; extern unsigned int boot_flash_type; #endif +#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1 +#define CONFIG_SYS_INIT_RAM_ADDR 0x4020f800 +#define CONFIG_SYS_INIT_RAM_SIZE 0x800 +#define CONFIG_SYS_INIT_SP_ADDR(CONFIG_SYS_INIT_RAM_ADDR + \ +CONFIG_SYS_INIT_RAM_SIZE - \ +GENERATED_GBL_DATA_SIZE) #endif /* __CONFIG_H */ -- 1.6.2.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH-V4 1/2] AM35x: Add support for AM3517EVM
From: Vaibhav Hiremath This patch adds basic support for the AM3517EVM. It includes: - Board files (.c and .h) - Default configuration file - Updates for Makefile Signed-off-by: Vaibhav Hiremath Signed-off-by: Sanjeev Premi --- Changes from V2: - Removed trailing spaces - Updated MAINTAINERS & MAKEALL for am3517_evm Changes from V3: - Corrected Maintainer entry to keep list sorted - Moved AM3537 macros to board header file MAINTAINERS |4 + MAKEALL |1 + Makefile|3 + board/logicpd/am3517evm/Makefile| 46 board/logicpd/am3517evm/am3517evm.c | 76 ++ board/logicpd/am3517evm/am3517evm.h | 445 +++ board/logicpd/am3517evm/config.mk | 30 +++ include/configs/am3517_evm.h| 296 +++ 8 files changed, 901 insertions(+), 0 deletions(-) create mode 100644 board/logicpd/am3517evm/Makefile create mode 100644 board/logicpd/am3517evm/am3517evm.c create mode 100644 board/logicpd/am3517evm/am3517evm.h create mode 100644 board/logicpd/am3517evm/config.mk create mode 100644 include/configs/am3517_evm.h diff --git a/MAINTAINERS b/MAINTAINERS index 7a13d28..3f9df78 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -600,6 +600,10 @@ Kshitij Gupta omap1510inn ARM925T omap1610inn ARM926EJS +Vaibhav Hiremath + + am3517_evm ARM CORTEX-A8 (AM35x SoC) + Grazvydas Ignotas omap3_pandora ARM CORTEX-A8 (OMAP3xx SoC) diff --git a/MAKEALL b/MAKEALL index 2527352..2066587 100755 --- a/MAKEALL +++ b/MAKEALL @@ -641,6 +641,7 @@ LIST_ARM11="\ ## ARM Cortex-A8 Systems # LIST_ARM_CORTEX_A8=" \ + am3517_evm \ devkit8000 \ mx51evk \ omap3_beagle\ diff --git a/Makefile b/Makefile index c26e491..b935c1a 100644 --- a/Makefile +++ b/Makefile @@ -3155,6 +3155,9 @@ SMN42_config : unconfig ## ARM CORTEX Systems # +am3517_evm_config :unconfig + @$(MKCONFIG) $(@:_config=) arm arm_cortexa8 am3517evm logicpd omap3 + devkit8000_config :unconfig @$(MKCONFIG) $(@:_config=) arm arm_cortexa8 devkit8000 timll omap3 diff --git a/board/logicpd/am3517evm/Makefile b/board/logicpd/am3517evm/Makefile new file mode 100644 index 000..3a6b1a1 --- /dev/null +++ b/board/logicpd/am3517evm/Makefile @@ -0,0 +1,46 @@ +# +# Author: Vaibhav Hiremath +# +# Based on ti/evm/Makefile +# +# Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/ +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# + +include $(TOPDIR)/config.mk + +LIB= $(obj)lib$(BOARD).a + +COBJS := am3517evm.o + +SRCS := $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) + +$(LIB):$(obj).depend $(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) + +clean: + rm -f $(OBJS) + +distclean: clean + rm -f $(LIB) core *.bak $(obj).depend + +# + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend diff --git a/board/logicpd/am3517evm/am3517evm.c b/board/logicpd/am3517evm/am3517evm.c new file mode 100644 index 000..bbb6e83 --- /dev/null +++ b/board/logicpd/am3517evm/am3517evm.c @@ -0,0 +1,76 @@ +/* + * am3517evm.c - board file for TI's AM3517 family of devices. + * + * Author: Vaibhav Hiremath + * + * Based on ti/evm/evm.c + * + * Copyright (C) 2010 + * Texas Instruments Incorporated - http://www.ti.com/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of
[U-Boot] [PATCH-V4 2/2] AM35x: Add support for EMIF4
From: Vaibhav Hiremath This patch adds support for the EMIF4 interface available in the AM35x processors. Signed-off-by: Vaibhav Hiremath Signed-off-by: Sanjeev Premi --- Changes from V2: - Removed all instances of #ifdef CONFIG_EMIF4 Changes from V3: - Corrected Makfile entry to keep list sorted - Unnecessary comments moved here arch/arm/cpu/arm_cortexa8/omap3/Makefile|1 + arch/arm/cpu/arm_cortexa8/omap3/emif4.c | 168 +++ arch/arm/include/asm/arch-omap3/cpu.h | 24 arch/arm/include/asm/arch-omap3/emif4.h | 79 + arch/arm/include/asm/arch-omap3/sys_proto.h |1 + include/configs/am3517_evm.h|2 +- 6 files changed, 274 insertions(+), 1 deletions(-) create mode 100644 arch/arm/cpu/arm_cortexa8/omap3/emif4.c create mode 100644 arch/arm/include/asm/arch-omap3/emif4.h diff --git a/arch/arm/cpu/arm_cortexa8/omap3/Makefile b/arch/arm/cpu/arm_cortexa8/omap3/Makefile index 1e80eb3..7d63c6b 100644 --- a/arch/arm/cpu/arm_cortexa8/omap3/Makefile +++ b/arch/arm/cpu/arm_cortexa8/omap3/Makefile @@ -37,6 +37,7 @@ COBJS += syslib.o COBJS += sys_info.o COBJS += timer.o +COBJS-$(CONFIG_EMIF4) += emif4.o COBJS-$(CONFIG_SDRC) += sdrc.o SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) diff --git a/arch/arm/cpu/arm_cortexa8/omap3/emif4.c b/arch/arm/cpu/arm_cortexa8/omap3/emif4.c new file mode 100644 index 000..fae5b11 --- /dev/null +++ b/arch/arm/cpu/arm_cortexa8/omap3/emif4.c @@ -0,0 +1,168 @@ +/* + * Author : + * Vaibhav Hiremath + * + * Based on mem.c and sdrc.c + * + * Copyright (C) 2010 + * Texas Instruments Incorporated - http://www.ti.com/ + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#include +#include +#include +#include +#include + +extern omap3_sysinfo sysinfo; + +static emif4_t *emif4_base = (emif4_t *)OMAP34XX_SDRC_BASE; + +/* + * is_mem_sdr - + * - Return 1 if mem type in use is SDR + */ +u32 is_mem_sdr(void) +{ + return 0; +} + +/* + * get_sdr_cs_size - + * - Get size of chip select 0/1 + */ +u32 get_sdr_cs_size(u32 cs) +{ + u32 size; + + /* TODO: Calculate the size based on EMIF4 configuration */ + size = CONFIG_SYS_CS0_SIZE; + + return size; +} + +/* + * get_sdr_cs_offset - + * - Get offset of cs from cs0 start + */ +u32 get_sdr_cs_offset(u32 cs) +{ + u32 offset = 0; + + return offset; +} + +/* + * do_emif4_init - + * - Init the emif4 module for DDR access + * - Early init routines, called from flash or SRAM. + */ +void do_emif4_init(void) +{ + unsigned int regval; + /* Set the DDR PHY parameters in PHY ctrl registers */ + regval = (EMIF4_DDR1_READ_LAT | EMIF4_DDR1_PWRDN_DIS | + EMIF4_DDR1_EXT_STRB_DIS); + writel(regval, &emif4_base->ddr_phyctrl1); + writel(regval, &emif4_base->ddr_phyctrl1_shdw); + writel(0, &emif4_base->ddr_phyctrl2); + + /* Reset the DDR PHY and wait till completed */ + regval = readl(&emif4_base->sdram_iodft_tlgc); + regval |= (1<<10); + writel(regval, &emif4_base->sdram_iodft_tlgc); + /*Wait till that bit clears*/ + while ((readl(&emif4_base->sdram_iodft_tlgc) & (1<<10)) == 0x1); + /*Re-verify the DDR PHY status*/ + while ((readl(&emif4_base->sdram_sts) & (1<<2)) == 0x0); + + regval |= (1<<0); + writel(regval, &emif4_base->sdram_iodft_tlgc); + /* Set SDR timing registers */ + regval = (EMIF4_TIM1_T_WTR | EMIF4_TIM1_T_RRD | + EMIF4_TIM1_T_RC | EMIF4_TIM1_T_RAS | + EMIF4_TIM1_T_WR | EMIF4_TIM1_T_RCD | + EMIF4_TIM1_T_RP); + writel(regval, &emif4_base->sdram_time1); + writel(regval, &emif4_base->sdram_time1_shdw); + + regval = (EMIF4_TIM2_T_CKE | EMIF4_TIM2_T_RTP | + EMIF4_TIM2_T_XSRD | EMIF4_TIM2_T_XSNR | + EMIF4_TIM2_T_ODT | EMIF4_TIM2_T_XP); + writel(regval, &emif4_base->sdram_time2); + writel(regval, &emif4_base->sdram_time2_shdw); + + regval = (EMIF4_TIM3_T_RAS_MAX | EMIF4_TIM3_T_RFC); + writel(regval, &emif4_base->sdram_time3); + writel(regval, &emif4_base->sdram_time3_shdw); + + /* Set the PWR control register */ + regval = (EMIF4_PWR_PM_TIM | EMIF4_PWR_LP_MODE | +
[U-Boot] [PATCH-V3 1/2] omap3: Calculate CS1 size only when SDRC is initialized for CS1
From: Vaibhav Hiremath The patch makes sure that size for SDRC CS1 gets calculated only when the CS1 SDRC is initialized. Signed-off-by: Vaibhav Hiremath --- arch/arm/cpu/arm_cortexa8/omap3/board.c |7 --- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/arm/cpu/arm_cortexa8/omap3/board.c b/arch/arm/cpu/arm_cortexa8/omap3/board.c index 7b78fa4..69a08fd 100644 --- a/arch/arm/cpu/arm_cortexa8/omap3/board.c +++ b/arch/arm/cpu/arm_cortexa8/omap3/board.c @@ -282,6 +282,8 @@ int dram_init(void) DECLARE_GLOBAL_DATA_PTR; unsigned int size0 = 0, size1 = 0; + size0 = get_sdr_cs_size(CS0); + /* * If a second bank of DDR is attached to CS1 this is * where it can be started. Early init code will init @@ -290,10 +292,9 @@ int dram_init(void) if ((sysinfo.mtype == DDR_COMBO) || (sysinfo.mtype == DDR_STACKED)) { do_sdrc_init(CS1, NOT_EARLY); make_cs1_contiguous(); - } - size0 = get_sdr_cs_size(CS0); - size1 = get_sdr_cs_size(CS1); + size1 = get_sdr_cs_size(CS1); + } gd->bd->bi_dram[0].start = PHYS_SDRAM_1; gd->bd->bi_dram[0].size = size0; -- 1.6.2.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH-V3 2/2] omap3: Consolidate SDRC related operations
From: Vaibhav Hiremath Consolidated SDRC related functions into one file - sdrc.c And also replaced sdrc_init with generic memory init function (mem_init), this generalization of omap memory setup is necessary to support the new emif4 interface introduced in AM3517. Signed-off-by: Vaibhav Hiremath --- Changes from V2: - Removed all instances of #ifdef CONFIG_SDRC Changes from V1: - Refreshed against latest denx/master arch/arm/cpu/arm_cortexa8/omap3/Makefile|4 +- arch/arm/cpu/arm_cortexa8/omap3/board.c | 35 +- arch/arm/cpu/arm_cortexa8/omap3/mem.c | 90 arch/arm/cpu/arm_cortexa8/omap3/sdrc.c | 202 +++ arch/arm/cpu/arm_cortexa8/omap3/sys_info.c | 41 -- arch/arm/include/asm/arch-omap3/cpu.h |1 + arch/arm/include/asm/arch-omap3/mem.h | 13 ++ arch/arm/include/asm/arch-omap3/sys_proto.h |2 - include/configs/devkit8000.h|2 + include/configs/omap3_beagle.h |2 + include/configs/omap3_evm.h |2 + include/configs/omap3_overo.h |2 + include/configs/omap3_pandora.h |2 + include/configs/omap3_sdp3430.h |2 + include/configs/omap3_zoom1.h |2 + include/configs/omap3_zoom2.h |2 + 16 files changed, 236 insertions(+), 168 deletions(-) create mode 100644 arch/arm/cpu/arm_cortexa8/omap3/sdrc.c diff --git a/arch/arm/cpu/arm_cortexa8/omap3/Makefile b/arch/arm/cpu/arm_cortexa8/omap3/Makefile index 136b163..1e80eb3 100644 --- a/arch/arm/cpu/arm_cortexa8/omap3/Makefile +++ b/arch/arm/cpu/arm_cortexa8/omap3/Makefile @@ -37,8 +37,10 @@ COBJS+= syslib.o COBJS += sys_info.o COBJS += timer.o +COBJS-$(CONFIG_SDRC) += sdrc.o + SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS)) +OBJS := $(addprefix $(obj),$(COBJS) $(COBJS-y) $(SOBJS)) all:$(obj).depend $(LIB) diff --git a/arch/arm/cpu/arm_cortexa8/omap3/board.c b/arch/arm/cpu/arm_cortexa8/omap3/board.c index 69a08fd..d2500ca 100644 --- a/arch/arm/cpu/arm_cortexa8/omap3/board.c +++ b/arch/arm/cpu/arm_cortexa8/omap3/board.c @@ -40,8 +40,6 @@ extern omap3_sysinfo sysinfo; -extern u32 is_mem_sdr(void); - /** * Routine: delay * Description: spinning delay to use before udelay works @@ -233,7 +231,7 @@ void s_init(void) per_clocks_enable(); if (!in_sdram) - sdrc_init(); + mem_init(); } /** @@ -274,37 +272,6 @@ void watchdog_init(void) } /** - * Routine: dram_init - * Description: sets uboots idea of sdram size - */ -int dram_init(void) -{ - DECLARE_GLOBAL_DATA_PTR; - unsigned int size0 = 0, size1 = 0; - - size0 = get_sdr_cs_size(CS0); - - /* -* If a second bank of DDR is attached to CS1 this is -* where it can be started. Early init code will init -* memory on CS0. -*/ - if ((sysinfo.mtype == DDR_COMBO) || (sysinfo.mtype == DDR_STACKED)) { - do_sdrc_init(CS1, NOT_EARLY); - make_cs1_contiguous(); - - size1 = get_sdr_cs_size(CS1); - } - - gd->bd->bi_dram[0].start = PHYS_SDRAM_1; - gd->bd->bi_dram[0].size = size0; - gd->bd->bi_dram[1].start = PHYS_SDRAM_1 + get_sdr_cs_offset(CS1); - gd->bd->bi_dram[1].size = size1; - - return 0; -} - -/** * Dummy function to handle errors for EABI incompatibility */ void abort(void) diff --git a/arch/arm/cpu/arm_cortexa8/omap3/mem.c b/arch/arm/cpu/arm_cortexa8/omap3/mem.c index dfb7e4c..bd914b0 100644 --- a/arch/arm/cpu/arm_cortexa8/omap3/mem.c +++ b/arch/arm/cpu/arm_cortexa8/omap3/mem.c @@ -79,26 +79,6 @@ static const u32 gpmc_onenand[GPMC_MAX_REG] = { #endif -static struct sdrc *sdrc_base = (struct sdrc *)OMAP34XX_SDRC_BASE; - -/** - * make_cs1_contiguous() - for es2 and above remap cs1 behind cs0 to allow - * command line mem=xyz use all memory with out discontinuous support - * compiled in. Could do it at the ATAG, but there really is two banks... - * Called as part of 2nd phase DDR init. - **/ -void make_cs1_contiguous(void) -{ - u32 size, a_add_low, a_add_high; - - size = get_sdr_cs_size(CS0); - size >>= 25;/* divide by 32 MiB to find size to offset CS1 */ - a_add_high = (size & 3) << 8; /* set
[U-Boot] [PATCH-V4] OMAP3EVM: Added NAND support
From: Vaibhav Hiremath The EVMS have been shipping with NAND (instead of OneNAND) as default. So, this patch sets NAND as default. To choose OneNAND, define CMD_ONENAND instead of CMD_NAND in the config file omap3_evm.h. Signed-off-by: Vaibhav Hiremath --- Changes from V3 :- - Added undef statement for CMD_ONENAND. include/configs/omap3_evm.h |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/include/configs/omap3_evm.h b/include/configs/omap3_evm.h index 0d99f7d..88af492 100644 --- a/include/configs/omap3_evm.h +++ b/include/configs/omap3_evm.h @@ -151,7 +151,7 @@ #define CONFIG_CMD_I2C /* I2C serial bus support */ #define CONFIG_CMD_MMC /* MMC support */ -#define CONFIG_CMD_ONENAND /* ONENAND support */ +#define CONFIG_CMD_NAND/* NAND support */ #define CONFIG_CMD_DHCP #define CONFIG_CMD_PING @@ -306,7 +306,13 @@ #define CONFIG_SYS_MONITOR_BASECONFIG_SYS_FLASH_BASE #define CONFIG_SYS_ONENAND_BASEONENAND_MAP +#if defined(CONFIG_CMD_NAND) +#define CONFIG_NAND_OMAP_GPMC +#define GPMC_NAND_ECC_LP_x16_LAYOUT1 +#define CONFIG_ENV_IS_IN_NAND +#elif defined(CONFIG_CMD_ONENAND) #define CONFIG_ENV_IS_IN_ONENAND 1 +#endif #define ONENAND_ENV_OFFSET 0x26 /* environment starts here */ #define SMNAND_ENV_OFFSET 0x26 /* environment starts here */ -- 1.6.2.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH-V3 2/2] AM35x: Add support for EMIF4
From: Vaibhav Hiremath This patch adds support for the EMIF4 interface available in the AM35x processors. Changes from V2: - Removed all instances of #ifdef CONFIG_EMIF4 Signed-off-by: Vaibhav Hiremath Signed-off-by: Sanjeev Premi --- arch/arm/cpu/arm_cortexa8/omap3/Makefile|1 + arch/arm/cpu/arm_cortexa8/omap3/emif4.c | 168 +++ arch/arm/include/asm/arch-omap3/cpu.h | 24 arch/arm/include/asm/arch-omap3/emif4.h | 79 + arch/arm/include/asm/arch-omap3/sys_proto.h |1 + include/configs/am3517_evm.h|2 +- 6 files changed, 274 insertions(+), 1 deletions(-) create mode 100644 arch/arm/cpu/arm_cortexa8/omap3/emif4.c create mode 100644 arch/arm/include/asm/arch-omap3/emif4.h diff --git a/arch/arm/cpu/arm_cortexa8/omap3/Makefile b/arch/arm/cpu/arm_cortexa8/omap3/Makefile index 1e80eb3..d25bfd5 100644 --- a/arch/arm/cpu/arm_cortexa8/omap3/Makefile +++ b/arch/arm/cpu/arm_cortexa8/omap3/Makefile @@ -38,6 +38,7 @@ COBJS += sys_info.o COBJS += timer.o COBJS-$(CONFIG_SDRC) += sdrc.o +COBJS-$(CONFIG_EMIF4) +=emif4.o SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS) $(COBJS-y) $(SOBJS)) diff --git a/arch/arm/cpu/arm_cortexa8/omap3/emif4.c b/arch/arm/cpu/arm_cortexa8/omap3/emif4.c new file mode 100644 index 000..fae5b11 --- /dev/null +++ b/arch/arm/cpu/arm_cortexa8/omap3/emif4.c @@ -0,0 +1,168 @@ +/* + * Author : + * Vaibhav Hiremath + * + * Based on mem.c and sdrc.c + * + * Copyright (C) 2010 + * Texas Instruments Incorporated - http://www.ti.com/ + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#include +#include +#include +#include +#include + +extern omap3_sysinfo sysinfo; + +static emif4_t *emif4_base = (emif4_t *)OMAP34XX_SDRC_BASE; + +/* + * is_mem_sdr - + * - Return 1 if mem type in use is SDR + */ +u32 is_mem_sdr(void) +{ + return 0; +} + +/* + * get_sdr_cs_size - + * - Get size of chip select 0/1 + */ +u32 get_sdr_cs_size(u32 cs) +{ + u32 size; + + /* TODO: Calculate the size based on EMIF4 configuration */ + size = CONFIG_SYS_CS0_SIZE; + + return size; +} + +/* + * get_sdr_cs_offset - + * - Get offset of cs from cs0 start + */ +u32 get_sdr_cs_offset(u32 cs) +{ + u32 offset = 0; + + return offset; +} + +/* + * do_emif4_init - + * - Init the emif4 module for DDR access + * - Early init routines, called from flash or SRAM. + */ +void do_emif4_init(void) +{ + unsigned int regval; + /* Set the DDR PHY parameters in PHY ctrl registers */ + regval = (EMIF4_DDR1_READ_LAT | EMIF4_DDR1_PWRDN_DIS | + EMIF4_DDR1_EXT_STRB_DIS); + writel(regval, &emif4_base->ddr_phyctrl1); + writel(regval, &emif4_base->ddr_phyctrl1_shdw); + writel(0, &emif4_base->ddr_phyctrl2); + + /* Reset the DDR PHY and wait till completed */ + regval = readl(&emif4_base->sdram_iodft_tlgc); + regval |= (1<<10); + writel(regval, &emif4_base->sdram_iodft_tlgc); + /*Wait till that bit clears*/ + while ((readl(&emif4_base->sdram_iodft_tlgc) & (1<<10)) == 0x1); + /*Re-verify the DDR PHY status*/ + while ((readl(&emif4_base->sdram_sts) & (1<<2)) == 0x0); + + regval |= (1<<0); + writel(regval, &emif4_base->sdram_iodft_tlgc); + /* Set SDR timing registers */ + regval = (EMIF4_TIM1_T_WTR | EMIF4_TIM1_T_RRD | + EMIF4_TIM1_T_RC | EMIF4_TIM1_T_RAS | + EMIF4_TIM1_T_WR | EMIF4_TIM1_T_RCD | + EMIF4_TIM1_T_RP); + writel(regval, &emif4_base->sdram_time1); + writel(regval, &emif4_base->sdram_time1_shdw); + + regval = (EMIF4_TIM2_T_CKE | EMIF4_TIM2_T_RTP | + EMIF4_TIM2_T_XSRD | EMIF4_TIM2_T_XSNR | + EMIF4_TIM2_T_ODT | EMIF4_TIM2_T_XP); + writel(regval, &emif4_base->sdram_time2); + writel(regval, &emif4_base->sdram_time2_shdw); + + regval = (EMIF4_TIM3_T_RAS_MAX | EMIF4_TIM3_T_RFC); + writel(regval, &emif4_base->sdram_time3); + writel(regval, &emif4_base->sdram_time3_shdw); + + /* Set the PWR control register */ + regval = (EMIF4_PWR_PM_TIM | EMIF4_PWR_LP_MODE | + EMIF4_PWR_DPD_DIS | EMIF4_PWR_IDLE_MODE); + writel(regval, &
[U-Boot] [PATCH-V3 1/2] AM35x: Add support for AM3517EVM
From: Vaibhav Hiremath This patch adds basic support for the AM3517EVM. It includes: - Board int file (.c and .h) - Default configuration file - Updates for Makefile Changes from V2: - Removed trailing spaces - Updated MAINTAINERS & MAKEALL for am3517_evm Signed-off-by: Vaibhav Hiremath Signed-off-by: Sanjeev Premi --- MAINTAINERS |4 + MAKEALL |1 + Makefile |3 + arch/arm/include/asm/arch-omap3/mux.h | 38 +++- board/logicpd/am3517evm/Makefile | 46 board/logicpd/am3517evm/am3517evm.c | 76 ++ board/logicpd/am3517evm/am3517evm.h | 405 + board/logicpd/am3517evm/config.mk | 30 +++ include/configs/am3517_evm.h | 296 9 files changed, 898 insertions(+), 1 deletions(-) create mode 100644 board/logicpd/am3517evm/Makefile create mode 100644 board/logicpd/am3517evm/am3517evm.c create mode 100644 board/logicpd/am3517evm/am3517evm.h create mode 100644 board/logicpd/am3517evm/config.mk create mode 100644 include/configs/am3517_evm.h diff --git a/MAINTAINERS b/MAINTAINERS index 5cbc845..0bc65e1 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -798,6 +798,10 @@ Alex Z lartSA1100 dnp1110 SA1110 +Vaibhav Hiremath + + am3517_evm ARM CORTEX-A8 (AM35x SoC) + - Unknown / orphaned boards: diff --git a/MAKEALL b/MAKEALL index bb09627..cd59daa 100755 --- a/MAKEALL +++ b/MAKEALL @@ -641,6 +641,7 @@ LIST_ARM11="\ ## ARM Cortex-A8 Systems # LIST_ARM_CORTEX_A8=" \ + am3517_evm \ devkit8000 \ mx51evk \ omap3_beagle\ diff --git a/Makefile b/Makefile index 2d96574..57b3491 100644 --- a/Makefile +++ b/Makefile @@ -3155,6 +3155,9 @@ SMN42_config : unconfig ## ARM CORTEX Systems # +am3517_evm_config :unconfig + @$(MKCONFIG) $(@:_config=) arm arm_cortexa8 am3517evm logicpd omap3 + devkit8000_config :unconfig @$(MKCONFIG) $(@:_config=) arm arm_cortexa8 devkit8000 timll omap3 diff --git a/arch/arm/include/asm/arch-omap3/mux.h b/arch/arm/include/asm/arch-omap3/mux.h index 0c01c73..ffeb982 100644 --- a/arch/arm/include/asm/arch-omap3/mux.h +++ b/arch/arm/include/asm/arch-omap3/mux.h @@ -283,7 +283,7 @@ /*Control and debug */ #define CONTROL_PADCONF_SYS_32K0x0A04 #define CONTROL_PADCONF_SYS_CLKREQ 0x0A06 -#define CONTROL_PADCONF_SYS_NIRQ 0x01E0 +#define CONTROL_PADCONF_SYS_NRESWARM 0x0A08 #define CONTROL_PADCONF_SYS_BOOT0 0x0A0A #define CONTROL_PADCONF_SYS_BOOT1 0x0A0C #define CONTROL_PADCONF_SYS_BOOT2 0x0A0E @@ -337,6 +337,7 @@ #define CONTROL_PADCONF_ETK_D14_ES20x05F8 #define CONTROL_PADCONF_ETK_D15_ES20x05FA /*Die to Die */ +#define CONTROL_PADCONF_SYS_NIRQ 0x01E0 #define CONTROL_PADCONF_D2D_MCAD0 0x01E4 #define CONTROL_PADCONF_D2D_MCAD1 0x01E6 #define CONTROL_PADCONF_D2D_MCAD2 0x01E8 @@ -403,6 +404,41 @@ #define CONTROL_PADCONF_D2D_SBUSFLAG 0x0260 #define CONTROL_PADCONF_SDRC_CKE0 0x0262 #define CONTROL_PADCONF_SDRC_CKE1 0x0264 +/* AM3517 specific */ +#define CONTROL_PADCONF_CCDC_PCLK 0x01E4 +#define CONTROL_PADCONF_CCDC_FIELD 0x01E6 +#define CONTROL_PADCONF_CCDC_HD0x01E8 +#define CONTROL_PADCONF_CCDC_VD0x01EA +#define CONTROL_PADCONF_CCDC_WEN 0x01EC +#define CONTROL_PADCONF_CCDC_DATA0 0x01EE +#define CONTROL_PADCONF_CCDC_DATA1 0x01F0 +#define CONTROL_PADCONF_CCDC_DATA2 0x01F2 +#define CONTROL_PADCONF_CCDC_DATA3 0x01F4 +#define CONTROL_PADCONF_CCDC_DATA4 0x01F6 +#define CONTROL_PADCONF_CCDC_DATA5 0x01F8 +#define CONTROL_PADCONF_CCDC_DATA6 0x01FA +#define CONTROL_PADCONF_CCDC_DATA7 0x01FC +#define CONTROL_PADCONF_RMII_MDIO_DATA 0x01FE +#define CONTROL_PADCONF_RMII_MDIO_CLK 0x0200 +#define CONTROL_PADCONF_RMII_RXD0 0x0202 +#define CONTROL_PADCONF_RMII_RXD1 0x0204 +#define CONTROL_PADCONF_RMII_CRS_DV0x0206 +#define CONTROL_PADCONF_RMII_RXER 0x0208 +#define CONTROL_PADCONF_RMII_TXD0 0x020A +#define CONTROL_PADCONF_RMII_TXD1 0x020C +#define CONTROL_PADCONF_RMII_TXEN 0x020E +#define CONTROL_PADCONF_RMII_50MHZ_CLK 0x0210 +#define CONTROL_PADCONF_USB0_DRVBUS0x0212 +#define CONTROL_PADCONF_HECC1_TXD 0x0214 +#define CONTROL_PADCONF_HECC1_RXD 0x0216 +#define CONTROL_PADCONF_SYS_BOOT7 0x0218 +#define CONTROL_PADCONF_SDRC_DQS0N 0x021A +#define CONTROL_PADCONF_SDRC_DQS1N 0x021C +#define CONTROL_PADCONF_SDRC_DQS2N 0x021E +#define CONTROL_PADCONF_SDRC_
[U-Boot] [PATCH-V3 1/2] omap3: Calculate CS1 size only when SDRC is initialized for CS1
From: Vaibhav Hiremath The patch makes sure that size for SDRC CS1 gets calculated only when the CS1 SDRC is initialized. Signed-off-by: Vaibhav Hiremath Signed-off-by: Sanjeev Premi --- arch/arm/cpu/arm_cortexa8/omap3/board.c |7 --- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/arm/cpu/arm_cortexa8/omap3/board.c b/arch/arm/cpu/arm_cortexa8/omap3/board.c index 7b78fa4..69a08fd 100644 --- a/arch/arm/cpu/arm_cortexa8/omap3/board.c +++ b/arch/arm/cpu/arm_cortexa8/omap3/board.c @@ -282,6 +282,8 @@ int dram_init(void) DECLARE_GLOBAL_DATA_PTR; unsigned int size0 = 0, size1 = 0; + size0 = get_sdr_cs_size(CS0); + /* * If a second bank of DDR is attached to CS1 this is * where it can be started. Early init code will init @@ -290,10 +292,9 @@ int dram_init(void) if ((sysinfo.mtype == DDR_COMBO) || (sysinfo.mtype == DDR_STACKED)) { do_sdrc_init(CS1, NOT_EARLY); make_cs1_contiguous(); - } - size0 = get_sdr_cs_size(CS0); - size1 = get_sdr_cs_size(CS1); + size1 = get_sdr_cs_size(CS1); + } gd->bd->bi_dram[0].start = PHYS_SDRAM_1; gd->bd->bi_dram[0].size = size0; -- 1.6.2.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH-V3 2/2] omap3: Consolidate SDRC related operations
From: Vaibhav Hiremath Consolidated SDRC related functions into one file - sdrc.c And also replaced sdrc_init with generic memory init function (mem_init), this generalization of omap memory setup is necessary to support the new emif4 interface introduced in AM3517. Changes from V2: - Removed all instances of #ifdef CONFIG_SDRC Changes from V1: - Refreshed against latest denx/master Signed-off-by: Vaibhav Hiremath Signed-off-by: Sanjeev Premi --- arch/arm/cpu/arm_cortexa8/omap3/Makefile|4 +- arch/arm/cpu/arm_cortexa8/omap3/board.c | 35 +- arch/arm/cpu/arm_cortexa8/omap3/mem.c | 90 arch/arm/cpu/arm_cortexa8/omap3/sdrc.c | 202 +++ arch/arm/cpu/arm_cortexa8/omap3/sys_info.c | 41 -- arch/arm/include/asm/arch-omap3/cpu.h |1 + arch/arm/include/asm/arch-omap3/mem.h | 13 ++ arch/arm/include/asm/arch-omap3/sys_proto.h |2 - include/configs/devkit8000.h|2 + include/configs/omap3_beagle.h |2 + include/configs/omap3_evm.h |2 + include/configs/omap3_overo.h |2 + include/configs/omap3_pandora.h |2 + include/configs/omap3_sdp3430.h |2 + include/configs/omap3_zoom1.h |2 + include/configs/omap3_zoom2.h |2 + 16 files changed, 236 insertions(+), 168 deletions(-) create mode 100644 arch/arm/cpu/arm_cortexa8/omap3/sdrc.c diff --git a/arch/arm/cpu/arm_cortexa8/omap3/Makefile b/arch/arm/cpu/arm_cortexa8/omap3/Makefile index 136b163..1e80eb3 100644 --- a/arch/arm/cpu/arm_cortexa8/omap3/Makefile +++ b/arch/arm/cpu/arm_cortexa8/omap3/Makefile @@ -37,8 +37,10 @@ COBJS+= syslib.o COBJS += sys_info.o COBJS += timer.o +COBJS-$(CONFIG_SDRC) += sdrc.o + SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS)) +OBJS := $(addprefix $(obj),$(COBJS) $(COBJS-y) $(SOBJS)) all:$(obj).depend $(LIB) diff --git a/arch/arm/cpu/arm_cortexa8/omap3/board.c b/arch/arm/cpu/arm_cortexa8/omap3/board.c index 69a08fd..d2500ca 100644 --- a/arch/arm/cpu/arm_cortexa8/omap3/board.c +++ b/arch/arm/cpu/arm_cortexa8/omap3/board.c @@ -40,8 +40,6 @@ extern omap3_sysinfo sysinfo; -extern u32 is_mem_sdr(void); - /** * Routine: delay * Description: spinning delay to use before udelay works @@ -233,7 +231,7 @@ void s_init(void) per_clocks_enable(); if (!in_sdram) - sdrc_init(); + mem_init(); } /** @@ -274,37 +272,6 @@ void watchdog_init(void) } /** - * Routine: dram_init - * Description: sets uboots idea of sdram size - */ -int dram_init(void) -{ - DECLARE_GLOBAL_DATA_PTR; - unsigned int size0 = 0, size1 = 0; - - size0 = get_sdr_cs_size(CS0); - - /* -* If a second bank of DDR is attached to CS1 this is -* where it can be started. Early init code will init -* memory on CS0. -*/ - if ((sysinfo.mtype == DDR_COMBO) || (sysinfo.mtype == DDR_STACKED)) { - do_sdrc_init(CS1, NOT_EARLY); - make_cs1_contiguous(); - - size1 = get_sdr_cs_size(CS1); - } - - gd->bd->bi_dram[0].start = PHYS_SDRAM_1; - gd->bd->bi_dram[0].size = size0; - gd->bd->bi_dram[1].start = PHYS_SDRAM_1 + get_sdr_cs_offset(CS1); - gd->bd->bi_dram[1].size = size1; - - return 0; -} - -/** * Dummy function to handle errors for EABI incompatibility */ void abort(void) diff --git a/arch/arm/cpu/arm_cortexa8/omap3/mem.c b/arch/arm/cpu/arm_cortexa8/omap3/mem.c index dfb7e4c..bd914b0 100644 --- a/arch/arm/cpu/arm_cortexa8/omap3/mem.c +++ b/arch/arm/cpu/arm_cortexa8/omap3/mem.c @@ -79,26 +79,6 @@ static const u32 gpmc_onenand[GPMC_MAX_REG] = { #endif -static struct sdrc *sdrc_base = (struct sdrc *)OMAP34XX_SDRC_BASE; - -/** - * make_cs1_contiguous() - for es2 and above remap cs1 behind cs0 to allow - * command line mem=xyz use all memory with out discontinuous support - * compiled in. Could do it at the ATAG, but there really is two banks... - * Called as part of 2nd phase DDR init. - **/ -void make_cs1_contiguous(void) -{ - u32 size, a_add_low, a_add_high; - - size = get_sdr_cs_size(CS0); - size >>= 25;/* divide by 32 MiB to find size to offset CS1 */ - a_add_hig
[U-Boot] [PATCH-V5] OMAP3EVM: Added NAND support
From: Vaibhav Hiremath The EVMS have been shipping with NAND (instead of OneNAND) as default. So, this patch sets NAND as default. To choose OneNAND, define CMD_ONENAND instead of CMD_NAND in the config file omap3_evm.h, Changes From V4 :- - Removed #undef ONENAND line (comment from Denk) Changes from V3 :- - Refreshed against latest u-boot/master Changes from V2 :- - Added undef statement for CMD_ONENAND. Signed-off-by: Vaibhav Hiremath --- include/configs/omap3_evm.h |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/include/configs/omap3_evm.h b/include/configs/omap3_evm.h index 0d99f7d..88af492 100644 --- a/include/configs/omap3_evm.h +++ b/include/configs/omap3_evm.h @@ -151,7 +151,7 @@ #define CONFIG_CMD_I2C /* I2C serial bus support */ #define CONFIG_CMD_MMC /* MMC support */ -#define CONFIG_CMD_ONENAND /* ONENAND support */ +#define CONFIG_CMD_NAND/* NAND support */ #define CONFIG_CMD_DHCP #define CONFIG_CMD_PING @@ -306,7 +306,13 @@ #define CONFIG_SYS_MONITOR_BASECONFIG_SYS_FLASH_BASE #define CONFIG_SYS_ONENAND_BASEONENAND_MAP +#if defined(CONFIG_CMD_NAND) +#define CONFIG_NAND_OMAP_GPMC +#define GPMC_NAND_ECC_LP_x16_LAYOUT1 +#define CONFIG_ENV_IS_IN_NAND +#elif defined(CONFIG_CMD_ONENAND) #define CONFIG_ENV_IS_IN_ONENAND 1 +#endif #define ONENAND_ENV_OFFSET 0x26 /* environment starts here */ #define SMNAND_ENV_OFFSET 0x26 /* environment starts here */ -- 1.6.2.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH-V2 3/4] AM35x: Add support for AM3517EVM
From: Vaibhav Hiremath This patch adds basic support for the AM3517EVM. It includes: - Board int file (.c and .h) - Default configuration file - Updates for Makefile Signed-off-by: Vaibhav Hiremath Signed-off-by: Sanjeev Premi --- Makefile |3 + arch/arm/include/asm/arch-omap3/mux.h | 36 +++ board/logicpd/am3517evm/Makefile | 47 board/logicpd/am3517evm/am3517evm.c | 76 ++ board/logicpd/am3517evm/am3517evm.h | 405 + board/logicpd/am3517evm/config.mk | 30 +++ include/configs/am3517_evm.h | 297 7 files changed, 894 insertions(+), 0 deletions(-) create mode 100644 board/logicpd/am3517evm/Makefile create mode 100644 board/logicpd/am3517evm/am3517evm.c create mode 100644 board/logicpd/am3517evm/am3517evm.h create mode 100644 board/logicpd/am3517evm/config.mk create mode 100644 include/configs/am3517_evm.h diff --git a/Makefile b/Makefile index 34f10ce..487ae73 100644 --- a/Makefile +++ b/Makefile @@ -3169,6 +3169,9 @@ omap3_zoom1_config : unconfig omap3_zoom2_config : unconfig @$(MKCONFIG) $(@:_config=) arm arm_cortexa8 zoom2 logicpd omap3 +am3517_evm_config :unconfig + @$(MKCONFIG) $(@:_config=) arm arm_cortexa8 am3517evm logicpd omap3 + smdkc100_config: unconfig @$(MKCONFIG) $(@:_config=) arm arm_cortexa8 smdkc100 samsung s5pc1xx diff --git a/arch/arm/include/asm/arch-omap3/mux.h b/arch/arm/include/asm/arch-omap3/mux.h index 0c01c73..8ea47b6 100644 --- a/arch/arm/include/asm/arch-omap3/mux.h +++ b/arch/arm/include/asm/arch-omap3/mux.h @@ -283,6 +283,7 @@ /*Control and debug */ #define CONTROL_PADCONF_SYS_32K0x0A04 #define CONTROL_PADCONF_SYS_CLKREQ 0x0A06 +#define CONTROL_PADCONF_SYS_NRESWARM 0x0A08 #define CONTROL_PADCONF_SYS_NIRQ 0x01E0 #define CONTROL_PADCONF_SYS_BOOT0 0x0A0A #define CONTROL_PADCONF_SYS_BOOT1 0x0A0C @@ -403,6 +404,41 @@ #define CONTROL_PADCONF_D2D_SBUSFLAG 0x0260 #define CONTROL_PADCONF_SDRC_CKE0 0x0262 #define CONTROL_PADCONF_SDRC_CKE1 0x0264 +/* AM3517 specific */ +#define CONTROL_PADCONF_CCDC_PCLK 0x01E4 +#define CONTROL_PADCONF_CCDC_FIELD 0x01E6 +#define CONTROL_PADCONF_CCDC_HD0x01E8 +#define CONTROL_PADCONF_CCDC_VD0x01EA +#define CONTROL_PADCONF_CCDC_WEN 0x01EC +#define CONTROL_PADCONF_CCDC_DATA0 0x01EE +#define CONTROL_PADCONF_CCDC_DATA1 0x01F0 +#define CONTROL_PADCONF_CCDC_DATA2 0x01F2 +#define CONTROL_PADCONF_CCDC_DATA3 0x01F4 +#define CONTROL_PADCONF_CCDC_DATA4 0x01F6 +#define CONTROL_PADCONF_CCDC_DATA5 0x01F8 +#define CONTROL_PADCONF_CCDC_DATA6 0x01FA +#define CONTROL_PADCONF_CCDC_DATA7 0x01FC +#define CONTROL_PADCONF_RMII_MDIO_DATA 0x01FE +#define CONTROL_PADCONF_RMII_MDIO_CLK 0x0200 +#define CONTROL_PADCONF_RMII_RXD0 0x0202 +#define CONTROL_PADCONF_RMII_RXD1 0x0204 +#define CONTROL_PADCONF_RMII_CRS_DV0x0206 +#define CONTROL_PADCONF_RMII_RXER 0x0208 +#define CONTROL_PADCONF_RMII_TXD0 0x020A +#define CONTROL_PADCONF_RMII_TXD1 0x020C +#define CONTROL_PADCONF_RMII_TXEN 0x020E +#define CONTROL_PADCONF_RMII_50MHZ_CLK 0x0210 +#define CONTROL_PADCONF_USB0_DRVBUS0x0212 +#define CONTROL_PADCONF_HECC1_TXD 0x0214 +#define CONTROL_PADCONF_HECC1_RXD 0x0216 +#define CONTROL_PADCONF_SYS_BOOT7 0x0218 +#define CONTROL_PADCONF_SDRC_DQS0N 0x021A +#define CONTROL_PADCONF_SDRC_DQS1N 0x021C +#define CONTROL_PADCONF_SDRC_DQS2N 0x021E +#define CONTROL_PADCONF_SDRC_DQS3N 0x0220 +#define CONTROL_PADCONF_STRBEN_DLY00x0222 +#define CONTROL_PADCONF_STRBEN_DLY10x0224 +#define CONTROL_PADCONF_SYS_BOOT8 0x0226 #define MUX_VAL(OFFSET,VALUE)\ writew((VALUE), OMAP34XX_CTRL_BASE + (OFFSET)); diff --git a/board/logicpd/am3517evm/Makefile b/board/logicpd/am3517evm/Makefile new file mode 100644 index 000..3c71fef --- /dev/null +++ b/board/logicpd/am3517evm/Makefile @@ -0,0 +1,47 @@ +# +# Author: Vaibhav Hiremath +# +# Based on ti/evm/Makefile +# +# Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/ +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# + +include $(TOPDIR)/config.mk + +LIB= $(obj)lib$(BOARD).a + +C
[U-Boot] [PATCH-V2 2/4] omap3: Consolidate SDRC related operations
From: Vaibhav Hiremath Consolidated SDRC related functions into one file - sdrc.c And also replaced sdrc_init with generic memory init function (mem_init), this generalization of omap memory setup is necessary to support the new emif4 interface introduced in AM3517. Signed-off-by: Vaibhav Hiremath Signed-off-by: Sanjeev Premi --- arch/arm/cpu/arm_cortexa8/omap3/Makefile|3 + arch/arm/cpu/arm_cortexa8/omap3/board.c | 35 +- arch/arm/cpu/arm_cortexa8/omap3/mem.c | 90 arch/arm/cpu/arm_cortexa8/omap3/sdrc.c | 202 +++ arch/arm/cpu/arm_cortexa8/omap3/sys_info.c | 41 -- arch/arm/include/asm/arch-omap3/cpu.h |3 + arch/arm/include/asm/arch-omap3/mem.h | 13 ++ arch/arm/include/asm/arch-omap3/sys_proto.h |4 +- include/configs/devkit8000.h|2 + include/configs/omap3_beagle.h |2 + include/configs/omap3_evm.h |2 + include/configs/omap3_overo.h |2 + include/configs/omap3_pandora.h |2 + include/configs/omap3_sdp3430.h |2 + include/configs/omap3_zoom1.h |2 + include/configs/omap3_zoom2.h |2 + 16 files changed, 240 insertions(+), 167 deletions(-) create mode 100644 arch/arm/cpu/arm_cortexa8/omap3/sdrc.c diff --git a/arch/arm/cpu/arm_cortexa8/omap3/Makefile b/arch/arm/cpu/arm_cortexa8/omap3/Makefile index 136b163..8cc7802 100644 --- a/arch/arm/cpu/arm_cortexa8/omap3/Makefile +++ b/arch/arm/cpu/arm_cortexa8/omap3/Makefile @@ -33,6 +33,9 @@ COBJS += board.o COBJS += clock.o COBJS += gpio.o COBJS += mem.o +ifdef CONFIG_SDRC +COBJS += sdrc.o +endif COBJS += syslib.o COBJS += sys_info.o COBJS += timer.o diff --git a/arch/arm/cpu/arm_cortexa8/omap3/board.c b/arch/arm/cpu/arm_cortexa8/omap3/board.c index 69a08fd..d2500ca 100644 --- a/arch/arm/cpu/arm_cortexa8/omap3/board.c +++ b/arch/arm/cpu/arm_cortexa8/omap3/board.c @@ -40,8 +40,6 @@ extern omap3_sysinfo sysinfo; -extern u32 is_mem_sdr(void); - /** * Routine: delay * Description: spinning delay to use before udelay works @@ -233,7 +231,7 @@ void s_init(void) per_clocks_enable(); if (!in_sdram) - sdrc_init(); + mem_init(); } /** @@ -274,37 +272,6 @@ void watchdog_init(void) } /** - * Routine: dram_init - * Description: sets uboots idea of sdram size - */ -int dram_init(void) -{ - DECLARE_GLOBAL_DATA_PTR; - unsigned int size0 = 0, size1 = 0; - - size0 = get_sdr_cs_size(CS0); - - /* -* If a second bank of DDR is attached to CS1 this is -* where it can be started. Early init code will init -* memory on CS0. -*/ - if ((sysinfo.mtype == DDR_COMBO) || (sysinfo.mtype == DDR_STACKED)) { - do_sdrc_init(CS1, NOT_EARLY); - make_cs1_contiguous(); - - size1 = get_sdr_cs_size(CS1); - } - - gd->bd->bi_dram[0].start = PHYS_SDRAM_1; - gd->bd->bi_dram[0].size = size0; - gd->bd->bi_dram[1].start = PHYS_SDRAM_1 + get_sdr_cs_offset(CS1); - gd->bd->bi_dram[1].size = size1; - - return 0; -} - -/** * Dummy function to handle errors for EABI incompatibility */ void abort(void) diff --git a/arch/arm/cpu/arm_cortexa8/omap3/mem.c b/arch/arm/cpu/arm_cortexa8/omap3/mem.c index dfb7e4c..bd914b0 100644 --- a/arch/arm/cpu/arm_cortexa8/omap3/mem.c +++ b/arch/arm/cpu/arm_cortexa8/omap3/mem.c @@ -79,26 +79,6 @@ static const u32 gpmc_onenand[GPMC_MAX_REG] = { #endif -static struct sdrc *sdrc_base = (struct sdrc *)OMAP34XX_SDRC_BASE; - -/** - * make_cs1_contiguous() - for es2 and above remap cs1 behind cs0 to allow - * command line mem=xyz use all memory with out discontinuous support - * compiled in. Could do it at the ATAG, but there really is two banks... - * Called as part of 2nd phase DDR init. - **/ -void make_cs1_contiguous(void) -{ - u32 size, a_add_low, a_add_high; - - size = get_sdr_cs_size(CS0); - size >>= 25;/* divide by 32 MiB to find size to offset CS1 */ - a_add_high = (size & 3) << 8; /* set up low field */ - a_add_low = (size & 0x3C) >> 2; /* set up high field */ - writel((a_add_high | a_add_low), &sdrc_base->cs_cfg); - -} - / * me
[U-Boot] [PATCH-V2 4/4] AM35x: Add support for EMIF4
From: Vaibhav Hiremath This patch adds support for the EMIF4 interface available in the AM35x processors. Signed-off-by: Vaibhav Hiremath Signed-off-by: Sanjeev Premi --- arch/arm/cpu/arm_cortexa8/omap3/Makefile|3 + arch/arm/cpu/arm_cortexa8/omap3/emif4.c | 168 +++ arch/arm/include/asm/arch-omap3/cpu.h | 24 arch/arm/include/asm/arch-omap3/emif4.h | 79 + arch/arm/include/asm/arch-omap3/sys_proto.h |3 + 5 files changed, 277 insertions(+), 0 deletions(-) create mode 100644 arch/arm/cpu/arm_cortexa8/omap3/emif4.c create mode 100644 arch/arm/include/asm/arch-omap3/emif4.h diff --git a/arch/arm/cpu/arm_cortexa8/omap3/Makefile b/arch/arm/cpu/arm_cortexa8/omap3/Makefile index 8cc7802..0a23fa5 100644 --- a/arch/arm/cpu/arm_cortexa8/omap3/Makefile +++ b/arch/arm/cpu/arm_cortexa8/omap3/Makefile @@ -36,6 +36,9 @@ COBJS += mem.o ifdef CONFIG_SDRC COBJS += sdrc.o endif +ifdef CONFIG_EMIF4 +COBJS += emif4.o +endif COBJS += syslib.o COBJS += sys_info.o COBJS += timer.o diff --git a/arch/arm/cpu/arm_cortexa8/omap3/emif4.c b/arch/arm/cpu/arm_cortexa8/omap3/emif4.c new file mode 100644 index 000..749a394 --- /dev/null +++ b/arch/arm/cpu/arm_cortexa8/omap3/emif4.c @@ -0,0 +1,168 @@ +/* + * Author : + * Vaibhav Hiremath + * + * Based on mem.c and sdrc.c + * + * Copyright (C) 2010 + * Texas Instruments Incorporated - http://www.ti.com/ + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#include +#include +#include +#include +#include + +extern omap3_sysinfo sysinfo; + +static emif4_t *emif4_base = (emif4_t *)OMAP34XX_SDRC_BASE; + +/* + * is_mem_sdr - + * - Return 1 if mem type in use is SDR + */ +u32 is_mem_sdr(void) +{ + return 0; +} + +/* + * get_sdr_cs_size - + * - Get size of chip select 0/1 + */ +u32 get_sdr_cs_size(u32 cs) +{ + u32 size; + + /* TODO: Calculate the size based on EMIF4 configuration */ + size = CONFIG_SYS_CS0_SIZE; + + return size; +} + +/* + * get_sdr_cs_offset - + * - Get offset of cs from cs0 start + */ +u32 get_sdr_cs_offset(u32 cs) +{ + u32 offset = 0; + + return offset; +} + +/* + * do_emif4_init - + * - Init the emif4 module for DDR access + * - Early init routines, called from flash or SRAM. + */ +void do_emif4_init(void) +{ + unsigned int regval; + /* Set the DDR PHY parameters in PHY ctrl registers */ + regval = (EMIF4_DDR1_READ_LAT | EMIF4_DDR1_PWRDN_DIS | + EMIF4_DDR1_EXT_STRB_DIS); + writel(regval, &emif4_base->ddr_phyctrl1); + writel(regval, &emif4_base->ddr_phyctrl1_shdw); + writel(0, &emif4_base->ddr_phyctrl2); + + /* Reset the DDR PHY and wait till completed */ + regval = readl(&emif4_base->sdram_iodft_tlgc); + regval |= (1<<10); + writel(regval, &emif4_base->sdram_iodft_tlgc); + /*Wait till that bit clears*/ + while ((readl(&emif4_base->sdram_iodft_tlgc) & (1<<10)) == 0x1); + /*Re-verify the DDR PHY status*/ + while ((readl(&emif4_base->sdram_sts) & (1<<2)) == 0x0); + + regval |= (1<<0); + writel(regval, &emif4_base->sdram_iodft_tlgc); + /* Set SDR timing registers */ + regval = (EMIF4_TIM1_T_WTR | EMIF4_TIM1_T_RRD | + EMIF4_TIM1_T_RC | EMIF4_TIM1_T_RAS | + EMIF4_TIM1_T_WR | EMIF4_TIM1_T_RCD | + EMIF4_TIM1_T_RP); + writel(regval, &emif4_base->sdram_time1); + writel(regval, &emif4_base->sdram_time1_shdw); + + regval = (EMIF4_TIM2_T_CKE | EMIF4_TIM2_T_RTP | + EMIF4_TIM2_T_XSRD | EMIF4_TIM2_T_XSNR | + EMIF4_TIM2_T_ODT | EMIF4_TIM2_T_XP); + writel(regval, &emif4_base->sdram_time2); + writel(regval, &emif4_base->sdram_time2_shdw); + + regval = (EMIF4_TIM3_T_RAS_MAX | EMIF4_TIM3_T_RFC); + writel(regval, &emif4_base->sdram_time3); + writel(regval, &emif4_base->sdram_time3_shdw); + + /* Set the PWR control register */ + regval = (EMIF4_PWR_PM_TIM | EMIF4_PWR_LP_MODE | + EMIF4_PWR_DPD_DIS | EMIF4_PWR_IDLE_MODE); + writel(regval, &emif4_base->sdram_pwr_mgmt); + writel(regval, &emif4_base->sdram_pwr_mgmt_shdw); + + /* Set the DDR refresh rate control register */ + regval = (EMIF4_R
[U-Boot] [RESEND:PATCH-V4] OMAP3EVM: Added NAND support
From: Vaibhav Hiremath The EVMS have been shipping with NAND (instead of OneNAND) as default. So, this patch sets NAND as default. To choose OneNAND, define CMD_ONENAND instead of CMD_NAND in the config file omap3_evm.h, Changes from V3 :- - Added undef statement for CMD_ONENAND. Signed-off-by: Vaibhav Hiremath --- include/configs/omap3_evm.h |9 - 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/include/configs/omap3_evm.h b/include/configs/omap3_evm.h index 0d99f7d..1d31731 100644 --- a/include/configs/omap3_evm.h +++ b/include/configs/omap3_evm.h @@ -151,7 +151,8 @@ #define CONFIG_CMD_I2C /* I2C serial bus support */ #define CONFIG_CMD_MMC /* MMC support */ -#define CONFIG_CMD_ONENAND /* ONENAND support */ +#undef CONFIG_CMD_ONENAND /* ONENAND support */ +#define CONFIG_CMD_NAND/* NAND support */ #define CONFIG_CMD_DHCP #define CONFIG_CMD_PING @@ -306,7 +307,13 @@ #define CONFIG_SYS_MONITOR_BASECONFIG_SYS_FLASH_BASE #define CONFIG_SYS_ONENAND_BASEONENAND_MAP +#if defined(CONFIG_CMD_NAND) +#define CONFIG_NAND_OMAP_GPMC +#define GPMC_NAND_ECC_LP_x16_LAYOUT1 +#define CONFIG_ENV_IS_IN_NAND +#elif defined(CONFIG_CMD_ONENAND) #define CONFIG_ENV_IS_IN_ONENAND 1 +#endif #define ONENAND_ENV_OFFSET 0x26 /* environment starts here */ #define SMNAND_ENV_OFFSET 0x26 /* environment starts here */ -- 1.6.2.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH-V2 1/4] omap3: Calculate CS1 size only when SDRC is initialized for CS1
From: Vaibhav Hiremath The patch makes sure that size for SDRC CS1 gets calculated only when the CS1 SDRC is initialized. Signed-off-by: Vaibhav Hiremath Signed-off-by: Sanjeev Premi --- arch/arm/cpu/arm_cortexa8/omap3/board.c |7 --- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/arm/cpu/arm_cortexa8/omap3/board.c b/arch/arm/cpu/arm_cortexa8/omap3/board.c index 7b78fa4..69a08fd 100644 --- a/arch/arm/cpu/arm_cortexa8/omap3/board.c +++ b/arch/arm/cpu/arm_cortexa8/omap3/board.c @@ -282,6 +282,8 @@ int dram_init(void) DECLARE_GLOBAL_DATA_PTR; unsigned int size0 = 0, size1 = 0; + size0 = get_sdr_cs_size(CS0); + /* * If a second bank of DDR is attached to CS1 this is * where it can be started. Early init code will init @@ -290,10 +292,9 @@ int dram_init(void) if ((sysinfo.mtype == DDR_COMBO) || (sysinfo.mtype == DDR_STACKED)) { do_sdrc_init(CS1, NOT_EARLY); make_cs1_contiguous(); - } - size0 = get_sdr_cs_size(CS0); - size1 = get_sdr_cs_size(CS1); + size1 = get_sdr_cs_size(CS1); + } gd->bd->bi_dram[0].start = PHYS_SDRAM_1; gd->bd->bi_dram[0].size = size0; -- 1.6.2.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH-V2 0/4] Add Support for AM3517EVM with EMIF4
From: Vaibhav Hiremath Changes from V1 (comments provided by Tom Rix): - Refreshed against latest denx/master. - Further split SDRC consolidated patch, since it was fixing up one issue in dram_init in addition to code moment. - Retained copyright for sdrc.c file, since it is barely a code moment. AM3517 device is high-performance, industrial applications processor designed and developed keeping Software Compatible with OMAP3 Processors. Differances :- === - The SDRC controller has been replaced with EMIF4. - Some new IP's got added like, CAN, VPFE, etc... - Removed ISP completely This patch series adds support for AM3517EVM along with EMIF4 configuration. Tested :- === - OMAP3 EVM (both NAND and MMC boot mode) - AM3517 EVM (both NAND and MMC boot mode) Build tested on all OMAP3 platforms. Below are some of the useful links :- === AM3517 device is high-performance, industrial applications processor designed and developed keeping Software Compatible with OMAP3 Processors. Below are some of the useful links - Migration from OMAP35x to AM35x :- http://focus.ti.com/lit/an/sprab91/sprab91.pdf Specs/TRM :- http://focus.ti.com/docs/prod/folders/print/am3517.html EVM Link -: http://www.logicpd.com/products/development-kits/zoom-am3517-experimenter-kit Vaibhav Hiremath (4): omap3: Calculate CS1 size only when SDRC is initialized for CS1 omap3: Consolidate SDRC related operations AM35x: Add support for AM3517EVM AM35x: Add support for EMIF4 Makefile|3 + arch/arm/cpu/arm_cortexa8/omap3/Makefile|6 + arch/arm/cpu/arm_cortexa8/omap3/board.c | 34 +--- arch/arm/cpu/arm_cortexa8/omap3/emif4.c | 168 +++ arch/arm/cpu/arm_cortexa8/omap3/mem.c | 90 -- arch/arm/cpu/arm_cortexa8/omap3/sdrc.c | 202 + arch/arm/cpu/arm_cortexa8/omap3/sys_info.c | 41 --- arch/arm/include/asm/arch-omap3/cpu.h | 27 ++ arch/arm/include/asm/arch-omap3/emif4.h | 79 ++ arch/arm/include/asm/arch-omap3/mem.h | 13 + arch/arm/include/asm/arch-omap3/mux.h | 36 +++ arch/arm/include/asm/arch-omap3/sys_proto.h |7 +- board/logicpd/am3517evm/Makefile| 47 +++ board/logicpd/am3517evm/am3517evm.c | 76 + board/logicpd/am3517evm/am3517evm.h | 405 +++ board/logicpd/am3517evm/config.mk | 30 ++ include/configs/am3517_evm.h| 297 include/configs/devkit8000.h|2 + include/configs/omap3_beagle.h |2 + include/configs/omap3_evm.h |2 + include/configs/omap3_overo.h |2 + include/configs/omap3_pandora.h |2 + include/configs/omap3_sdp3430.h |2 + include/configs/omap3_zoom1.h |2 + include/configs/omap3_zoom2.h |2 + 25 files changed, 1411 insertions(+), 166 deletions(-) create mode 100644 arch/arm/cpu/arm_cortexa8/omap3/emif4.c create mode 100644 arch/arm/cpu/arm_cortexa8/omap3/sdrc.c create mode 100644 arch/arm/include/asm/arch-omap3/emif4.h create mode 100644 board/logicpd/am3517evm/Makefile create mode 100644 board/logicpd/am3517evm/am3517evm.c create mode 100644 board/logicpd/am3517evm/am3517evm.h create mode 100644 board/logicpd/am3517evm/config.mk create mode 100644 include/configs/am3517_evm.h ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/3] AM35x: Add support for AM3517EVM
From: Vaibhav Hiremath This patch adds basic support for the AM3517EVM. It includes: - Header file and implementation for the board - Default configuration - Updates for makefile - Board specific changes for NAND Signed-off-by: Vaibhav Hiremath Signed-off-by: Sanjeev Premi --- MAINTAINERS |4 + Makefile |3 + board/ti/am3517evm/Makefile | 47 + board/ti/am3517evm/am3517evm.c | 76 +++ board/ti/am3517evm/am3517evm.h | 400 ++ board/ti/am3517evm/config.mk | 29 +++ include/asm-arm/arch-omap3/mem.h | 10 + include/asm-arm/arch-omap3/mux.h | 35 include/configs/am3517_evm.h | 293 9 files changed, 897 insertions(+), 0 deletions(-) create mode 100644 board/ti/am3517evm/Makefile create mode 100644 board/ti/am3517evm/am3517evm.c create mode 100644 board/ti/am3517evm/am3517evm.h create mode 100644 board/ti/am3517evm/config.mk create mode 100644 include/configs/am3517_evm.h diff --git a/MAINTAINERS b/MAINTAINERS index e8ba4bc..4500223 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -758,6 +758,10 @@ Minkyu Kang SMDKC100ARM CORTEX-A8 (S5PC100 SoC) +Vaibhav Hiremath + + am3517_evm ARM CORTEX-A8 (AM3517 SoC) + - Unknown / orphaned boards: diff --git a/Makefile b/Makefile index 69b963f..5c73f21 100644 --- a/Makefile +++ b/Makefile @@ -3158,6 +3158,9 @@ omap3_overo_config : unconfig omap3_evm_config : unconfig @$(MKCONFIG) $(@:_config=) arm arm_cortexa8 evm ti omap3 +am3517_evm_config :unconfig + @$(MKCONFIG) $(@:_config=) arm arm_cortexa8 am3517evm ti omap3 + omap3_pandora_config : unconfig @$(MKCONFIG) $(@:_config=) arm arm_cortexa8 pandora NULL omap3 diff --git a/board/ti/am3517evm/Makefile b/board/ti/am3517evm/Makefile new file mode 100644 index 000..87712f8 --- /dev/null +++ b/board/ti/am3517evm/Makefile @@ -0,0 +1,47 @@ +# +# Author: Vaibhav Hiremath +# +# Based on ti/evm/Makefile +# +# Copyright (C) 2009 Texas Instruments Incorporated +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# + +include $(TOPDIR)/config.mk + +LIB= $(obj)lib$(BOARD).a + +COBJS := am3517evm.o + +SRCS := $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) + +$(LIB):$(obj).depend $(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) + +clean: + rm -f $(OBJS) + +distclean: clean + rm -f $(LIB) core *.bak $(obj).depend + +# + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + diff --git a/board/ti/am3517evm/am3517evm.c b/board/ti/am3517evm/am3517evm.c new file mode 100644 index 000..ef0b39e --- /dev/null +++ b/board/ti/am3517evm/am3517evm.c @@ -0,0 +1,76 @@ +/* + * am3517evm.c - board file for TI's AM3517 family of devices. + * + * Author: Vaibhav Hiremath + * + * Based on ti/evm/evm.c + * + * Copyright (C) 2009 Texas Instruments Incorporated + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include +#include +#include +#include +#include +#include +#include +#include "am3517evm.h" + +/* + * Routine: board_init + * Description: Early hardware init. + */ +int board_init(void) +{ + DECLARE_GLOBAL_DATA_PTR; + + gpmc_init(); /* in SRAM or SDRAM, finish GPMC */ + /* board id for Linux */ + gd->bd->bi_arch_number = MACH_TYPE_OMAP3517EVM; + /* boot param addr */ + gd->bd->bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100); + + return 0; +} + +/* + * Routi
[U-Boot] [PATCH 0/3] Add Support for AM3517EVM with EMIF4
From: Vaibhav Hiremath AM3517 device is high-performance, industrial applications processor designed and developed keeping Software Compatible with OMAP3 Processors. Differances :- === - The SDRC controller has been replaced with EMIF4. - Some new IP's got added like, CAN, VPFE, etc... - Removed ISP completely This patch series adds support for AM3517EVM along with EMIF4 configuration. Tested :- === - OMAP3 EVM (both NAND and MMC boot mode) - OMAP3 BEAGLE (MMC boot mode) - AM3517 EVM (both NAND and MMC boot mode) Below are some of the useful links :- === AM3517 device is high-performance, industrial applications processor designed and developed keeping Software Compatible with OMAP3 Processors. Below are some of the useful links - Migration from OMAP35x to AM35x :- http://focus.ti.com/lit/an/sprab91/sprab91.pdf Specs/TRM :- http://focus.ti.com/docs/prod/folders/print/am3517.html EVM Link -: http://www.logicpd.com/products/development-kits/zoom-am3517-experimenter-kit Vaibhav Hiremath (3): OMAP3: Consolidate SDRC related operations AM35x: Add support for AM3517EVM AM35x: Add support for EMIF4 MAINTAINERS|4 + Makefile |3 + board/ti/am3517evm/Makefile| 47 board/ti/am3517evm/am3517evm.c | 76 ++ board/ti/am3517evm/am3517evm.h | 400 board/ti/am3517evm/config.mk | 29 +++ cpu/arm_cortexa8/omap3/Makefile|6 + cpu/arm_cortexa8/omap3/board.c | 34 +--- cpu/arm_cortexa8/omap3/emif4.c | 160 + cpu/arm_cortexa8/omap3/mem.c | 90 --- cpu/arm_cortexa8/omap3/sdrc.c | 186 +++ cpu/arm_cortexa8/omap3/sys_info.c | 42 + include/asm-arm/arch-omap3/cpu.h | 26 ++ include/asm-arm/arch-omap3/emif4.h | 77 ++ include/asm-arm/arch-omap3/mem.h | 24 ++ include/asm-arm/arch-omap3/mux.h | 35 +++ include/asm-arm/arch-omap3/sys_proto.h |7 +- include/configs/am3517_evm.h | 293 +++ include/configs/omap3_beagle.h |2 + include/configs/omap3_evm.h|2 + include/configs/omap3_overo.h |2 + include/configs/omap3_pandora.h|2 + include/configs/omap3_sdp3430.h|2 + include/configs/omap3_zoom1.h |2 + include/configs/omap3_zoom2.h |2 + 25 files changed, 1387 insertions(+), 166 deletions(-) create mode 100644 board/ti/am3517evm/Makefile create mode 100644 board/ti/am3517evm/am3517evm.c create mode 100644 board/ti/am3517evm/am3517evm.h create mode 100644 board/ti/am3517evm/config.mk create mode 100644 cpu/arm_cortexa8/omap3/emif4.c create mode 100644 cpu/arm_cortexa8/omap3/sdrc.c create mode 100644 include/asm-arm/arch-omap3/emif4.h create mode 100644 include/configs/am3517_evm.h ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/3] OMAP3: Consolidate SDRC related operations
From: Vaibhav Hiremath Consolidated all SDRC related functions/operations into separate file - sdrc.c. Signed-off-by: Vaibhav Hiremath Signed-off-by: Sanjeev Premi --- cpu/arm_cortexa8/omap3/Makefile|3 + cpu/arm_cortexa8/omap3/board.c | 34 +-- cpu/arm_cortexa8/omap3/mem.c | 90 --- cpu/arm_cortexa8/omap3/sdrc.c | 186 cpu/arm_cortexa8/omap3/sys_info.c | 42 +--- include/asm-arm/arch-omap3/mem.h | 14 +++ include/asm-arm/arch-omap3/sys_proto.h |4 +- include/configs/omap3_beagle.h |2 + include/configs/omap3_evm.h|2 + include/configs/omap3_overo.h |2 + include/configs/omap3_pandora.h|2 + include/configs/omap3_sdp3430.h|2 + include/configs/omap3_zoom1.h |2 + include/configs/omap3_zoom2.h |2 + 14 files changed, 221 insertions(+), 166 deletions(-) create mode 100644 cpu/arm_cortexa8/omap3/sdrc.c diff --git a/cpu/arm_cortexa8/omap3/Makefile b/cpu/arm_cortexa8/omap3/Makefile index 136b163..8cc7802 100644 --- a/cpu/arm_cortexa8/omap3/Makefile +++ b/cpu/arm_cortexa8/omap3/Makefile @@ -33,6 +33,9 @@ COBJS += board.o COBJS += clock.o COBJS += gpio.o COBJS += mem.o +ifdef CONFIG_SDRC +COBJS += sdrc.o +endif COBJS += syslib.o COBJS += sys_info.o COBJS += timer.o diff --git a/cpu/arm_cortexa8/omap3/board.c b/cpu/arm_cortexa8/omap3/board.c index 2aa69b3..0bad682 100644 --- a/cpu/arm_cortexa8/omap3/board.c +++ b/cpu/arm_cortexa8/omap3/board.c @@ -40,8 +40,6 @@ extern omap3_sysinfo sysinfo; -extern u32 is_mem_sdr(void); - /** * Routine: delay * Description: spinning delay to use before udelay works @@ -227,7 +225,7 @@ void s_init(void) per_clocks_enable(); if (!in_sdram) - sdrc_init(); + mem_init(); } /** @@ -268,36 +266,6 @@ void watchdog_init(void) } /** - * Routine: dram_init - * Description: sets uboots idea of sdram size - */ -int dram_init(void) -{ - DECLARE_GLOBAL_DATA_PTR; - unsigned int size0 = 0, size1 = 0; - - /* -* If a second bank of DDR is attached to CS1 this is -* where it can be started. Early init code will init -* memory on CS0. -*/ - if ((sysinfo.mtype == DDR_COMBO) || (sysinfo.mtype == DDR_STACKED)) { - do_sdrc_init(CS1, NOT_EARLY); - make_cs1_contiguous(); - } - - size0 = get_sdr_cs_size(CS0); - size1 = get_sdr_cs_size(CS1); - - gd->bd->bi_dram[0].start = PHYS_SDRAM_1; - gd->bd->bi_dram[0].size = size0; - gd->bd->bi_dram[1].start = PHYS_SDRAM_1 + get_sdr_cs_offset(CS1); - gd->bd->bi_dram[1].size = size1; - - return 0; -} - -/** * Dummy function to handle errors for EABI incompatibility */ void abort(void) diff --git a/cpu/arm_cortexa8/omap3/mem.c b/cpu/arm_cortexa8/omap3/mem.c index dfb7e4c..bd914b0 100644 --- a/cpu/arm_cortexa8/omap3/mem.c +++ b/cpu/arm_cortexa8/omap3/mem.c @@ -79,26 +79,6 @@ static const u32 gpmc_onenand[GPMC_MAX_REG] = { #endif -static struct sdrc *sdrc_base = (struct sdrc *)OMAP34XX_SDRC_BASE; - -/** - * make_cs1_contiguous() - for es2 and above remap cs1 behind cs0 to allow - * command line mem=xyz use all memory with out discontinuous support - * compiled in. Could do it at the ATAG, but there really is two banks... - * Called as part of 2nd phase DDR init. - **/ -void make_cs1_contiguous(void) -{ - u32 size, a_add_low, a_add_high; - - size = get_sdr_cs_size(CS0); - size >>= 25;/* divide by 32 MiB to find size to offset CS1 */ - a_add_high = (size & 3) << 8; /* set up low field */ - a_add_low = (size & 0x3C) >> 2; /* set up high field */ - writel((a_add_high | a_add_low), &sdrc_base->cs_cfg); - -} - / * mem_ok() - test used to see if timings are correct * for a part. Helps in guessing which part @@ -123,76 +103,6 @@ u32 mem_ok(u32 cs) return 1; } -/ - * sdrc_init() - init the sdrc chip selects CS0 and CS1 - * - early init routines, called from flash or - * SRAM. - ***/ -void sdrc_init(void) -{ - /* only init up
[U-Boot] [PATCH 3/3] AM35x: Add support for EMIF4
From: Vaibhav Hiremath This patch adds support for the EMIF4 interface available in the AM35x processors. Signed-off-by: Vaibhav Hiremath Signed-off-by: Sanjeev Premi --- cpu/arm_cortexa8/omap3/Makefile|3 + cpu/arm_cortexa8/omap3/emif4.c | 160 include/asm-arm/arch-omap3/cpu.h | 26 + include/asm-arm/arch-omap3/emif4.h | 77 +++ include/asm-arm/arch-omap3/sys_proto.h |3 + 5 files changed, 269 insertions(+), 0 deletions(-) create mode 100644 cpu/arm_cortexa8/omap3/emif4.c create mode 100644 include/asm-arm/arch-omap3/emif4.h diff --git a/cpu/arm_cortexa8/omap3/Makefile b/cpu/arm_cortexa8/omap3/Makefile index 8cc7802..0a23fa5 100644 --- a/cpu/arm_cortexa8/omap3/Makefile +++ b/cpu/arm_cortexa8/omap3/Makefile @@ -36,6 +36,9 @@ COBJS += mem.o ifdef CONFIG_SDRC COBJS += sdrc.o endif +ifdef CONFIG_EMIF4 +COBJS += emif4.o +endif COBJS += syslib.o COBJS += sys_info.o COBJS += timer.o diff --git a/cpu/arm_cortexa8/omap3/emif4.c b/cpu/arm_cortexa8/omap3/emif4.c new file mode 100644 index 000..6e00b55 --- /dev/null +++ b/cpu/arm_cortexa8/omap3/emif4.c @@ -0,0 +1,160 @@ +/* + * Author: Vaibhav Hiremath + * + * Based on mem.c and sdrc.c + * + * Copyright (C) 2009 Texas Instruments Incorporated - http://www.ti.com/ + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#include +#include +#include +#include +#include + +extern omap3_sysinfo sysinfo; + +static emif4_t *emif4_base = (emif4_t *)OMAP34XX_SDRC_BASE; + +/** + * is_mem_sdr() - return 1 if mem type in use is SDR + */ +u32 is_mem_sdr(void) +{ + return 0; +} + +/** + * get_sdr_cs_size() - get size of chip select 0/1 + */ +u32 get_sdr_cs_size(u32 cs) +{ + u32 size; + + /* TODO: Calculate the size based on EMIF4 configuration */ + size = CONFIG_SYS_CS0_SIZE; + + return size; +} + +/** + * get_sdr_cs_offset() - get offset of cs from cs0 start + */ +u32 get_sdr_cs_offset(u32 cs) +{ + return 0; +} + +/** + * do_emif4_init() - init the emif4 module for DDR access + * - early init routines, called from flash or + * SRAM. + */ +void do_emif4_init(void) +{ + unsigned int regval; + /* Set the DDR PHY parameters in PHY ctrl registers */ + regval = (EMIF4_DDR1_READ_LAT | EMIF4_DDR1_PWRDN_DIS | + EMIF4_DDR1_EXT_STRB_DIS); + writel(regval, &emif4_base->ddr_phyctrl1); + writel(regval, &emif4_base->ddr_phyctrl1_shdw); + writel(0, &emif4_base->ddr_phyctrl2); + + /* Reset the DDR PHY and wait till completed */ + regval = readl(&emif4_base->sdram_iodft_tlgc); + regval |= (1<<10); + writel(regval, &emif4_base->sdram_iodft_tlgc); + /*Wait till that bit clears*/ + while ((readl(&emif4_base->sdram_iodft_tlgc) & (1<<10)) == 0x1); + /*Re-verify the DDR PHY status*/ + while ((readl(&emif4_base->sdram_sts) & (1<<2)) == 0x0); + + regval |= (1<<0); + writel(regval, &emif4_base->sdram_iodft_tlgc); + /* Set SDR timing registers */ + regval = (EMIF4_TIM1_T_WTR | EMIF4_TIM1_T_RRD | + EMIF4_TIM1_T_RC | EMIF4_TIM1_T_RAS | + EMIF4_TIM1_T_WR | EMIF4_TIM1_T_RCD | + EMIF4_TIM1_T_RP); + writel(regval, &emif4_base->sdram_time1); + writel(regval, &emif4_base->sdram_time1_shdw); + + regval = (EMIF4_TIM2_T_CKE | EMIF4_TIM2_T_RTP | + EMIF4_TIM2_T_XSRD | EMIF4_TIM2_T_XSNR | + EMIF4_TIM2_T_ODT | EMIF4_TIM2_T_XP); + writel(regval, &emif4_base->sdram_time2); + writel(regval, &emif4_base->sdram_time2_shdw); + + regval = (EMIF4_TIM3_T_RAS_MAX | EMIF4_TIM3_T_RFC); + writel(regval, &emif4_base->sdram_time3); + writel(regval, &emif4_base->sdram_time3_shdw); + + /* Set the PWR control register */ + regval = (EMIF4_PWR_PM_TIM | EMIF4_PWR_LP_MODE | + EMIF4_PWR_DPD_DIS | EMIF4_PWR_IDLE_MODE); + writel(regval, &emif4_base->sdram_pwr_mgmt); + writel(regval, &emif4_base->sdram_pwr_mgmt_shdw); + + /* Set the DDR refresh rate control register */ + regval = (EMIF4_REFRESH_RATE | EMIF4_INITREF_DIS); + writel(regval, &emif4_base->sdram_refresh_ctrl); + writel(regval, &emif4_base->sdram_refresh_ctrl_shdw)
[U-Boot] [PATCH 5/5] AM3517: Add support for EMIF4
From: Vaibhav Hiremath Changes:- - Created 2 seperate config option * CONFIG_SDRC (omap34xx family) * CONFIG_EMIF4 (am3517 family) - Changed all omap3 dependent file for CONFIG_SDRC Tested On:- - AM3517EVM board - OMAP3EVM board - BEAGLE board I would need help here from people to validate this change for SDP/ZOOMx and other OMAP3 version of boards. Signed-off-by: Vaibhav Hiremath --- cpu/arm_cortexa8/omap3/board.c | 11 ++- cpu/arm_cortexa8/omap3/mem.c | 110 ++-- cpu/arm_cortexa8/omap3/sys_info.c | 12 +++- include/asm-arm/arch-omap3/cpu.h | 26 include/asm-arm/arch-omap3/mem.h | 58 - include/asm-arm/arch-omap3/sys_proto.h |4 + include/configs/am3517_evm.h |6 ++ include/configs/devkit8000.h |4 + include/configs/omap3_beagle.h |4 + include/configs/omap3_evm.h|4 + include/configs/omap3_overo.h |4 + include/configs/omap3_pandora.h|4 + include/configs/omap3_sdp3430.h|4 + include/configs/omap3_zoom1.h |4 + include/configs/omap3_zoom2.h |4 + 15 files changed, 233 insertions(+), 26 deletions(-) diff --git a/cpu/arm_cortexa8/omap3/board.c b/cpu/arm_cortexa8/omap3/board.c index dd2c940..ce60f99 100644 --- a/cpu/arm_cortexa8/omap3/board.c +++ b/cpu/arm_cortexa8/omap3/board.c @@ -227,7 +227,11 @@ void s_init(void) per_clocks_enable(); if (!in_sdram) +#if defined(CONFIG_SDRC) sdrc_init(); +#elif defined(CONFIG_EMIF4) + emif4_init(); +#endif } /** @@ -276,19 +280,20 @@ int dram_init(void) DECLARE_GLOBAL_DATA_PTR; unsigned int size0 = 0, size1 = 0; + size0 = get_sdr_cs_size(CS0); /* * If a second bank of DDR is attached to CS1 this is * where it can be started. Early init code will init * memory on CS0. */ if ((sysinfo.mtype == DDR_COMBO) || (sysinfo.mtype == DDR_STACKED)) { +#if defined(CONFIG_SDRC) do_sdrc_init(CS1, NOT_EARLY); make_cs1_contiguous(); +#endif + size1 = get_sdr_cs_size(CS1); } - size0 = get_sdr_cs_size(CS0); - size1 = get_sdr_cs_size(CS1); - gd->bd->bi_dram[0].start = PHYS_SDRAM_1; gd->bd->bi_dram[0].size = size0; gd->bd->bi_dram[1].start = PHYS_SDRAM_1 + get_sdr_cs_offset(CS1); diff --git a/cpu/arm_cortexa8/omap3/mem.c b/cpu/arm_cortexa8/omap3/mem.c index dfb7e4c..73e0918 100644 --- a/cpu/arm_cortexa8/omap3/mem.c +++ b/cpu/arm_cortexa8/omap3/mem.c @@ -79,26 +79,6 @@ static const u32 gpmc_onenand[GPMC_MAX_REG] = { #endif -static struct sdrc *sdrc_base = (struct sdrc *)OMAP34XX_SDRC_BASE; - -/** - * make_cs1_contiguous() - for es2 and above remap cs1 behind cs0 to allow - * command line mem=xyz use all memory with out discontinuous support - * compiled in. Could do it at the ATAG, but there really is two banks... - * Called as part of 2nd phase DDR init. - **/ -void make_cs1_contiguous(void) -{ - u32 size, a_add_low, a_add_high; - - size = get_sdr_cs_size(CS0); - size >>= 25;/* divide by 32 MiB to find size to offset CS1 */ - a_add_high = (size & 3) << 8; /* set up low field */ - a_add_low = (size & 0x3C) >> 2; /* set up high field */ - writel((a_add_high | a_add_low), &sdrc_base->cs_cfg); - -} - / * mem_ok() - test used to see if timings are correct * for a part. Helps in guessing which part @@ -123,6 +103,27 @@ u32 mem_ok(u32 cs) return 1; } +#if defined(CONFIG_SDRC) +static struct sdrc *sdrc_base = (struct sdrc *)OMAP34XX_SDRC_BASE; + +/** + * make_cs1_contiguous() - for es2 and above remap cs1 behind cs0 to allow + * command line mem=xyz use all memory with out discontinuous support + * compiled in. Could do it at the ATAG, but there really is two banks... + * Called as part of 2nd phase DDR init. + **/ +void make_cs1_contiguous(void) +{ + u32 size, a_add_low, a_add_high; + + size = get_sdr_cs_size(CS0); + size >>= 25;/* divide by 32 MiB to find size to offset CS1 */ + a_add_high = (size & 3) << 8; /* set up low field */ + a_add_low = (size & 0x3C) >> 2; /* set up high field */ + writel((a_add_high | a_add_low), &sdrc_base->cs_cfg); + +} + / * sdrc_init() - init the sdrc chip selec
[U-Boot] [PATCH 4/5] AM3517EVM: Add mux configuration
From: Vaibhav Hiremath Updated mux.h file for AM3517 specific mux configuration. Signed-off-by: Vaibhav Hiremath --- include/asm-arm/arch-omap3/mux.h | 35 +++ 1 files changed, 35 insertions(+), 0 deletions(-) diff --git a/include/asm-arm/arch-omap3/mux.h b/include/asm-arm/arch-omap3/mux.h index 0c01c73..9f06fbb 100644 --- a/include/asm-arm/arch-omap3/mux.h +++ b/include/asm-arm/arch-omap3/mux.h @@ -403,6 +403,41 @@ #define CONTROL_PADCONF_D2D_SBUSFLAG 0x0260 #define CONTROL_PADCONF_SDRC_CKE0 0x0262 #define CONTROL_PADCONF_SDRC_CKE1 0x0264 +/* AM3517 specific */ +#define CONTROL_PADCONF_CCDC_PCLK 0x01E4 +#define CONTROL_PADCONF_CCDC_FIELD 0x01E6 +#define CONTROL_PADCONF_CCDC_HD 0x01E8 +#define CONTROL_PADCONF_CCDC_VD 0x01EA +#define CONTROL_PADCONF_CCDC_WEN0x01EC +#define CONTROL_PADCONF_CCDC_DATA0 0x01EE +#define CONTROL_PADCONF_CCDC_DATA1 0x01F0 +#define CONTROL_PADCONF_CCDC_DATA2 0x01F2 +#define CONTROL_PADCONF_CCDC_DATA3 0x01F4 +#define CONTROL_PADCONF_CCDC_DATA4 0x01F6 +#define CONTROL_PADCONF_CCDC_DATA5 0x01F8 +#define CONTROL_PADCONF_CCDC_DATA6 0x01FA +#define CONTROL_PADCONF_CCDC_DATA7 0x01FC +#define CONTROL_PADCONF_RMII_MDIO_DATA 0x01FE +#define CONTROL_PADCONF_RMII_MDIO_CLK 0x0200 +#define CONTROL_PADCONF_RMII_RXD0 0x0202 +#define CONTROL_PADCONF_RMII_RXD1 0x0204 +#define CONTROL_PADCONF_RMII_CRS_DV 0x0206 +#define CONTROL_PADCONF_RMII_RXER 0x0208 +#define CONTROL_PADCONF_RMII_TXD0 0x020A +#define CONTROL_PADCONF_RMII_TXD1 0x020C +#define CONTROL_PADCONF_RMII_TXEN 0x020E +#define CONTROL_PADCONF_RMII_50MHZ_CLK 0x0210 +#define CONTROL_PADCONF_USB0_DRVBUS 0x0212 +#define CONTROL_PADCONF_HECC1_TXD 0x0214 +#define CONTROL_PADCONF_HECC1_RXD 0x0216 +#define CONTROL_PADCONF_SYS_BOOT7 0x0218 +#define CONTROL_PADCONF_SDRC_DQS0N 0x021A +#define CONTROL_PADCONF_SDRC_DQS1N 0x021C +#define CONTROL_PADCONF_SDRC_DQS2N 0x021E +#define CONTROL_PADCONF_SDRC_DQS3N 0x0220 +#define CONTROL_PADCONF_STRBEN_DLY0 0x0222 +#define CONTROL_PADCONF_STRBEN_DLY1 0x0224 +#define CONTROL_PADCONF_SYS_BOOT8 0x0226 #define MUX_VAL(OFFSET,VALUE)\ writew((VALUE), OMAP34XX_CTRL_BASE + (OFFSET)); -- 1.6.2.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 3/5] Added configuration file for AM3517EVM
From: Vaibhav Hiremath Signed-off-by: Vaibhav Hiremath --- include/configs/am3517_evm.h | 293 ++ 1 files changed, 293 insertions(+), 0 deletions(-) create mode 100644 include/configs/am3517_evm.h diff --git a/include/configs/am3517_evm.h b/include/configs/am3517_evm.h new file mode 100644 index 000..d7eef73 --- /dev/null +++ b/include/configs/am3517_evm.h @@ -0,0 +1,293 @@ +/* + * am3517_evm.h - Configuration settings for the TI's AM3517 EVM board. + * + * Author: Vaibhav Hiremath + * + * Derived from evm code + * + * Copyright (C) 2009 Texas Instruments Incorporated + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef __CONFIG_H +#define __CONFIG_H + +/* + * High Level Configuration Options + */ +#define CONFIG_ARMCORTEXA8 1 /* This is an ARM V7 CPU core */ +#define CONFIG_OMAP1 /* in a TI OMAP core */ +#define CONFIG_OMAP34XX1 /* which is a 34XX */ +#define CONFIG_OMAP3_AM3517EVM 1 /* working with AM3517EVM */ + +#include /* get chip and board defs */ +#include + +/* + * Display CPU and Board information + */ +#define CONFIG_DISPLAY_CPUINFO 1 +#define CONFIG_DISPLAY_BOARDINFO 1 + +/* Clock Defines */ +#define V_OSCK 2600/* Clock output from T2 */ +#define V_SCLK (V_OSCK >> 1) + +#undef CONFIG_USE_IRQ /* no support for IRQs */ +#define CONFIG_MISC_INIT_R + +#define CONFIG_CMDLINE_TAG 1 /* enable passing of ATAGs */ +#define CONFIG_SETUP_MEMORY_TAGS 1 +#define CONFIG_INITRD_TAG 1 +#define CONFIG_REVISION_TAG1 + +/* + * Size of malloc() pool + */ +#define CONFIG_ENV_SIZE(128 << 10) /* 128 KiB */ + /* Sector */ +#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (128 << 10)) +#define CONFIG_SYS_GBL_DATA_SIZE 128 /* bytes reserved for */ + /* initial data */ +/* + * DDR size interfaced + */ +#define CONFIG_SYS_CS0_SIZE (256 * 1024 * 1024) + +/* + * Hardware drivers + */ + +/* + * NS16550 Configuration + */ +#define V_NS16550_CLK 4800/* 48MHz (APLL96/2) */ + +#define CONFIG_SYS_NS16550 +#define CONFIG_SYS_NS16550_SERIAL +#define CONFIG_SYS_NS16550_REG_SIZE(-4) +#define CONFIG_SYS_NS16550_CLK V_NS16550_CLK + +/* + * select serial console configuration + */ +#define CONFIG_CONS_INDEX 3 +#define CONFIG_SYS_NS16550_COM3OMAP34XX_UART3 +#define CONFIG_SERIAL3 3 /* UART3 on AM3517 EVM */ + +/* allow to overwrite serial and ethaddr */ +#define CONFIG_ENV_OVERWRITE +#define CONFIG_BAUDRATE115200 +#define CONFIG_SYS_BAUDRATE_TABLE {4800, 9600, 19200, 38400, 57600,\ + 115200} +#define CONFIG_MMC 1 +#define CONFIG_OMAP3_MMC 1 +#define CONFIG_DOS_PARTITION 1 + +/* commands to include */ +#include + +#define CONFIG_CMD_EXT2/* EXT2 Support */ +#define CONFIG_CMD_FAT /* FAT support */ +#define CONFIG_CMD_JFFS2 /* JFFS2 Support*/ + +#define CONFIG_CMD_I2C /* I2C serial bus support */ +#define CONFIG_CMD_MMC /* MMC support */ +#define CONFIG_CMD_NAND/* NAND support */ + +#undef CONFIG_CMD_FLASH/* flinfo, erase, protect */ +#undef CONFIG_CMD_FPGA /* FPGA configuration Support */ +#undef CONFIG_CMD_IMI /* iminfo */ +#undef CONFIG_CMD_IMLS /* List all found images*/ + +#define CONFIG_SYS_NO_FLASH +#define CONFIG_HARD_I2C1 +#define CONFIG_SYS_I2C_SPEED 10 +#define CONFIG_SYS_I2C_SLAVE 1 +#define CONFIG_SYS_I2C_BUS 0 +#define CONFIG_SYS_I2C_BUS_SELECT 1 +#define CONFIG_DRIVER_OMAP34XX_I2C 1 + +#undef CONFIG_CMD_NET +/* + * Board NAND Info. + */ +#define CONFIG_SYS_NAND_ADDR NAND_BASE /* physical address */ + /* to access nand
[U-Boot] [PATCH 0/5] Introducing TI's New SoC/board AM3517EVM
From: Vaibhav Hiremath AM3517 device is high-performance, industrial applications processor designed and developed keeping Software Compatible with OMAP3 Processors. Below are some of the useful links - AM3517 device is high-performance, industrial applications processor designed and developed keeping Software Compatible with OMAP3 Processors. Below are some of the useful links - Migration from OMAP35x to AM35x :- http://focus.ti.com/lit/an/sprab91/sprab91.pdf Specs/TRM :- http://focus.ti.com/docs/prod/folders/print/am3517.html EVM Link -: http://www.logicpd.com/products/development-kits/zoom-am3517-experimenter-kit Vaibhav Hiremath (5): Introducing AM3517EVM support am3517_evm_config options added to Makfile Added configuration file for AM3517EVM Added AM3517EVM specific mux configuration to omap3/mux.h AM3517: Add support for EMIF4 Makefile |3 + board/ti/am3517evm/Makefile| 46 board/ti/am3517evm/am3517evm.c | 76 +++ board/ti/am3517evm/am3517evm.h | 388 board/ti/am3517evm/config.mk | 29 +++ cpu/arm_cortexa8/omap3/board.c | 11 +- cpu/arm_cortexa8/omap3/mem.c | 110 -- cpu/arm_cortexa8/omap3/sys_info.c | 12 +- include/asm-arm/arch-omap3/cpu.h | 26 +++ include/asm-arm/arch-omap3/mem.h | 66 ++- include/asm-arm/arch-omap3/mux.h | 35 +++ include/asm-arm/arch-omap3/sys_proto.h |4 + include/configs/am3517_evm.h | 299 include/configs/devkit8000.h |4 + include/configs/omap3_beagle.h |4 + include/configs/omap3_evm.h|4 + include/configs/omap3_overo.h |4 + include/configs/omap3_pandora.h|4 + include/configs/omap3_sdp3430.h|4 + include/configs/omap3_zoom1.h |4 + include/configs/omap3_zoom2.h |4 + 21 files changed, 1112 insertions(+), 25 deletions(-) create mode 100644 board/ti/am3517evm/Makefile create mode 100644 board/ti/am3517evm/am3517evm.c create mode 100644 board/ti/am3517evm/am3517evm.h create mode 100644 board/ti/am3517evm/config.mk create mode 100644 include/configs/am3517_evm.h ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/5] am3517_evm_config options added to Makfile
From: Vaibhav Hiremath Signed-off-by: Vaibhav Hiremath --- Makefile |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/Makefile b/Makefile index bcb3fe9..d1aa8ff 100644 --- a/Makefile +++ b/Makefile @@ -3156,6 +3156,9 @@ omap3_overo_config : unconfig omap3_evm_config : unconfig @$(MKCONFIG) $(@:_config=) arm arm_cortexa8 evm ti omap3 +am3517_evm_config :unconfig + @$(MKCONFIG) $(@:_config=) arm arm_cortexa8 am3517evm ti omap3 + omap3_pandora_config : unconfig @$(MKCONFIG) $(@:_config=) arm arm_cortexa8 pandora NULL omap3 -- 1.6.2.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/5] Introducing AM3517EVM support
From: Vaibhav Hiremath Changes:- - Added board specific directory under board/ti/am3517/ - Basic board support. Signed-off-by: Vaibhav Hiremath --- board/ti/am3517evm/Makefile | 46 + board/ti/am3517evm/am3517evm.c | 76 board/ti/am3517evm/am3517evm.h | 388 ++ board/ti/am3517evm/config.mk | 29 +++ include/asm-arm/arch-omap3/mem.h | 10 + 5 files changed, 549 insertions(+), 0 deletions(-) create mode 100644 board/ti/am3517evm/Makefile create mode 100644 board/ti/am3517evm/am3517evm.c create mode 100644 board/ti/am3517evm/am3517evm.h create mode 100644 board/ti/am3517evm/config.mk diff --git a/board/ti/am3517evm/Makefile b/board/ti/am3517evm/Makefile new file mode 100644 index 000..68fb574 --- /dev/null +++ b/board/ti/am3517evm/Makefile @@ -0,0 +1,46 @@ +# +# Author: Vaibhav Hiremath +# +# Derived from evm code +# +# Copyright (C) 2009 Texas Instruments Incorporated +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# + +include $(TOPDIR)/config.mk + +LIB= $(obj)lib$(BOARD).a + +COBJS := am3517evm.o + +SRCS := $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) + +$(LIB):$(obj).depend $(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) + +clean: + rm -f $(OBJS) + +distclean: clean + rm -f $(LIB) core *.bak $(obj).depend + +# + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend diff --git a/board/ti/am3517evm/am3517evm.c b/board/ti/am3517evm/am3517evm.c new file mode 100644 index 000..0b6b5a4 --- /dev/null +++ b/board/ti/am3517evm/am3517evm.c @@ -0,0 +1,76 @@ +/* + * am3517evm.c - board file for TI's AM3517 family of devices. + * + * Author: Vaibhav Hiremath + * + * Derived from evm code + * + * Copyright (C) 2009 Texas Instruments Incorporated + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include +#include +#include +#include +#include +#include +#include +#include "am3517evm.h" + +/* + * Routine: board_init + * Description: Early hardware init. + */ +int board_init(void) +{ + DECLARE_GLOBAL_DATA_PTR; + + gpmc_init(); /* in SRAM or SDRAM, finish GPMC */ + /* board id for Linux */ + gd->bd->bi_arch_number = MACH_TYPE_OMAP3517EVM; + /* boot param addr */ + gd->bd->bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100); + + return 0; +} + +/* + * Routine: misc_init_r + * Description: Init ethernet (done here so udelay works) + */ +int misc_init_r(void) +{ + +#ifdef CONFIG_DRIVER_OMAP34XX_I2C + i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE); +#endif + + dieid_num_r(); + + return 0; +} + +/* + * Routine: set_muxconf_regs + * Description: Setting up the configuration Mux registers specific to the + * hardware. Many pins need to be moved from protect to primary + * mode. + */ +void set_muxconf_regs(void) +{ + MUX_AM3517EVM(); +} diff --git a/board/ti/am3517evm/am3517evm.h b/board/ti/am3517evm/am3517evm.h new file mode 100644 index 000..7897912 --- /dev/null +++ b/board/ti/am3517evm/am3517evm.h @@ -0,0 +1,388 @@ +/* + * am3517evm.h - board header file for TI's AM3517 family of devices. + * + * Author: Vaibhav Hiremath + * + * Derived from evm code + * + * Copyright (C) 2009 Texas Instruments Incorporated + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program
[U-Boot] [PATCH] omap3_mmc: Encapsulate twl4030 under option CONFIG_TWL4030_POWER
From: Vaibhav Hiremath Fixes the build/compilation error if we try to re-use the omap3_mmc code without TWL4030_POWER. Signed-off-by: Vaibhav Hiremath --- drivers/mmc/omap3_mmc.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/mmc/omap3_mmc.c b/drivers/mmc/omap3_mmc.c index 513dd25..96c0e65 100644 --- a/drivers/mmc/omap3_mmc.c +++ b/drivers/mmc/omap3_mmc.c @@ -63,7 +63,9 @@ unsigned char mmc_board_init(void) { t2_t *t2_base = (t2_t *)T2_BASE; +#if defined(CONFIG_TWL4030_POWER) twl4030_power_mmc_init(); +#endif writel(readl(&t2_base->pbias_lite) | PBIASLITEPWRDNZ1 | PBIASSPEEDCTRL0 | PBIASLITEPWRDNZ0, -- 1.6.2.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH V4] OMAP3EVM: Added NAND support
From: Vaibhav Hiremath The EVMS have been shipping with NAND (instead of OneNAND) as default. So, this patch sets NAND as default. To choose OneNAND, define CMD_ONENAND instead of CMD_NAND in the config file omap3_evm.h Changes from V3 :- - Added undef statement for CMD_ONENAND. Signed-off-by: Vaibhav Hiremath --- include/configs/omap3_evm.h |9 - 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/include/configs/omap3_evm.h b/include/configs/omap3_evm.h index 6709edc..36cb5e0 100644 --- a/include/configs/omap3_evm.h +++ b/include/configs/omap3_evm.h @@ -113,7 +113,8 @@ #define CONFIG_CMD_I2C /* I2C serial bus support */ #define CONFIG_CMD_MMC /* MMC support */ -#define CONFIG_CMD_ONENAND /* ONENAND support */ +#undef CONFIG_CMD_ONENAND /* ONENAND support */ +#define CONFIG_CMD_NAND/* NAND support */ #define CONFIG_CMD_DHCP #define CONFIG_CMD_PING @@ -271,7 +272,13 @@ #define CONFIG_SYS_MONITOR_BASECONFIG_SYS_FLASH_BASE #define CONFIG_SYS_ONENAND_BASEONENAND_MAP +#if defined(CONFIG_CMD_NAND) +#define CONFIG_NAND_OMAP_GPMC +#define GPMC_NAND_ECC_LP_x16_LAYOUT1 +#define CONFIG_ENV_IS_IN_NAND 1 +#elif defined(CONFIG_CMD_ONENAND) #define CONFIG_ENV_IS_IN_ONENAND 1 +#endif #define ONENAND_ENV_OFFSET 0x26 /* environment starts here */ #define SMNAND_ENV_OFFSET 0x26 /* environment starts here */ -- 1.6.2.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH V3] OMAP3EVM: Added NAND support
From: Vaibhav Hiremath Changes: - Changed default configuration from ONENAND to NAND - User can choose between ONENAND and NAND, define either CMD_NAND or CMD_ONENAND in omap3_evm.h Signed-off-by: Vaibhav Hiremath --- include/configs/omap3_evm.h |9 - 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/include/configs/omap3_evm.h b/include/configs/omap3_evm.h index a5514ae..71bab7d 100644 --- a/include/configs/omap3_evm.h +++ b/include/configs/omap3_evm.h @@ -110,7 +110,8 @@ #define CONFIG_CMD_I2C /* I2C serial bus support */ #define CONFIG_CMD_MMC /* MMC support */ -#define CONFIG_CMD_ONENAND /* ONENAND support */ +/*#define CONFIG_CMD_ONENAND*/ /* ONENAND support */ +#define CONFIG_CMD_NAND/* NAND support */ #define CONFIG_CMD_DHCP #define CONFIG_CMD_PING @@ -268,7 +269,13 @@ #define CONFIG_SYS_MONITOR_BASECONFIG_SYS_FLASH_BASE #define CONFIG_SYS_ONENAND_BASEONENAND_MAP +#if defined(CONFIG_CMD_NAND) +#define CONFIG_NAND_OMAP_GPMC +#define GPMC_NAND_ECC_LP_x16_LAYOUT1 +#define CONFIG_ENV_IS_IN_NAND 1 +#elif defined(CONFIG_CMD_ONENAND) #define CONFIG_ENV_IS_IN_ONENAND 1 +#endif #define ONENAND_ENV_OFFSET 0x26 /* environment starts here */ #define SMNAND_ENV_OFFSET 0x26 /* environment starts here */ -- 1.6.2.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] OMAP3EVM: Added NAND support
From: Vaibhav Hiremath Signed-off-by: Vaibhav Hiremath --- include/configs/omap3_evm.h | 10 +- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/include/configs/omap3_evm.h b/include/configs/omap3_evm.h index a5514ae..fbc45dc 100644 --- a/include/configs/omap3_evm.h +++ b/include/configs/omap3_evm.h @@ -110,7 +110,8 @@ #define CONFIG_CMD_I2C /* I2C serial bus support */ #define CONFIG_CMD_MMC /* MMC support */ -#define CONFIG_CMD_ONENAND /* ONENAND support */ +/*#define CONFIG_CMD_ONENAND*/ /* ONENAND support */ +#define CONFIG_CMD_NAND/* NAND support */ #define CONFIG_CMD_DHCP #define CONFIG_CMD_PING @@ -141,6 +142,7 @@ /* to access */ /* nand at CS0 */ + #define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of */ /* NAND devices */ #define CONFIG_SYS_64BIT_VSPRINTF /* needed for nand_util.c */ @@ -268,7 +270,13 @@ #define CONFIG_SYS_MONITOR_BASECONFIG_SYS_FLASH_BASE #define CONFIG_SYS_ONENAND_BASEONENAND_MAP +#if defined(CONFIG_CMD_NAND) +#define CONFIG_NAND_OMAP_GPMC +#define GPMC_NAND_ECC_LP_x16_LAYOUT1 +#define CONFIG_ENV_IS_IN_NAND 1 +#elif defined(CONFIG_CMD_ONENAND) #define CONFIG_ENV_IS_IN_ONENAND 1 +#endif #define ONENAND_ENV_OFFSET 0x26 /* environment starts here */ #define SMNAND_ENV_OFFSET 0x26 /* environment starts here */ -- 1.6.2.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] OMAP3EVM: Added NAND support
From: Vaibhav Hiremath User can now choose between NAND and ONENAND support in omap3_evm.h Signed-off-by: Vaibhav Hiremath --- include/configs/omap3_evm.h | 27 ++- 1 files changed, 26 insertions(+), 1 deletions(-) diff --git a/include/configs/omap3_evm.h b/include/configs/omap3_evm.h index a5514ae..3434306 100644 --- a/include/configs/omap3_evm.h +++ b/include/configs/omap3_evm.h @@ -110,7 +110,8 @@ #define CONFIG_CMD_I2C /* I2C serial bus support */ #define CONFIG_CMD_MMC /* MMC support */ -#define CONFIG_CMD_ONENAND /* ONENAND support */ +/*#define CONFIG_CMD_ONENAND*/ /* ONENAND support */ +#define CONFIG_CMD_NAND/* NAND support */ #define CONFIG_CMD_DHCP #define CONFIG_CMD_PING @@ -141,6 +142,7 @@ /* to access */ /* nand at CS0 */ + #define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of */ /* NAND devices */ #define CONFIG_SYS_64BIT_VSPRINTF /* needed for nand_util.c */ @@ -268,7 +270,13 @@ #define CONFIG_SYS_MONITOR_BASECONFIG_SYS_FLASH_BASE #define CONFIG_SYS_ONENAND_BASEONENAND_MAP +#if defined(CONFIG_CMD_NAND) +#define CONFIG_NAND_OMAP_GPMC +#define GPMC_NAND_ECC_LP_x16_LAYOUT1 +#define CONFIG_ENV_IS_IN_NAND 1 +#elif defined(CONFIG_CMD_ONENAND) #define CONFIG_ENV_IS_IN_ONENAND 1 +#endif #define ONENAND_ENV_OFFSET 0x26 /* environment starts here */ #define SMNAND_ENV_OFFSET 0x26 /* environment starts here */ @@ -300,6 +308,23 @@ extern unsigned int boot_flash_sec; extern unsigned int boot_flash_type; #endif + +#define WRITE_NAND_COMMAND(d, adr)\ + writel(d, &nand_cs_base->nand_cmd) +#define WRITE_NAND_ADDRESS(d, adr)\ + writel(d, &nand_cs_base->nand_adr) +#define WRITE_NAND(d, adr) writew(d, &nand_cs_base->nand_dat) +#define READ_NAND(adr) readl(&nand_cs_base->nand_dat) + +/* Other NAND Access APIs */ +#define NAND_WP_OFF() do {readl(&gpmc_cfg_base->config) |= GPMC_CONFIG_WP; } \ + while (0) +#define NAND_WP_ON() do {readl(&gpmc_cfg_base->config) &= ~GPMC_CONFIG_WP; } \ + while (0) +#define NAND_DISABLE_CE(nand) +#define NAND_ENABLE_CE(nand) +#define NAND_WAIT_READY(nand) udelay(10) + /* * SMSC9115 Ethernet from SMSC9118 family * -- 1.6.2.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot