Add support for Keystone2 SoC and K2HK EVM
Subsystems (6)
cover Add support for Keystone2 SoC and K2HK EVM
- Resending since I missed some in the CC
This patch series add support for keystone2 SoC and K2HK EVM.
Following patches were reviewed before in this list and v1 of the same is send with review comments incorporated:-
- tools: mkimage: add support for gpimage format
- arm: add support for arch timer
- NAND: DaVinci: allow forced disable of subpage writes
The patch below is added as a seperate patch based on comments:-
- tools: sort the entries in Makefile
Murali Karicheri (5):
tools: sort the entries in Makefile
tools: mkimage: add support for gpimage format
NAND: DaVinci: allow forced disable of subpage writes
k2hk: add support for k2hk SOC and EVM
keystone2: net: add keystone ethernet driver
Vitaly Andrianov (2):
fdt: call ft_board_setup_ex() at the end of image_setup_libfdt()
arm: add support for arch timer
Makefile | 19 + README | 5 + arch/arm/cpu/armv7/keystone/Makefile | 19 + arch/arm/cpu/armv7/keystone/aemif.c | 79 ++ arch/arm/cpu/armv7/keystone/clock-k2hk.c | 106 +++ arch/arm/cpu/armv7/keystone/clock.c | 200 +++++ arch/arm/cpu/armv7/keystone/cmd_clock.c | 139 ++++ arch/arm/cpu/armv7/keystone/cmd_mon.c | 131 +++ arch/arm/cpu/armv7/keystone/config.mk | 14 + arch/arm/cpu/armv7/keystone/ddr3.c | 69 ++ arch/arm/cpu/armv7/keystone/init.c | 49 ++ arch/arm/cpu/armv7/keystone/keystone_nav.c | 377 +++++++++ arch/arm/cpu/armv7/keystone/lowlevel_init.S | 13 + arch/arm/cpu/armv7/keystone/msmc.c | 69 ++ arch/arm/cpu/armv7/keystone/psc.c | 240 ++++++ arch/arm/cpu/armv7/keystone/spl.c | 45 + arch/arm/include/asm/arch-keystone/clock-k2hk.h | 109 +++ arch/arm/include/asm/arch-keystone/clock.h | 17 + arch/arm/include/asm/arch-keystone/clock_defs.h | 97 +++ arch/arm/include/asm/arch-keystone/emac_defs.h | 255 ++++++ arch/arm/include/asm/arch-keystone/emif_defs.h | 75 ++ arch/arm/include/asm/arch-keystone/hardware-k2hk.h | 143 ++++ arch/arm/include/asm/arch-keystone/hardware.h | 174 ++++ arch/arm/include/asm/arch-keystone/i2c_defs.h | 86 ++ arch/arm/include/asm/arch-keystone/keystone_nav.h | 194 +++++ arch/arm/include/asm/arch-keystone/nand_defs.h | 25 + arch/arm/include/asm/arch-keystone/psc_defs.h | 91 +++ arch/arm/include/asm/arch-keystone/spl.h | 12 + arch/arm/lib/Makefile | 1 + arch/arm/lib/arch_timer.c | 58 ++ board/ti/k2hk_evm/Makefile | 9 + board/ti/k2hk_evm/README | 56 ++ board/ti/k2hk_evm/board.c | 311 +++++++ board/ti/k2hk_evm/ddr3.c | 269 ++++++ boards.cfg | 1 + common/image-fdt.c | 5 + common/image.c | 1 + drivers/i2c/Makefile | 1 + drivers/i2c/keystone_i2c.c | 372 +++++++++ drivers/mtd/nand/davinci_nand.c | 3 + drivers/net/Makefile | 1 + drivers/net/keystone_net.c | 857 ++++++++++++++++++++ drivers/serial/ns16550.c | 8 + include/configs/k2hk_evm.h | 259 ++++++ include/fdt_support.h | 1 + include/image.h | 1 + tools/Makefile | 20 +- tools/gpheader.h | 40 + tools/gpimage-common.c | 80 ++ tools/gpimage.c | 77 ++ tools/imagetool.c | 2 + tools/imagetool.h | 1 + tools/omapimage.c | 104 +-- tools/omapimage.h | 5 - 54 files changed, 5295 insertions(+), 100 deletions(-) create mode 100644 arch/arm/cpu/armv7/keystone/Makefile create mode 100644 arch/arm/cpu/armv7/keystone/aemif.c create mode 100644 arch/arm/cpu/armv7/keystone/clock-k2hk.c create mode 100644 arch/arm/cpu/armv7/keystone/clock.c create mode 100644 arch/arm/cpu/armv7/keystone/cmd_clock.c create mode 100644 arch/arm/cpu/armv7/keystone/cmd_mon.c create mode 100644 arch/arm/cpu/armv7/keystone/config.mk create mode 100644 arch/arm/cpu/armv7/keystone/ddr3.c create mode 100644 arch/arm/cpu/armv7/keystone/init.c create mode 100644 arch/arm/cpu/armv7/keystone/keystone_nav.c create mode 100644 arch/arm/cpu/armv7/keystone/lowlevel_init.S create mode 100644 arch/arm/cpu/armv7/keystone/msmc.c create mode 100644 arch/arm/cpu/armv7/keystone/psc.c create mode 100644 arch/arm/cpu/armv7/keystone/spl.c create mode 100644 arch/arm/include/asm/arch-keystone/clock-k2hk.h create mode 100644 arch/arm/include/asm/arch-keystone/clock.h create mode 100644 arch/arm/include/asm/arch-keystone/clock_defs.h create mode 100644 arch/arm/include/asm/arch-keystone/emac_defs.h create mode 100644 arch/arm/include/asm/arch-keystone/emif_defs.h create mode 100644 arch/arm/include/asm/arch-keystone/hardware-k2hk.h create mode 100644 arch/arm/include/asm/arch-keystone/hardware.h create mode 100644 arch/arm/include/asm/arch-keystone/i2c_defs.h create mode 100644 arch/arm/include/asm/arch-keystone/keystone_nav.h create mode 100644 arch/arm/include/asm/arch-keystone/nand_defs.h create mode 100644 arch/arm/include/asm/arch-keystone/psc_defs.h create mode 100644 arch/arm/include/asm/arch-keystone/spl.h create mode 100644 arch/arm/lib/arch_timer.c create mode 100644 board/ti/k2hk_evm/Makefile create mode 100644 board/ti/k2hk_evm/README create mode 100644 board/ti/k2hk_evm/board.c create mode 100644 board/ti/k2hk_evm/ddr3.c create mode 100644 drivers/i2c/keystone_i2c.c create mode 100644 drivers/net/keystone_net.c create mode 100644 include/configs/k2hk_evm.h create mode 100644 tools/gpheader.h create mode 100644 tools/gpimage-common.c create mode 100644 tools/gpimage.c
Signature · 1 line
1.7.9.5
PATCH 1/7 fdt: call ft_board_setup_ex() at the end of image_setup_libfdt()
From: Vitaly Andrianov <[email protected]>
The keystone2 SOC requires to fix all 32 bit aliased addresses to their 36 physical format. This has to happen after all fdt nodes are added or modified.
---
- Resending with some more in cc
common/image-fdt.c | 5 +++++ include/fdt_support.h | 1 + 2 files changed, 6 insertions(+)
common/image-fdt.c +5 -0
@@ -487,5 +487,10 @@ int image_setup_libfdt(bootm_headers_t *images, void *blob,if (!ft_verify_fdt (blob))return -1 ; +#ifdef CONFIG_SOC_K2HK +if (IMAAGE_OF_BOARD_SETUP ) +ft_board_setup_ex (blob, gd->bd); +#endif +return 0 ; }
include/fdt_support.h +1 -0
@@ -63,6 +63,7 @@ int fdt_pci_dma_ranges(void *blob, int phb_off, struct pci_controller *hose);#endif void ft_board_setup (void *blob,bd_t *bd); +void ft_board_setup_ex (void *blob,bd_t *bd);void ft_cpu_setup (void *blob,bd_t *bd);void ft_pci_setup (void *blob,bd_t *bd);
Signature · 1 line
1.7.9.5
PATCH 1/7 fdt: call ft_board_setup_ex() at the end of image_setup_libfdt()
Quoted 7 lines · Murali Karicheri
From: Vitaly Andrianov <[email protected]>
The keystone2 SOC requires to fix all 32 bit aliased addresses to their 36 physical format. This has to happen after all fdt nodes are added or modified.
Signed-off-by Vitaly Andrianov <[email protected]>
Why can't this be done with the existing CONFIG_OF_BOARD_SETUP and 'fdt boardsetup' command?
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140210/e1d775a1/attachment.pgp>
PATCH 1/7 fdt: call ft_board_setup_ex() at the end of image_setup_libfdt()
Quoted 4 lines · Tom Rini
Quoted 2 lines · Murali Karicheri
From: Vitaly Andrianov <[email protected]>
Quoted 8 lines
Quoted 5 lines
The keystone2 SOC requires to fix all 32 bit aliased addresses to their 36 physical format. This has to happen after all fdt nodes are added or modified.
Signed-off-by Vitaly Andrianov <[email protected]>Why can't this be done with the existing
CONFIG_OF_BOARD_SETUPand 'fdt boardsetup' command?
Hi Tom,
The fdt_board_setup() is called at the beginning of the image_setup_libfdt().
After that fdt can be updated by fdt_resize(), fdt_initrd() etc. All those updates
have to be fixed. That is why we have to call the ft_board_setup_ex() at the end
of the image_setup_libfdt().
Thanks,
Vitaly Andrianov.
PATCH 2/7 tools: sort the entries in Makefile
In reply to Murali KaricheriThe NOPED_OBJ_FILES, dumpimage and mkimage object file entries are to be kept sorted. This patch fix this issue.
---
- Resend with some more in cc
- As per review comments
tools/Makefile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
tools/Makefile +7 -7
@@ -77,10 +77,10 @@ NOPED_OBJ_FILES-y += aisimage.o NOPED_OBJ_FILES-y += default_image.o NOPED_OBJ_FILES-y += dumpimage.o NOPED_OBJ_FILES-y += fit_image.o +NOPED_OBJ_FILES-y += imagetool.o NOPED_OBJ_FILES-y += image-host.o NOPED_OBJ_FILES-y += imximage.o NOPED_OBJ_FILES-y += kwbimage.o -NOPED_OBJ_FILES-y += imagetool.o NOPED_OBJ_FILES-y += mkenvimage.o NOPED_OBJ_FILES-y += mkimage.o NOPED_OBJ_FILES-y += mxsimage.o
@@ -88,8 +88,8 @@ NOPED_OBJ_FILES-y += omapimage.o NOPED_OBJ_FILES-y += os_support.o NOPED_OBJ_FILES-y += pblimage.o NOPED_OBJ_FILES-y += proftool.o -NOPED_OBJ_FILES-y += ublimage.o NOPED_OBJ_FILES-y += relocate-rela.o +NOPED_OBJ_FILES-y += ublimage.o OBJ_FILES-$(CONFIG_BUILD_ENVCRC) += envcrc.o OBJ_FILES-$(CONFIG_CMD_LOADS) += img2srec.o OBJ_FILES-$(CONFIG_CMD_NET) += gen_eth_addr.o
@@ -209,14 +209,14 @@ $(obj)dumpimage$(SFX): $(obj)aisimage.o \ $(FIT_SIG_OBJS) \ $(obj)crc32.o \ $(obj)default_image.o \ + $(obj)dumpimage.o \ $(obj)fit_image.o \ - $(obj)image-fit.o \ $(obj)image.o \ - $(obj)image-host.o \ $(obj)imagetool.o \ + $(obj)image-fit.o \ + $(obj)image-host.o \ $(obj)imximage.o \ $(obj)kwbimage.o \ - $(obj)dumpimage.o \ $(obj)md5.o \ $(obj)mxsimage.o \ $(obj)omapimage.o \
@@ -239,10 +239,10 @@ $(obj)mkimage$(SFX): $(obj)aisimage.o \ $(obj)crc32.o \ $(obj)default_image.o \ $(obj)fit_image.o \ - $(obj)image-fit.o \ - $(obj)image-host.o \ $(obj)image.o \ $(obj)imagetool.o \ + $(obj)image-host.o \ + $(obj)image-fit.o \ $(obj)imximage.o \ $(obj)kwbimage.o \ $(obj)md5.o \
Signature · 1 line
1.7.9.5
PATCH 3/7 tools: mkimage: add support for gpimage format
In reply to Murali KaricheriThis patch add support for gpimage format as a preparatory patch for porting u-boot for keystone2 devices and is based on omapimage format. It re-uses gph header to store the size and loadaddr as done in omapimage.c
---
- Resending with some more in cc
- Addressed review comments against initial version
- refactored the code to avoid redundant code
common/image.c | 1 + include/image.h | 1 + tools/Makefile | 6 +++ tools/gpheader.h | 40 +++++++++++++++++++ tools/gpimage-common.c | 80 +++++++++++++++++++++++++++++++++++++ tools/gpimage.c | 77 +++++++++++++++++++++++++++++++++++ tools/imagetool.c | 2 + tools/imagetool.h | 1 + tools/omapimage.c | 104 ++++++++---------------------------------------- tools/omapimage.h | 5 --- 10 files changed, 224 insertions(+), 93 deletions(-) create mode 100644 tools/gpheader.h create mode 100644 tools/gpimage-common.c create mode 100644 tools/gpimage.c
common/image.c +1 -0
@@ -124,6 +124,7 @@ static const table_entry_t uimage_type[] = { { IH_TYPE_FILESYSTEM, "filesystem", "Filesystem Image", }, { IH_TYPE_FIRMWARE, "firmware", "Firmware", }, { IH_TYPE_FLATDT, "flat_dt", "Flat Device Tree", }, + { IH_TYPE_GPIMAGE, "gpimage", "TI Keystone SPL Image",}, { IH_TYPE_KERNEL, "kernel", "Kernel Image", }, { IH_TYPE_KERNEL_NOLOAD, "kernel_noload", "Kernel Image (no loading done)", }, { IH_TYPE_KWBIMAGE, "kwbimage", "Kirkwood Boot Image",},
include/image.h +1 -0
@@ -214,6 +214,7 @@ struct lmb;#define IH_TYPE_KERNEL_NOLOAD 14/* OS Kernel Image, can run from any load address */ #define IH_TYPE_PBLIMAGE 15/* Freescale PBL Boot Image */ #define IH_TYPE_MXSIMAGE 16/* Freescale MXSBoot Image */ +#define IH_TYPE_GPIMAGE 17/* TI Keystone GPHeader Image */ /* * Compression Types
tools/Makefile +6 -0
@@ -77,6 +77,8 @@ NOPED_OBJ_FILES-y += aisimage.o NOPED_OBJ_FILES-y += default_image.o NOPED_OBJ_FILES-y += dumpimage.o NOPED_OBJ_FILES-y += fit_image.o +NOPED_OBJ_FILES-y += gpimage.o +NOPED_OBJ_FILES-y += gpimage-common.o NOPED_OBJ_FILES-y += imagetool.o NOPED_OBJ_FILES-y += image-host.o NOPED_OBJ_FILES-y += imximage.o
@@ -211,6 +213,8 @@ $(obj)dumpimage$(SFX): $(obj)aisimage.o \ $(obj)default_image.o \ $(obj)dumpimage.o \ $(obj)fit_image.o \ + $(obj)gpimage.o \ + $(obj)gpimage-common.o \ $(obj)image.o \ $(obj)imagetool.o \ $(obj)image-fit.o \
@@ -239,6 +243,8 @@ $(obj)mkimage$(SFX): $(obj)aisimage.o \ $(obj)crc32.o \ $(obj)default_image.o \ $(obj)fit_image.o \ + $(obj)gpimage.o \ + $(obj)gpimage-common.o \ $(obj)image.o \ $(obj)imagetool.o \ $(obj)image-host.o \
tools/gpheader.h new file +40 -0
@@ -0,0 +1,40 @@ +/* +* (C) Copyright 2014 +* Texas Instruments Incorporated +* Refactored common functions in to gpimage-common.c. Include this common +* header file +* +* (C) Copyright 2010 +* Linaro LTD, www.linaro.org +* Author: John Rigby <[email protected]> +* Based on TI's signGP.c +* +* (C) Copyright 2009 +* Stefano Babic, DENX Software Engineering, sbabic at denx.de. +* +* (C) Copyright 2008 +* Marvell Semiconductor <www.marvell.com> +* Written-by: Prafulla Wadaskar <[email protected]> +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#ifndef _GPIMAGE_H_ +#define _GPIMAGE_H_ + +/* common headers for gpimage and omapimage formats */ +struct gp_header { +uint32_t size; +uint32_t load_addr; +}; +#define GPIMAGE_HDR_SIZE (sizeof(struct gp_header)) + +/* common functions across gpimage and omapimage handlers */ +int valid_gph_size (uint32_t size); +int valid_gph_load_addr (uint32_t load_addr); +int gph_verify_header (struct gp_header *gph,int be); +void gph_print_header (const struct gp_header *gph,int be); +void gph_set_header (struct gp_header *gph,uint32_t size,uint32_t load_addr, +int be); +int gpimage_check_params (struct image_tool_params *params); +#endif
tools/gpimage-common.c new file +80 -0
80 lines not on this page · raw message
tools/gpimage.c new file +77 -0
77 lines not on this page · raw message
tools/imagetool.c +2 -0
@@ -45,6 +45,8 @@ void register_image_tool(imagetool_register_t image_register)init_ubl_image_type ();/* Init Davinci AIS support */ init_ais_image_type (); +/* Init TI Keystone boot image generation/list support */ +init_gpimage_type (); }/*
tools/imagetool.h +1 -0
@@ -167,6 +167,7 @@ void init_mxs_image_type(void);void init_fit_image_type (void );void init_ubl_image_type (void );void init_omap_image_type (void ); +void init_gpimage_type (void );void pbl_load_uboot (int fd,struct image_tool_params *mparams);
tools/omapimage.c +16 -88
180 lines not on this page · raw message
tools/omapimage.h +0 -5
@@ -25,10 +25,5 @@ struct ch_settings { uint32_t flags; }; -struct gp_header { -uint32_t size; -uint32_t load_addr; -}; -#define KEY_CHSETTINGS 0xC0C0C0C1#endif /* _OMAPIMAGE_H_ */
Signature · 1 line
1.7.9.5
PATCH 4/7 arm: add support for arch timer
In reply to Murali KaricheriFrom: Vitaly Andrianov <[email protected]>
This patch add basic support for the architecture timer found on recent ARMv7 based SoCs.
---
- Resending with some more in cc
- Resending the patch along with SoC/board patch
arch/arm/lib/Makefile | 1 + arch/arm/lib/arch_timer.c | 58 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 arch/arm/lib/arch_timer.c
arch/arm/lib/Makefile +1 -0
@@ -42,6 +42,7 @@ obj-$(CONFIG_USE_ARCH_MEMCPY) += memcpy.o else obj-$(CONFIG_SPL_FRAMEWORK) += spl.o endif +obj-$(CONFIG_SYS_ARCH_TIMER) += arch_timer.o ifdef CONFIG_ARM64 obj-y += interrupts_64.o
arch/arm/lib/arch_timer.c new file +58 -0
58 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH 5/7 NAND: DaVinci: allow forced disable of subpage writes
In reply to Murali KaricheriThis patch introduces a configurable mechanism to disable subpage writes in the DaVinci NAND driver.
---
- Resend with some more in cc
- Updated README to include the option as per review comments
README | 5 +++++ drivers/mtd/nand/davinci_nand.c | 3 +++ 2 files changed, 8 insertions(+)
README +5 -0
@@ -4427,6 +4427,11 @@ Low Level (hardware related) configuration options: - CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC: Enables the RTC32K OSC on AM33xx based plattforms +- CONFIG_SYS_NAND_NO_SUBPAGE_WRITE + Option to disable subpage write in NAND driver + Example driver that use this: + drivers/mtd/nand/davinci_nand.c + Freescale QE/FMAN Firmware Support: -----------------------------------
drivers/mtd/nand/davinci_nand.c +3 -0
@@ -609,6 +609,9 @@ void davinci_nand_init(struct nand_chip *nand)#ifdef CONFIG_SYS_NAND_USE_FLASH_BBT nand->bbt_options |=NAND_BBT_USE_FLASH ;#endif +#ifdef CONFIG_SYS_NAND_NO_SUBPAGE_WRITE + nand->options |=NAND_NO_SUBPAGE_WRITE ; +#endif #ifdef CONFIG_SYS_NAND_HW_ECC nand->ecc.mode =NAND_ECC_HW ; nand->ecc.size =512 ;
Signature · 1 line
1.7.9.5
PATCH 6/7 k2hk: add support for k2hk SOC and EVM
In reply to Murali Karicherik2hk EVM is based on Texas Instruments Keystone2 Hawking/Kepler SoC. Keystone2 SoC has ARM v7 Cortex-A15 MPCore processor. Please refer the ti/k2hk_evm/README for details on the board, build and other information.
This patch add support for keystone architecture and k2hk evm.
---
- Resend with some more in cc
Makefile | 19 + arch/arm/cpu/armv7/keystone/Makefile | 18 + arch/arm/cpu/armv7/keystone/aemif.c | 79 +++++ arch/arm/cpu/armv7/keystone/clock-k2hk.c | 106 ++++++ arch/arm/cpu/armv7/keystone/clock.c | 200 +++++++++++ arch/arm/cpu/armv7/keystone/cmd_clock.c | 139 ++++++++ arch/arm/cpu/armv7/keystone/cmd_mon.c | 131 +++++++ arch/arm/cpu/armv7/keystone/config.mk | 14 + arch/arm/cpu/armv7/keystone/ddr3.c | 69 ++++ arch/arm/cpu/armv7/keystone/init.c | 49 +++ arch/arm/cpu/armv7/keystone/lowlevel_init.S | 13 + arch/arm/cpu/armv7/keystone/msmc.c | 69 ++++ arch/arm/cpu/armv7/keystone/psc.c | 240 +++++++++++++ arch/arm/cpu/armv7/keystone/spl.c | 45 +++ arch/arm/include/asm/arch-keystone/clock-k2hk.h | 109 ++++++ arch/arm/include/asm/arch-keystone/clock.h | 17 + arch/arm/include/asm/arch-keystone/clock_defs.h | 97 +++++ arch/arm/include/asm/arch-keystone/emif_defs.h | 75 ++++ arch/arm/include/asm/arch-keystone/hardware-k2hk.h | 143 ++++++++ arch/arm/include/asm/arch-keystone/hardware.h | 174 +++++++++ arch/arm/include/asm/arch-keystone/i2c_defs.h | 86 +++++ arch/arm/include/asm/arch-keystone/nand_defs.h | 25 ++ arch/arm/include/asm/arch-keystone/psc_defs.h | 91 +++++ arch/arm/include/asm/arch-keystone/spl.h | 12 + board/ti/k2hk_evm/Makefile | 9 + board/ti/k2hk_evm/README | 56 +++ board/ti/k2hk_evm/board.c | 246 +++++++++++++ board/ti/k2hk_evm/ddr3.c | 269 ++++++++++++++ boards.cfg | 1 + drivers/i2c/Makefile | 1 + drivers/i2c/keystone_i2c.c | 372 ++++++++++++++++++++ drivers/serial/ns16550.c | 8 + include/configs/k2hk_evm.h | 221 ++++++++++++ 33 files changed, 3203 insertions(+) create mode 100644 arch/arm/cpu/armv7/keystone/Makefile create mode 100644 arch/arm/cpu/armv7/keystone/aemif.c create mode 100644 arch/arm/cpu/armv7/keystone/clock-k2hk.c create mode 100644 arch/arm/cpu/armv7/keystone/clock.c create mode 100644 arch/arm/cpu/armv7/keystone/cmd_clock.c create mode 100644 arch/arm/cpu/armv7/keystone/cmd_mon.c create mode 100644 arch/arm/cpu/armv7/keystone/config.mk create mode 100644 arch/arm/cpu/armv7/keystone/ddr3.c create mode 100644 arch/arm/cpu/armv7/keystone/init.c create mode 100644 arch/arm/cpu/armv7/keystone/lowlevel_init.S create mode 100644 arch/arm/cpu/armv7/keystone/msmc.c create mode 100644 arch/arm/cpu/armv7/keystone/psc.c create mode 100644 arch/arm/cpu/armv7/keystone/spl.c create mode 100644 arch/arm/include/asm/arch-keystone/clock-k2hk.h create mode 100644 arch/arm/include/asm/arch-keystone/clock.h create mode 100644 arch/arm/include/asm/arch-keystone/clock_defs.h create mode 100644 arch/arm/include/asm/arch-keystone/emif_defs.h create mode 100644 arch/arm/include/asm/arch-keystone/hardware-k2hk.h create mode 100644 arch/arm/include/asm/arch-keystone/hardware.h create mode 100644 arch/arm/include/asm/arch-keystone/i2c_defs.h create mode 100644 arch/arm/include/asm/arch-keystone/nand_defs.h create mode 100644 arch/arm/include/asm/arch-keystone/psc_defs.h create mode 100644 arch/arm/include/asm/arch-keystone/spl.h create mode 100644 board/ti/k2hk_evm/Makefile create mode 100644 board/ti/k2hk_evm/README create mode 100644 board/ti/k2hk_evm/board.c create mode 100644 board/ti/k2hk_evm/ddr3.c create mode 100644 drivers/i2c/keystone_i2c.c create mode 100644 include/configs/k2hk_evm.h
Makefile +19 -0
@@ -491,6 +491,23 @@ $(obj)u-boot.spr: $(obj)u-boot.img $(obj)spl/u-boot-spl.bin --pad-to=$(CONFIG_SPL_PAD_TO) --gap-fill=0xff $@ cat $(obj)u-boot.img >> $@ +$(obj)u-boot-spi.gph: $(obj)u-boot.img $(obj)spl/u-boot-spl.bin + $(obj)tools/mkimage -A $(ARCH) -T gpimage -C none \ + -a $(CONFIG_SPL_TEXT_BASE) -e $(CONFIG_SPL_TEXT_BASE) \ + -n SPL -d $(obj)spl/u-boot-spl.bin $(obj)spl/u-boot-spl.gph + $(OBJCOPY) ${OBJCFLAGS} -I binary \ + --pad-to=$(CONFIG_SPL_PAD_TO) --gap-fill=0 -O binary \ + $(obj)spl/u-boot-spl.gph $(obj)spl/u-boot-spl-pad.gph + cat $(obj)spl/u-boot-spl-pad.gph $(obj)u-boot.img > $@ + +$(obj)u-boot-nand.gph: $(obj)u-boot.bin + $(obj)tools/mkimage -A $(ARCH) -T gpimage -C none \ + -a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_TEXT_BASE) \ + -n U-Boot -d $(obj)u-boot.bin $(obj)gph-u-boot.bin + @dd if=/dev/zero of=$(obj)zero.bin bs=8 count=1 2>/dev/null + @cat $(obj)gph-u-boot.bin $(obj)zero.bin > $@ + @rm $(obj)zero.bin + ifneq ($(CONFIG_TEGRA),) $(obj)u-boot-nodtb-tegra.bin: $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(CONFIG_SYS_TEXT_BASE) -O binary $(obj)spl/u-boot-spl $(obj)spl/u-boot-spl-pad.bin
@@ -841,12 +858,14 @@ clobber: tidy @rm -f $(obj)u-boot.dtb @rm -f $(obj)u-boot.sb @rm -f $(obj)u-boot.spr + @rm -f $(obj)u-boot-*.gph @rm -f $(obj)nand_spl/{u-boot.{lds,lst},System.map} @rm -f $(obj)nand_spl/{u-boot-nand_spl.lds,u-boot-spl,u-boot-spl.map} @rm -f $(obj)spl/{u-boot-spl,u-boot-spl.bin,u-boot-spl.map} @rm -f $(obj)spl/u-boot-spl.lds @rm -f $(obj)tpl/{u-boot-tpl,u-boot-tpl.bin,u-boot-tpl.map} @rm -f $(obj)tpl/u-boot-spl.lds + @rm -f $(obj)spl/{u-boot-spl.gph,u-boot-spl-pad.gph} @rm -f $(obj)MLO MLO.byteswap @rm -f $(obj)SPL @rm -f $(obj)tools/xway-swap-bytes
arch/arm/cpu/armv7/keystone/Makefile new file +18 -0
@@ -0,0 +1,18 @@ +# +# (C) Copyright 2012-2014 +# Texas Instruments Incorporated, <www.ti.com> +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y += aemif.o +obj-y += init.o +obj-y += psc.o +obj-y += clock.o +obj-y += cmd_clock.o +obj-y += cmd_mon.o +obj-y += msmc.o +obj-y += lowlevel_init.o +obj-$(CONFIG_SPL_BUILD) += spl.o +obj-y += ddr3.o +
arch/arm/cpu/armv7/keystone/aemif.c new file +79 -0
79 lines not on this page · raw message
arch/arm/cpu/armv7/keystone/clock-k2hk.c new file +106 -0
106 lines not on this page · raw message
arch/arm/cpu/armv7/keystone/clock.c new file +200 -0
200 lines not on this page · raw message
arch/arm/cpu/armv7/keystone/cmd_clock.c new file +139 -0
139 lines not on this page · raw message
arch/arm/cpu/armv7/keystone/cmd_mon.c new file +131 -0
131 lines not on this page · raw message
arch/arm/cpu/armv7/keystone/config.mk new file +14 -0
@@ -0,0 +1,14 @@ +# (C) Copyright 2012-2014 +# Texas Instruments Incorporated, <www.ti.com> +# SPDX-License-Identifier: GPL-2.0+ +# + +PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float + +# ========================================================================= +# +# Supply options according to compiler version +# +# ========================================================================= +PLATFORM_RELFLAGS +=$(call cc-option,-mshort-load-bytes,\ + $(call cc-option,-malignment-traps,))
arch/arm/cpu/armv7/keystone/ddr3.c new file +69 -0
69 lines not on this page · raw message
arch/arm/cpu/armv7/keystone/init.c new file +49 -0
49 lines not on this page · raw message
arch/arm/cpu/armv7/keystone/lowlevel_init.S new file +13 -0
@@ -0,0 +1,13 @@ +/* + * Keystone2: Low-level pre-relocation initialization + * + * (C) Copyright 2012-2014 + * Texas Instruments Incorporated, <www.ti.com> + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +.globl lowlevel_init +lowlevel_init: + /* nothing for now, maybe needed for more exotic boot modes */ + mov pc, lr
arch/arm/cpu/armv7/keystone/msmc.c new file +69 -0
69 lines not on this page · raw message
arch/arm/cpu/armv7/keystone/psc.c new file +240 -0
240 lines not on this page · raw message
arch/arm/cpu/armv7/keystone/spl.c new file +45 -0
45 lines not on this page · raw message
arch/arm/include/asm/arch-keystone/clock-k2hk.h new file +109 -0
109 lines not on this page · raw message
arch/arm/include/asm/arch-keystone/clock.h new file +17 -0
@@ -0,0 +1,17 @@ +/* +* keystone2: common clock header file +* +* (C) Copyright 2012-2014 +* Texas Instruments Incorporated, <www.ti.com> +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#ifndef __ASM_ARCH_CLOCK_H +#define __ASM_ARCH_CLOCK_H + +#ifdef CONFIG_SOC_K2HK +#include <asm/arch/clock-k2hk.h> +#endif + +#endif
arch/arm/include/asm/arch-keystone/clock_defs.h new file +97 -0
97 lines not on this page · raw message
arch/arm/include/asm/arch-keystone/emif_defs.h new file +75 -0
75 lines not on this page · raw message
arch/arm/include/asm/arch-keystone/hardware-k2hk.h new file +143 -0
143 lines not on this page · raw message
arch/arm/include/asm/arch-keystone/hardware.h new file +174 -0
174 lines not on this page · raw message
arch/arm/include/asm/arch-keystone/i2c_defs.h new file +86 -0
86 lines not on this page · raw message
arch/arm/include/asm/arch-keystone/nand_defs.h new file +25 -0
@@ -0,0 +1,25 @@ +/* +* nand driver definitions to re-use davinci nand driver on Keystone2 +* +* (C) Copyright 2012-2014 +* Texas Instruments Incorporated, <www.ti.com> +* (C) Copyright 2007 Sergey Kubushyn <[email protected]> +* +* SPDX-License-Identifier: GPL-2.0+ +*/ +#ifndef _NAND_DEFS_H_ +#define _NAND_DEFS_H_ + +#include <asm/arch/hardware.h> +#include <linux/mtd/nand.h> + +#define MASK_CLE 0x4000 +#define MASK_ALE 0x2000 + +#define NAND_READ_START 0x00 +#define NAND_READ_END 0x30 +#define NAND_STATUS 0x70 + +extern void davinci_nand_init (struct nand_chip *nand); + +#endif
arch/arm/include/asm/arch-keystone/psc_defs.h new file +91 -0
91 lines not on this page · raw message
arch/arm/include/asm/arch-keystone/spl.h new file +12 -0
@@ -0,0 +1,12 @@ +/* +* (C) Copyright 2012-2014 +* Texas Instruments, <www.ti.com> +* +* SPDX-License-Identifier: GPL-2.0+ +*/ +#ifndef _ASM_ARCH_SPL_H_ +#define _ASM_SPL_H_ + +#define BOOT_DEVICE_SPI 2 + +#endif
board/ti/k2hk_evm/Makefile new file +9 -0
@@ -0,0 +1,9 @@ +# +# K2HK-EVM: board Makefile +# (C) Copyright 2012-2014 +# Texas Instruments Incorporated, <www.ti.com> +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y += board.o +obj-y += ddr3.o
board/ti/k2hk_evm/README new file +56 -0
56 lines not on this page · raw message
board/ti/k2hk_evm/board.c new file +246 -0
246 lines not on this page · raw message
board/ti/k2hk_evm/ddr3.c new file +269 -0
269 lines not on this page · raw message
boards.cfg +1 -0
@@ -362,6 +362,7 @@ Active arm armv7 zynq xilinx zynq zynq_microzed - Active arm armv7 zynq xilinx zynq zynq_zc770_xm010 zynq_zc770:ZC770_XM010 Michal Simek <[email protected]>:Jagannadha Sutradharudu Teki <[email protected]> Active arm armv7 zynq xilinx zynq zynq_zc770_xm012 zynq_zc770:ZC770_XM012 Michal Simek <[email protected]>:Jagannadha Sutradharudu Teki <[email protected]> Active arm armv7 zynq xilinx zynq zynq_zc770_xm013 zynq_zc770:ZC770_XM013 Michal Simek <[email protected]>:Jagannadha Sutradharudu Teki <[email protected]> +Active arm armv7 keystone ti k2hk_evm k2hk_evm - Vitaly Andrianov <[email protected]> Active arm armv7:arm720t tegra114 nvidia dalmore dalmore - Tom Warren <[email protected]> Active arm armv7:arm720t tegra20 avionic-design medcom-wide medcom-wide - Alban Bedel <[email protected]> Active arm armv7:arm720t tegra20 avionic-design plutux plutux - Alban Bedel <[email protected]>
drivers/i2c/Makefile +1 -0
@@ -7,6 +7,7 @@ obj-$(CONFIG_BFIN_TWI_I2C) += bfin-twi_i2c.o obj-$(CONFIG_DRIVER_DAVINCI_I2C) += davinci_i2c.o +obj-$(CONFIG_DRIVER_KEYSTONE_I2C) += keystone_i2c.o obj-$(CONFIG_DW_I2C) += designware_i2c.o obj-$(CONFIG_I2C_MVTWSI) += mvtwsi.o obj-$(CONFIG_I2C_MV) += mv_i2c.o
drivers/i2c/keystone_i2c.c new file +372 -0
368 lines not on this page · raw message
include/configs/k2hk_evm.h new file +221 -0
221 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
1.7.9.5
Part of the diff is not shown here. View the raw message.
PATCH 6/7 k2hk: add support for k2hk SOC and EVM
Quoted 6 lines · Murali Karicheri
k2hk EVM is based on Texas Instruments Keystone2 Hawking/Kepler SoC. Keystone2 SoC has ARM v7 Cortex-A15 MPCore processor. Please refer the ti/k2hk_evm/README for details on the board, build and other information.
This patch add support for keystone architecture and k2hk evm.
Globally, only use
/*
* Multiline comments like this
*/
Quoted 9 lines
+++ b/arch/arm/cpu/armv7/keystone/Makefile
arch/arm/cpu/armv7/keystone/Makefile new file +7
-0@@ -0,0 +1,18 @@ +# +# (C) Copyright 2012-2014 +# Texas Instruments Incorporated, <www.ti.com> +# +# SPDX-License-Identifier: GPL-2.0+ +# +
arch/arm/cpu/armv7/keystone/Makefile line 17
Quoted 10 lines
arch/arm/cpu/armv7/keystone/Makefile new file +10
-0+obj-y += aemif.o +obj-y += init.o +obj-y += psc.o +obj-y += clock.o +obj-y += cmd_clock.o +obj-y += cmd_mon.o +obj-y += msmc.o +obj-y += lowlevel_init.o +obj-$(CONFIG_SPL_BUILD) += spl.o +obj-y += ddr3.o
Mix of space and tab, just tab it all out to line up please.
Quoted 8 lines
arch/arm/cpu/armv7/keystone/aemif.c new file +7
-0+++ b/arch/arm/cpu/armv7/keystone/aemif.c@@ -0,0 +1,79 @@ +/* +* Keystone2: Asynchronous EMIF Configuration +* +* (C) Copyright 2012-2014 +* Texas Instruments Incorporated, <www.ti.com> +*
arch/arm/cpu/armv7/keystone/aemif.c line 16
Quoted 10 lines
arch/arm/cpu/armv7/keystone/aemif.c new file +10
-0+* SPDX-License-Identifier: GPL-2.0+ +*/ + +#include <common.h> +#include <asm/io.h> +#include <asm/arch/clock.h> + +#ifdef CONFIG_SOC_K2HK +#define ASYNC_EMIF_BASE K2HK_ASYNC_EMIF_CNTRL_BASE +#endif
So, does Keystone 1 have this in a different location?
arch/arm/cpu/armv7/keystone/aemif.c line 21
Quoted 4 lines
arch/arm/cpu/armv7/keystone/aemif.c new file +4
-0+#define ASYNC_EMIF_CONFIG (cs) (ASYNC_EMIF_BASE+0x10+(cs)*4) +#define ASYNC_EMIF_ONENAND_CONTROL (ASYNC_EMIF_BASE+0x5c) +#define ASYNC_EMIF_NAND_CONTROL (ASYNC_EMIF_BASE+0x60) +#define ASYNC_EMIF_WAITCYCLE_CONFIG (ASYNC_EMIF_BASE+0x4)
Register access is done over structs not define of base + offset, please rework.
arch/arm/cpu/armv7/keystone/aemif.c line 32
Quoted 10 lines
arch/arm/cpu/armv7/keystone/aemif.c new file +10
-0+#define CONFIG_SELECT_STROBE (v) ((v) ? 1 << 31 : 0) +#define CONFIG_EXTEND_WAIT (v) ((v) ? 1 << 30 : 0) +#define CONFIG_WR_SETUP (v) (((v) & 0x0f) << 26) +#define CONFIG_WR_STROBE (v) (((v) & 0x3f) << 20) +#define CONFIG_WR_HOLD (v) (((v) & 0x07) << 17) +#define CONFIG_RD_SETUP (v) (((v) & 0x0f) << 13) +#define CONFIG_RD_STROBE (v) (((v) & 0x3f) << 7) +#define CONFIG_RD_HOLD (v) (((v) & 0x07) << 4) +#define CONFIG_TURN_AROUND (v) (((v) & 0x03) << 2) +#define CONFIG_WIDTH (v) (((v) & 0x03) << 0)
To avoid confusion please do AEMIF_CONFIG_... or AEMIF_CFG_... or maybe just CFG_...
Quoted 1 line
(quoted diff) +1
-0+++ b/arch/arm/cpu/armv7/keystone/clock-k2hk.c
[snip]
arch/arm/cpu/armv7/keystone/clock-k2hk.c line 34
Quoted 5 lines
arch/arm/cpu/armv7/keystone/clock-k2hk.c new file +5
-0+ prediv = (tmp &0x3f ) +1 ; + mult = (((tmp &0x7f000 ) >>6 ) | (pllctl_reg_read (pll, + mult) &0x3f )) +1 ; + output_div = ((pllctl_reg_read (pll, secctl) >>19 ) & +0xf ) +1 ;
Please define magic numbers, check globally.
arch/arm/cpu/armv7/keystone/clock-k2hk.c line 77
Quoted 7 lines
arch/arm/cpu/armv7/keystone/clock-k2hk.c new file +7
-0+return ret; +} + + + + +unsigned long clk_get_rate (unsigned int clk)
Extra empty lines.
Quoted 1 line
+++
b/arch/arm/cpu/armv7/keystone/clock.c
[snip]
arch/arm/cpu/armv7/keystone/clock.c line 21
Quoted 5 lines
arch/arm/cpu/armv7/keystone/clock.c new file +5
-0+static void pll_delay (unsigned int loop_count) +{ +while (loop_count--) + asm(" NOP" ); +}
If we cannot use udelay yet use sdelay.
Quoted 1 line
+#include "
clock-k2hk.c"
Please use function prototypes, header files and then build the right SoC clock file itself.
Quoted 1 line
+++
b/arch/arm/cpu/armv7/keystone/cmd_clock.c
We just added a generic
Quoted 46 lines
arch/arm/cpu/armv7/keystone/cmd_clock.c new file +45
-0@@ -0,0 +1,139 @@ +/* +* keystone2: commands for clocks +* +* (C) Copyright 2012-2014 +* Texas Instruments Incorporated, <www.ti.com> +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#include <common.h> +#include <command.h> +#include <asm/arch/hardware.h> +#include <asm/arch/clock.h> +#include <asm/arch/psc_defs.h> + +static u32 atoui (char *pstr) +{ +u32 res =0 ; + +for (; *pstr !=0 ; pstr++) { +if (*pstr <'0' || *pstr >'9' ) +break ; + + res = (res *10 ) + (*pstr -'0' ); + } + +return res; +} + +struct pll_init_data cmd_pll_data = { + .pll =MAIN_PLL , + .pll_m =16 , + .pll_d =1 , + .pll_od =2 , +}; + +int do_pll_cmd (cmd_tbl_t *cmdtp,int flag,int argc,char *const argv[]) +{ +if (argc !=5 ) + goto pll_cmd_usage; + +if (strncmp (argv[1 ],"pa" ,2 ) ==0 ) + cmd_pll_data.pll =PASS_PLL ; +else if (strncmp (argv[1 ],"arm" ,3 ) ==0 ) + cmd_pll_data.pll =TETRIS_PLL ;
arch/arm/cpu/armv7/keystone/cmd_clock.c line 55
Quoted 10 lines
arch/arm/cpu/armv7/keystone/cmd_clock.c new file +10
-0+else if (strncmp (argv[1 ],"ddr3a" ,5 ) ==0 ) + cmd_pll_data.pll =DDR3A_PLL ; +else if (strncmp (argv[1 ],"ddr3b" ,5 ) ==0 ) + cmd_pll_data.pll =DDR3B_PLL ; +else + goto pll_cmd_usage; + + cmd_pll_data.pll_m =atoui (argv[2 ]); + cmd_pll_data.pll_d =atoui (argv[3 ]); + cmd_pll_data.pll_od =atoui (argv[4 ]);
Why not simple_strtoul(argv[n], NULL, 10) ?
Quoted 7 lines
arch/arm/cpu/armv7/keystone/cmd_clock.c new file +7
-0+ +printf ("Trying to set pll %d; mult %d; div %d; OD %d\n" , + cmd_pll_data.pll, cmd_pll_data.pll_m, + cmd_pll_data.pll_d, cmd_pll_data.pll_od); +init_pll (&cmd_pll_data); + +return 0 ;
arch/arm/cpu/armv7/keystone/cmd_clock.c line 72
Quoted 10 lines
arch/arm/cpu/armv7/keystone/cmd_clock.c new file +10
-0+ +pll_cmd_usage: +return cmd_usage (cmdtp); +} + +U_BOOT_CMD ( + pllset,5 ,0 , do_pll_cmd, +"set pll multiplier and pre divider" , +"<pa|arm|ddr3a|ddr3b> <mult> <div> <OD>\n" +);
Wolfgang, if we add another command that takes decimal not hexidecimal inputs, you're going to hit me with a ruler, aren't you? Even for a clock command?
arch/arm/cpu/armv7/keystone/cmd_clock.c line 97
Quoted 6 lines
arch/arm/cpu/armv7/keystone/cmd_clock.c new file +6
-0+U_BOOT_CMD ( + getclk,2 ,0 , do_getclk_cmd, +"get clock rate" , +"<clk index>\n" +"See the 'enum clk_e' in the k2hk clock.h for clk indexes\n" +);
This would fit with the generic clk command and 'dump' which we just added.
Quoted 6 lines
arch/arm/cpu/armv7/keystone/config.mk new file +5
-0+++ b/arch/arm/cpu/armv7/keystone/config.mk@@ -0,0 +1,14 @@ +# (C) Copyright 2012-2014 +# Texas Instruments Incorporated, <www.ti.com> +# SPDX-License-Identifier: GPL-2.0+ +#
arch/arm/cpu/armv7/keystone/config.mk line 14
Quoted 10 lines
arch/arm/cpu/armv7/keystone/config.mk new file +10
-0+ +PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float + +# ========================================================================= +# +# Supply options according to compiler version +# +# ========================================================================= +PLATFORM_RELFLAGS +=$(call cc-option,-mshort-load-bytes,\ + $(call cc-option,-malignment-traps,))
You need to do this as:PF_CPPFLAGS_SLB := ...PLATFORM_RELFALGS += $(PF_CPPFLAGS_SLB)
The way you have it causes an evaluation per file and the above is a one time evaluation.
arch/arm/cpu/armv7/keystone/ddr3.c
Quoted 5 lines
arch/arm/cpu/armv7/keystone/ddr3.c new file +0
-0
Part of me wonders just how close/far this is from the omap-common EMIF/DDR code. Some parts look pretty familiar (and makes me wonder if you don't have some corner-case bugs around not setting shadow registers and initially setting some of the values to max, then setting them optimally due to which bits cause a refresh cycle).
Quoted 1 line
+++
b/arch/arm/cpu/armv7/keystone/lowlevel_init.S
Is there a reason you don't use arch/arm/cpu/armv7/lowlevel_init.S and the s_init calling sequence?
Quoted 1 line
+++
b/board/ti/k2hk_evm/board.c
[snip]
arch/arm/cpu/armv7/keystone/ddr3.c
Quoted 11 lines
arch/arm/cpu/armv7/keystone/ddr3.c new file +11
-0+/* Byte swap the 32-bit data if the device is BE */ +int cpu_to_bus (u32 *ptr,u32 length) +{ +u32 i; + +if (device_big_endian) +for (i =0 ; i < length; i++, ptr++) + *ptr =__swab32 (*ptr); + +return 0 ; +}
cpu_to_be32() ?
arch/arm/cpu/armv7/keystone/ddr3.c
Quoted 3 lines
arch/arm/cpu/armv7/keystone/ddr3.c new file +3
-0+int board_init (void ) +{ + gd->bd->bi_arch_number =-1 ;
Just don't set it?
arch/arm/cpu/armv7/keystone/ddr3.c
Quoted 7 lines
arch/arm/cpu/armv7/keystone/ddr3.c new file +7
-0+void enable_caches (void ) +{ +#ifndef CONFIG_SYS_DCACHE_OFF +/* Enable D-cache. I-cache is already enabled in start.S */ +dcache_enable (); +#endif +}
This belongs in one of the arch/arm/cpu/armv7/keystone/ files
arch/arm/cpu/armv7/keystone/ddr3.c line 3
Quoted 5 lines
+++
b/drivers/i2c/keystone_i2c.carch/arm/cpu/armv7/keystone/ddr3.c new file +3
-0@@ -0,0 +1,372 @@ +/* +* TI Keystone i2c driver +* Based on TI DaVinci (TMS320DM644x) I2C driver.
And how different is it really? Can we not reuse the davinci driver?
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140210/a45b7e91/attachment.pgp>
PATCH 6/7 k2hk: add support for k2hk SOC and EVM
Quoted 7 lines · Tom Rini
Quoted 5 lines · Murali Karicheri
k2hk EVM is based on Texas Instruments Keystone2 Hawking/Kepler SoC. Keystone2 SoC has ARM v7 Cortex-A15 MPCore processor. Please refer the ti/k2hk_evm/README for details on the board, build and other information.
Quoted 5 lines
Quoted 1 line
This patch add support for keystone architecture and k2hk evm.
Globally, only use
/*
* Multiline comments like this
*/
I'll fix this.
Quoted 12 lines
Quoted 12 lines
+++ b/arch/arm/cpu/armv7/keystone/Makefile
arch/arm/cpu/armv7/keystone/Makefile new file +10
-0@@ -0,0 +1,18 @@ +# +# (C) Copyright 2012-2014 +# Texas Instruments Incorporated, <www.ti.com> +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y += aemif.o +obj-y += init.o +obj-y += psc.o
Quoted 8 lines
arch/arm/cpu/armv7/keystone/Makefile line 17
Quoted 7 lines
arch/arm/cpu/armv7/keystone/Makefile new file +7
-0+obj-y += clock.o +obj-y += cmd_clock.o +obj-y += cmd_mon.o +obj-y += msmc.o +obj-y += lowlevel_init.o +obj-$(CONFIG_SPL_BUILD) += spl.o +obj-y += ddr3.oMix of space and tab, just tab it all out to line up please.
Will fix.
Quoted 11 lines
Quoted 11 lines
arch/arm/cpu/armv7/keystone/aemif.c new file +10
-0+++ b/arch/arm/cpu/armv7/keystone/aemif.c@@ -0,0 +1,79 @@ +/* +* Keystone2: Asynchronous EMIF Configuration +* +* (C) Copyright 2012-2014 +* Texas Instruments Incorporated, <www.ti.com> +* +* SPDX-License-Identifier: GPL-2.0+ +*/ +
Quoted 8 lines
arch/arm/cpu/armv7/keystone/aemif.c line 16
Quoted 7 lines
arch/arm/cpu/armv7/keystone/aemif.c new file +7
-0+#include <common.h> +#include <asm/io.h> +#include <asm/arch/clock.h> + +#ifdef CONFIG_SOC_K2HK +#define ASYNC_EMIF_BASE K2HK_ASYNC_EMIF_CNTRL_BASE +#endif So, does Keystone 1 have this in a different location?
That is not for Keystone1. K2HK is for Hawking and Kepler SoC. The ASYNC_EMIF_BASE may be different for other SOC of the Keystone2 family.
Quoted 6 lines
arch/arm/cpu/armv7/keystone/aemif.c line 21
Quoted 4 lines
arch/arm/cpu/armv7/keystone/aemif.c new file +4
-0+#define ASYNC_EMIF_CONFIG (cs) (ASYNC_EMIF_BASE+0x10+(cs)*4) +#define ASYNC_EMIF_ONENAND_CONTROL (ASYNC_EMIF_BASE+0x5c) +#define ASYNC_EMIF_NAND_CONTROL (ASYNC_EMIF_BASE+0x60) +#define ASYNC_EMIF_WAITCYCLE_CONFIG (ASYNC_EMIF_BASE+0x4)Register access is done over structs not define of base + offset, please rework.
This style was taken form Davinci code. Shall we rework it?
Quoted 4 lines
Quoted 4 lines
arch/arm/cpu/armv7/keystone/aemif.c new file +4
-0+#define CONFIG_SELECT_STROBE (v) ((v) ? 1 << 31 : 0) +#define CONFIG_EXTEND_WAIT (v) ((v) ? 1 << 30 : 0) +#define CONFIG_WR_SETUP (v) (((v) & 0x0f) << 26) +#define CONFIG_WR_STROBE (v) (((v) & 0x3f) << 20)
Quoted 8 lines
arch/arm/cpu/armv7/keystone/aemif.c line 32
Quoted 6 lines
arch/arm/cpu/armv7/keystone/aemif.c new file +6
-0+#define CONFIG_WR_HOLD (v) (((v) & 0x07) << 17) +#define CONFIG_RD_SETUP (v) (((v) & 0x0f) << 13) +#define CONFIG_RD_STROBE (v) (((v) & 0x3f) << 7) +#define CONFIG_RD_HOLD (v) (((v) & 0x07) << 4) +#define CONFIG_TURN_AROUND (v) (((v) & 0x03) << 2) +#define CONFIG_WIDTH (v) (((v) & 0x03) << 0)To avoid confusion please do
AEMIF_CONFIG_... orAEMIF_CFG_... or maybe justCFG_...
Agree and will change.
Quoted 8 lines
Quoted 1 line
(quoted diff) +1
-0+++ b/arch/arm/cpu/armv7/keystone/clock-k2hk.c[snip]
arch/arm/cpu/armv7/keystone/clock-k2hk.c line 34
Quoted 5 lines
arch/arm/cpu/armv7/keystone/clock-k2hk.c new file +5
-0+ prediv = (tmp &0x3f ) +1 ; + mult = (((tmp &0x7f000 ) >>6 ) | (pllctl_reg_read (pll, + mult) &0x3f )) +1 ; + output_div = ((pllctl_reg_read (pll, secctl) >>19 ) & +0xf ) +1 ;Please define magic numbers, check globally.
OK
Quoted 9 lines
arch/arm/cpu/armv7/keystone/clock-k2hk.c line 77
Quoted 8 lines
arch/arm/cpu/armv7/keystone/clock-k2hk.c new file +7
-0+return ret; +} + + + + +unsigned long clk_get_rate (unsigned int clk)Extra empty lines.
Will remove.
Quoted 9 lines
Quoted 1 line
+++
b/arch/arm/cpu/armv7/keystone/clock.c[snip]
arch/arm/cpu/armv7/keystone/clock.c line 21
Quoted 5 lines
arch/arm/cpu/armv7/keystone/clock.c new file +5
-0+static void pll_delay (unsigned int loop_count) +{ +while (loop_count--) + asm(" NOP" ); +}If we cannot use udelay yet use sdelay.
Quoted 3 lines
Quoted 1 line
+#include "
clock-k2hk.c"Please use function prototypes, header files and then build the right SoC clock file itself.
The idea was to have common clock.h for all Keystone2 family and include in to
it a specific for each SoC include file. Are you asking to remove that specific include
from the clock.h?
Quoted 2 lines
Quoted 1 line
+++
b/arch/arm/cpu/armv7/keystone/cmd_clock.cWe just added a generic
I'll check it out.
Quoted 111 lines
Quoted 46 lines
arch/arm/cpu/armv7/keystone/cmd_clock.c new file +45
-0@@ -0,0 +1,139 @@ +/* +* keystone2: commands for clocks +* +* (C) Copyright 2012-2014 +* Texas Instruments Incorporated, <www.ti.com> +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#include <common.h> +#include <command.h> +#include <asm/arch/hardware.h> +#include <asm/arch/clock.h> +#include <asm/arch/psc_defs.h> + +static u32 atoui (char *pstr) +{ +u32 res =0 ; + +for (; *pstr !=0 ; pstr++) { +if (*pstr <'0' || *pstr >'9' ) +break ; + + res = (res *10 ) + (*pstr -'0' ); + } + +return res; +} + +struct pll_init_data cmd_pll_data = { + .pll =MAIN_PLL , + .pll_m =16 , + .pll_d =1 , + .pll_od =2 , +}; + +int do_pll_cmd (cmd_tbl_t *cmdtp,int flag,int argc,char *const argv[]) +{ +if (argc !=5 ) + goto pll_cmd_usage; + +if (strncmp (argv[1 ],"pa" ,2 ) ==0 ) + cmd_pll_data.pll =PASS_PLL ; +else if (strncmp (argv[1 ],"arm" ,3 ) ==0 ) + cmd_pll_data.pll =TETRIS_PLL ;arch/arm/cpu/armv7/keystone/cmd_clock.c line 55
Quoted 10 lines
arch/arm/cpu/armv7/keystone/cmd_clock.c new file +10
-0+else if (strncmp (argv[1 ],"ddr3a" ,5 ) ==0 ) + cmd_pll_data.pll =DDR3A_PLL ; +else if (strncmp (argv[1 ],"ddr3b" ,5 ) ==0 ) + cmd_pll_data.pll =DDR3B_PLL ; +else + goto pll_cmd_usage; + + cmd_pll_data.pll_m =atoui (argv[2 ]); + cmd_pll_data.pll_d =atoui (argv[3 ]); + cmd_pll_data.pll_od =atoui (argv[4 ]);Why not
simple_strtoul(argv[n], NULL, 10)?Quoted 7 lines
arch/arm/cpu/armv7/keystone/cmd_clock.c new file +7
-0+ +printf ("Trying to set pll %d; mult %d; div %d; OD %d\n" , + cmd_pll_data.pll, cmd_pll_data.pll_m, + cmd_pll_data.pll_d, cmd_pll_data.pll_od); +init_pll (&cmd_pll_data); + +return 0 ;arch/arm/cpu/armv7/keystone/cmd_clock.c line 72
Quoted 10 lines
arch/arm/cpu/armv7/keystone/cmd_clock.c new file +10
-0+ +pll_cmd_usage: +return cmd_usage (cmdtp); +} + +U_BOOT_CMD ( + pllset,5 ,0 , do_pll_cmd, +"set pll multiplier and pre divider" , +"<pa|arm|ddr3a|ddr3b> <mult> <div> <OD>\n" +);Wolfgang, if we add another command that takes decimal not hexidecimal inputs, you're going to hit me with a ruler, aren't you? Even for a clock command?
arch/arm/cpu/armv7/keystone/cmd_clock.c line 97
Quoted 6 lines
arch/arm/cpu/armv7/keystone/cmd_clock.c new file +6
-0+U_BOOT_CMD ( + getclk,2 ,0 , do_getclk_cmd, +"get clock rate" , +"<clk index>\n" +"See the 'enum clk_e' in the k2hk clock.h for clk indexes\n" +);This would fit with the generic clk command and 'dump' which we just added.
Quoted 6 lines
arch/arm/cpu/armv7/keystone/config.mk new file +5
-0+++ b/arch/arm/cpu/armv7/keystone/config.mk@@ -0,0 +1,14 @@ +# (C) Copyright 2012-2014 +# Texas Instruments Incorporated, <www.ti.com> +# SPDX-License-Identifier: GPL-2.0+ +#arch/arm/cpu/armv7/keystone/config.mk line 14
Quoted 10 lines
arch/arm/cpu/armv7/keystone/config.mk new file +10
-0+ +PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float + +# ========================================================================= +# +# Supply options according to compiler version +# +# ========================================================================= +PLATFORM_RELFLAGS +=$(call cc-option,-mshort-load-bytes,\ + $(call cc-option,-malignment-traps,))You need to do this as:
PF_CPPFLAGS_SLB:= ...PLATFORM_RELFALGS+= $(PF_CPPFLAGS_SLB)The way you have it causes an evaluation per file and the above is a one time evaluation.
Quoted 10 lines
arch/arm/cpu/armv7/keystone/ddr3.c
Quoted 5 lines
arch/arm/cpu/armv7/keystone/ddr3.c new file +0
-0Part of me wonders just how close/far this is from the omap-common EMIF/DDR code. Some parts look pretty familiar (and makes me wonder if you don't have some corner-case bugs around not setting shadow registers and initially setting some of the values to max, then setting them optimally due to which bits cause a refresh cycle).
This code is based on AVV test code and is very specific to SOC DDR3 controller,
which as I know is different from OMAP.
Quoted 33 lines
Quoted 1 line
+++
b/arch/arm/cpu/armv7/keystone/lowlevel_init.SIs there a reason you don't use
arch/arm/cpu/armv7/lowlevel_init.Sand thes_initcalling sequence?Quoted 1 line
+++
b/board/ti/k2hk_evm/board.c[snip]
arch/arm/cpu/armv7/keystone/ddr3.c
Quoted 11 lines
arch/arm/cpu/armv7/keystone/ddr3.c new file +11
-0+/* Byte swap the 32-bit data if the device is BE */ +int cpu_to_bus (u32 *ptr,u32 length) +{ +u32 i; + +if (device_big_endian) +for (i =0 ; i < length; i++, ptr++) + *ptr =__swab32 (*ptr); + +return 0 ; +}
cpu_to_be32()?arch/arm/cpu/armv7/keystone/ddr3.c
Quoted 3 lines
arch/arm/cpu/armv7/keystone/ddr3.c new file +3
-0+int board_init (void ) +{ + gd->bd->bi_arch_number =-1 ;Just don't set it?
arch/arm/cpu/armv7/keystone/ddr3.c
Quoted 7 lines
arch/arm/cpu/armv7/keystone/ddr3.c new file +7
-0+void enable_caches (void ) +{ +#ifndef CONFIG_SYS_DCACHE_OFF +/* Enable D-cache. I-cache is already enabled in start.S */ +dcache_enable (); +#endif +}This belongs in one of the
arch/arm/cpu/armv7/keystone/files
Quoted 7 lines
arch/arm/cpu/armv7/keystone/ddr3.c line 3
Quoted 5 lines
+++
b/drivers/i2c/keystone_i2c.carch/arm/cpu/armv7/keystone/ddr3.c new file +3
-0@@ -0,0 +1,372 @@ +/* +* TI Keystone i2c driver +* Based on TI DaVinci (TMS320DM644x) I2C driver. And how different is it really? Can we not reuse the davinci driver?
It is reworked a little bit and also supports multiple ports, while davinci driver
supports only one.
I'll check out other comment as well.
Thanks,
Vitaly
PATCH 6/7 k2hk: add support for k2hk SOC and EVM
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 7 lines · Vitaly Andrianov
Quoted 6 lines · Tom Rini
Quoted 4 lines · Murali Karicheri
k2hk EVM is based on Texas Instruments Keystone2 Hawking/Kepler SoC. Keystone2 SoC has ARM v7 Cortex-A15 MPCore processor. Please refer the ti/k2hk_evm/README for details on the board, build and other information.
[snip]
Quoted 6 lines
Quoted 4 lines
arch/arm/cpu/armv7/keystone/aemif.c line 16
Quoted 3 lines
arch/arm/cpu/armv7/keystone/aemif.c new file +3
-0+#ifdef CONFIG_SOC_K2HK +#define ASYNC_EMIF_BASE K2HK_ASYNC_EMIF_CNTRL_BASE +#endif So, does Keystone 1 have this in a different location?
That is not for Keystone1. K2HK is for Hawking and Kepler SoC. The
ASYNC_EMIF_BASEmay be different for other SOC of the Keystone2 family.
That seems pretty unlikely, unless you've seen actual plans to the contrary, so lets assume the base won't change for this family at least.
Quoted 7 lines
Quoted 6 lines
arch/arm/cpu/armv7/keystone/aemif.c line 21
Quoted 4 lines
arch/arm/cpu/armv7/keystone/aemif.c new file +4
-0+#define ASYNC_EMIF_CONFIG (cs) (ASYNC_EMIF_BASE+0x10+(cs)*4) +#define ASYNC_EMIF_ONENAND_CONTROL (ASYNC_EMIF_BASE+0x5c) +#define ASYNC_EMIF_NAND_CONTROL (ASYNC_EMIF_BASE+0x60) +#define ASYNC_EMIF_WAITCYCLE_CONFIG (ASYNC_EMIF_BASE+0x4)Register access is done over structs not define of base + offset, please rework.
This style was taken form Davinci code. Shall we rework it?
Yes.
[snip]
Quoted 9 lines
Quoted 9 lines
Quoted 1 line
+++
b/arch/arm/cpu/armv7/keystone/clock.c[snip]
arch/arm/cpu/armv7/keystone/clock.c line 21
Quoted 5 lines
arch/arm/cpu/armv7/keystone/clock.c new file +5
-0+static void pll_delay (unsigned int loop_count) +{ +while (loop_count--) + asm(" NOP" ); +}If we cannot use udelay yet use sdelay.
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
+#include "
clock-k2hk.c"Please use function prototypes, header files and then build the right SoC clock file itself.
The idea was to have common
clock.hfor all Keystone2 family and include in to
it a specific for each SoC include file. Are you asking to remove that specific include
from theclock.h?
I'm saying we can't include a c file from another c file. See arch/arm/cpu/armv7/am33xx/ (and asm/arch-am33xx/) for how we support different clocks in similar-but-different families.
[snip]
Quoted 11 lines
Quoted 11 lines
arch/arm/cpu/armv7/keystone/ddr3.c
Quoted 6 lines
arch/arm/cpu/armv7/keystone/ddr3.c new file +0
-0Part of me wonders just how close/far this is from the omap-common EMIF/DDR code. Some parts look pretty familiar (and makes me wonder if you don't have some corner-case bugs around not setting shadow registers and initially setting some of the values to max, then setting them optimally due to which bits cause a refresh cycle).
Quoted 3 lines
This code is based on AVV test code and is very specific to SOC DDR3 controller,
which as I know is different from OMAP.
I'm not going to push this too hard since I don't have all the low level knowledge (nor contacts) about just how the block was re-used, but it's not 100% different from the rest of the EMIF parts TI uses. We should revisit this later (and once I've got the right docs for keystone parts around).
[snip]
Quoted 9 lines
Quoted 7 lines
arch/arm/cpu/armv7/keystone/ddr3.c line 3
Quoted 5 lines
+++
b/drivers/i2c/keystone_i2c.carch/arm/cpu/armv7/keystone/ddr3.c new file +3
-0@@ -0,0 +1,372 @@ +/* +* TI Keystone i2c driver +* Based on TI DaVinci (TMS320DM644x) I2C driver. And how different is it really? Can we not reuse the davinci driver?
It is reworked a little bit and also supports multiple ports, while davinci driver supports only one.
Right, so lets enhance the existing driver.
- --
Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQIcBAEBAgAGBQJS+27JAAoJENk4IS6UOR1W/FAP/iUgQQf7q1NiGMwF4HfJqeZe PsrO3ElN3TPPrnFQ5PgqXk3t8RSAFy7EVIetLjs8ZSh+JZvH48/YH9RCVm0err/I LQVeQbklHNiV5kNtxMWQlwGmG/ySG3S7DiZ9wS2GyTbrJV0v4Zl9P6qjdxyc5vAl O6aWDHv7IvqG5GXY8tSsptb8oN6H71foniufSLref5qQWeDxJtXpS31f0g0R9h4e r76o7eQ4iNpUoCu5eKz4XzOUEV9ve1zQP1Iv5d2JGxV0FXkSyZ32STAkkdf6zglP vnrK+dzk7B67hc1EQb2V0y3oY3yEmY+Z3aXkf3ws+5BY7R7SfZ8WfLxg1i7NJBZs CFwFPVV91A05Tq4yRMnniCs6mOCpG08IwyxEz5SmEoG52H/onNHd1HnYhBEiuwRI ENKm7IxdYFuWBVSd+FLaU6IQQdL8WnzL9YVkBuYdA+hPEAbcPVEWGFTVGo9fJP9r SoWXzI8ue+fUiJxvVJdcwJ8AJrq7Ci4FBFjMDtxe+8e9wgUp0ZVeFPOW6kEml7I2 O8HkgtMB0MdMDdESB9m/neFs0E3Va7EX3tlVPAcfqlQjjkFS0v9OmlGZG23bs9HP emejngR267JKcmJjuimf12IhIRWc62QtJBPXx+8WmEUy53CjkFhUfD7EKEzHT/52 CKaOAhmNc1EZAZkZcaBv
=anbB
-----END PGP SIGNATURE-----
Andrianov
PATCH 6/7 k2hk: add support for k2hk SOC and EVM
In reply to Tom RiniQuoted 18 lines
-----Original Message-----
From: Tom Rini [mailto:tom.rini at gmail.com] On Behalf Of Rini, Tom
Sent: Monday, February 10, 2014 4:26 PM
To: Karicheri, Muralidharan
Cc: u-boot at lists.denx.de; Sandeep at theia.denx.de; Kwok, WingMan; Nair, Sandeep; Andrianov, Vitaly
Subject: Re: [U-Boot] [U-Boot:RESEND][[PATCH 6/7] k2hk: add support for k2hk SOC and EVMQuoted 2 lines · Murali Karicheri
k2hk EVM is based on Texas Instruments Keystone2 Hawking/Kepler SoC. Keystone2 SoC has ARM v7 Cortex-A15 MPCore processor. Please refer
the
Quoted 4 lines
ti/k2hk_evm/README for details on the board, build and other information.
This patch add support for keystone architecture and k2hk evm.
[snip]
Quoted 5 lines
Quoted 2 lines
+++
b/arch/arm/cpu/armv7/keystone/cmd_clock.cWe just added a generic
Tom,
Where can I see this generic implementation?
Thanks,
Vitaly
PATCH 6/7 k2hk: add support for k2hk SOC and EVM
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 22 lines · Vitaly
Quoted 18 lines
-----Original Message-----
From: Tom Rini [mailto:tom.rini at gmail.com] On Behalf Of Rini, Tom
Sent: Monday, February 10, 2014 4:26 PM
To: Karicheri, Muralidharan
Cc: u-boot at lists.denx.de; Sandeep at theia.denx.de; Kwok, WingMan; Nair, Sandeep; Andrianov, Vitaly
Subject: Re: [U-Boot] [U-Boot:RESEND][[PATCH 6/7] k2hk: add support for k2hk SOC and EVMQuoted 2 lines · Murali Karicheri
k2hk EVM is based on Texas Instruments Keystone2 Hawking/Kepler SoC. Keystone2 SoC has ARM v7 Cortex-A15 MPCore processor. Please refer
the
Quoted 4 lines
ti/k2hk_evm/README for details on the board, build and other information.
This patch add support for keystone architecture and k2hk evm.
[snip]
Quoted 1 line
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
+++
b/arch/arm/cpu/armv7/keystone/cmd_clock.cWe just added a generic
Tom,
Where can I see this generic implementation?
Start poking at common/cmd_clk.c
- --
Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQIcBAEBAgAGBQJTAoXUAAoJENk4IS6UOR1WbQIQALPc/cIk4WTGLjV4lZQ+j2XH 0LzIel0Crx4TT3XPSfepxfQM0GqDseO92ujrGM5uqG043UIji8F/KmcJR2ILLgji /07XiGG6fM9HSf/rnCgLFil7kY9DSoru5JLfnSkZISnowkK7/JgwRwrbXsG17rXD vgyuGbS/Fpi6kt4AfjF1FtmDs/l9e28nh5ds9MUjQKBiWEVeSZdBDid6mq2kyY7e 6asozG0qIbaNS+o2F7HSbaQs8Ar78CLkM36Bsu3cjpHO+JZLtqaOvvlm6U8kbj5a DK77Of6zQ9ToGOVtFFxVvMFinf/BRgZ+M9cyntKWlZ12uClPGXgOW3EyDrrW2VE8 3cXRqOlfBfUoJevtg6SQu837EeLrVOYKP8bs6A6IQ3etNGc+OhsXZnNhkmfHjtuw 2n7sOqOdC4Hpw0rjWfY1UaWPEPHoq+HPSqJHN6VaVkopKzPX5bWqDBxT+MtMxp5q o196auSdfyW+z3A4MIpSWpEhB5Q7afr6v/VPs9wqkehuj/QdcFm8N2nD3s6Pg5NS reuqTEZZbbQ5RORgjFDBqhnpgUaHx3OGM+HsCr5Msz/QRjtiljFYI9DtLdkn0XZw jTbvUkEob8hVGaoptdppwUj90Cw6sJ5r15TGTHohJLkxzQfBkXeTK0fUXYSfPCMJ Iyf9nPf1+D1AMKzIM14q
=Bk7g
-----END PGP SIGNATURE-----
Andrianov
PATCH 6/7 k2hk: add support for k2hk SOC and EVM
Quoted 44 lines
-----Original Message-----
From: Rini, Tom
Sent: Monday, February 17, 2014 4:58 PM
To: Andrianov, Vitaly
Cc: Karicheri, Muralidharan; u-boot at lists.denx.de; Sandeep at theia.denx.de; Kwok, WingMan; Nair, Sandeep
Subject: Re: [U-Boot] [U-Boot:RESEND][[PATCH 6/7] k2hk: add support for k2hk SOC and EVM-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1Quoted 5 lines · Vitaly
Quoted 5 lines
-----Original Message-----
From: Tom Rini [mailto:tom.rini at gmail.com] On Behalf Of Rini, Tom
Sent: Monday, February 10, 2014 4:26 PM
To: Karicheri, Muralidharan
Cc: u-boot at lists.denx.de; Sandeep at theia.denx.de; Kwok, WingMan;Nair,
Quoted 7 lines
Quoted 7 lines
Sandeep; Andrianov, Vitaly
Subject: Re: [U-Boot] [U-Boot:RESEND][[PATCH 6/7] k2hk: add support for k2hk SOC and EVMQuoted 1 line · Murali Karicheri
k2hk EVM is based on Texas Instruments Keystone2 Hawking/Kepler
SoC.
Quoted 15 lines
Quoted 6 lines
Quoted 1 line
Keystone2 SoC has ARM v7 Cortex-A15 MPCore processor. Please refer
the
Quoted 4 lines
ti/k2hk_evm/README for details on the board, build and other information.
This patch add support for keystone architecture and k2hk evm.
[snip]
Quoted 5 lines
Quoted 2 lines
+++
b/arch/arm/cpu/armv7/keystone/cmd_clock.cWe just added a generic
Quoted 5 lines
Quoted 2 lines
Tom,
Where can I see this generic implementation?Start poking at
common/cmd_clk.c
The command in that file just dump all clocks. We need to have a command to display one particular clock. So, for now we will continue to use the keystone2 specific implementation and change it later when the generic will support one clock only.
Quoted 6 lines
- --
Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
Quoted 14 lines
iQIcBAEBAgAGBQJTAoXUAAoJENk4IS6UOR1WbQIQALPc/cIk4WTGLjV4lZQ+j2XH 0LzIel0Crx4TT3XPSfepxfQM0GqDseO92ujrGM5uqG043UIji8F/KmcJR2ILLgji /07XiGG6fM9HSf/rnCgLFil7kY9DSoru5JLfnSkZISnowkK7/JgwRwrbXsG17rXD vgyuGbS/Fpi6kt4AfjF1FtmDs/l9e28nh5ds9MUjQKBiWEVeSZdBDid6mq2kyY7e 6asozG0qIbaNS+o2F7HSbaQs8Ar78CLkM36Bsu3cjpHO+JZLtqaOvvlm6U8kbj5a DK77Of6zQ9ToGOVtFFxVvMFinf/BRgZ+M9cyntKWlZ12uClPGXgOW3EyDrrW2VE8 3cXRqOlfBfUoJevtg6SQu837EeLrVOYKP8bs6A6IQ3etNGc+OhsXZnNhkmfHjtuw 2n7sOqOdC4Hpw0rjWfY1UaWPEPHoq+HPSqJHN6VaVkopKzPX5bWqDBxT+MtMxp5q o196auSdfyW+z3A4MIpSWpEhB5Q7afr6v/VPs9wqkehuj/QdcFm8N2nD3s6Pg5NS reuqTEZZbbQ5RORgjFDBqhnpgUaHx3OGM+HsCr5Msz/QRjtiljFYI9DtLdkn0XZw jTbvUkEob8hVGaoptdppwUj90Cw6sJ5r15TGTHohJLkxzQfBkXeTK0fUXYSfPCMJ Iyf9nPf1+D1AMKzIM14q
=Bk7g
-----END PGP SIGNATURE-----
Thanks,
Vitaly
cover Add support for Keystone2 SoC and K2HK EVM
In reply to Murali KaricheriHi Murali,
Quoted 10 lines · Murali Karicheri
- Resending since I missed some in the CC
This patch series add support for keystone2 SoC and K2HK EVM.
Following patches were reviewed before in this list and v1 of the same is send with review comments incorporated:-
- tools: mkimage: add support for gpimage format
- arm: add support for arch timer
- NAND: DaVinci: allow forced disable of subpage writes
Quoted 7 lines
The patch below is added as a seperate patch based on comments:-
- tools: sort the entries inMakefileMurali Karicheri (5):
tools: sort the entries inMakefiletools: mkimage: add support for gpimage format
Is this image format required? Can't one of the existing image formats be used?
Quoted 3 lines
NAND: DaVinci: allow forced disable of subpage writes
k2hk: add support for k2hk SOC and EVM
keystone2: net: add keystone ethernet driver
Amicalement,
Signature · 1 line
Albert.
cover Add support for Keystone2 SoC and K2HK EVM
Quoted 15 lines · Albert ARIBAUD
Hi Murali,
Quoted 10 lines · Murali Karicheri
- Resending since I missed some in the CC
This patch series add support for keystone2 SoC and K2HK EVM.
Following patches were reviewed before in this list and v1 of the same is send with review comments incorporated:-
- tools: mkimage: add support for gpimage format
- arm: add support for arch timer
- NAND: DaVinci: allow forced disable of subpage writes
Quoted 8 lines
Quoted 6 lines
The patch below is added as a seperate patch based on comments:-
- tools: sort the entries inMakefileMurali Karicheri (5):
tools: sort the entries inMakefile
tools: mkimage: add support for gpimage formatIs this image format required? Can't one of the existing image formats be used?
Alebert,
Thanks for your response.
We are actually re-using part of the OMAP image format by factoring out the common code
and re-using. So this is not a new format. Please review the code.
Murali
Quoted 4 lines
Quoted 3 lines
NAND: DaVinci: allow forced disable of subpage writes
k2hk: add support for k2hk SOC and EVM
keystone2: net: add keystone ethernet driverAmicalement,
cover Add support for Keystone2 SoC and K2HK EVM
Hi Murali,
Quoted 24 lines · Murali Karicheri
Quoted 15 lines · Albert ARIBAUD
Hi Murali,
Quoted 10 lines · Murali Karicheri
- Resending since I missed some in the CC
This patch series add support for keystone2 SoC and K2HK EVM.
Following patches were reviewed before in this list and v1 of the same is send with review comments incorporated:-
- tools: mkimage: add support for gpimage format
- arm: add support for arch timer
- NAND: DaVinci: allow forced disable of subpage writesQuoted 8 lines
Quoted 6 lines
The patch below is added as a seperate patch based on comments:-
- tools: sort the entries inMakefileMurali Karicheri (5):
tools: sort the entries inMakefile
tools: mkimage: add support for gpimage formatIs this image format required? Can't one of the existing image formats be used?
Quoted 7 lines
Alebert,
Thanks for your response.
We are actually re-using part of the OMAP image format by factoring out the common code
and re-using. So this is not a new format. Please review the code.
Thanks. This describes what you do and how you do it, but it does not tell me why you are doing it and why you can't do otherwise. Let me rephrase my question since you're mentioning branching off the OMAP image format: why branch off? Why not simply use the existing OMAP image format? Or another one?
Quoted 1 line
Murali
Amicalement,
Signature · 1 line
Albert.
cover Add support for Keystone2 SoC and K2HK EVM
Quoted 33 lines · Albert ARIBAUD
Hi Murali,
Quoted 28 lines · Murali Karicheri
Quoted 15 lines · Albert ARIBAUD
Hi Murali,
Quoted 10 lines · Murali Karicheri
- Resending since I missed some in the CC
This patch series add support for keystone2 SoC and K2HK EVM.
Following patches were reviewed before in this list and v1 of the same is send with review comments incorporated:-
- tools: mkimage: add support for gpimage format
- arm: add support for arch timer
- NAND: DaVinci: allow forced disable of subpage writesQuoted 8 lines
Quoted 6 lines
The patch below is added as a seperate patch based on comments:-
- tools: sort the entries inMakefileMurali Karicheri (5):
tools: sort the entries inMakefile
tools: mkimage: add support for gpimage formatIs this image format required? Can't one of the existing image formats be used?
Alebert,
Thanks for your response.
Quoted 8 lines
Quoted 3 lines
We are actually re-using part of the OMAP image format by factoring out the common code
and re-using. So this is not a new format. Please review the code.Thanks. This describes what you do and how you do it, but it does not tell me why you are doing it and why you can't do otherwise. Let me rephrase my question since you're mentioning branching off the OMAP image format: why branch off? Why not simply use the existing OMAP image format? Or another one?
Because the ROM bootloader in our platform (keystone2) expect the header to be in
the following format :-
<size - 4 byte> <load addr- 4 byte> <data>
OMAP uses different format
<omap header 512 bytes> <size - 4 byte> <load addr - 4 bytes>
gp header (size, loadaddr) is common between the two image formats. So that is factored out and used in our platform. Hope this is clear now.
Regards,
Murali
Quoted 2 lines
Quoted 1 line
Murali
Amicalement,
cover Add support for Keystone2 SoC and K2HK EVM
Hi Murali,
Quoted 46 lines · Murali Karicheri
Quoted 33 lines · Albert ARIBAUD
Hi Murali,
Quoted 28 lines · Murali Karicheri
Quoted 15 lines · Albert ARIBAUD
Hi Murali,
Quoted 10 lines · Murali Karicheri
- Resending since I missed some in the CC
This patch series add support for keystone2 SoC and K2HK EVM.
Following patches were reviewed before in this list and v1 of the same is send with review comments incorporated:-
- tools: mkimage: add support for gpimage format
- arm: add support for arch timer
- NAND: DaVinci: allow forced disable of subpage writesQuoted 8 lines
Quoted 6 lines
The patch below is added as a seperate patch based on comments:-
- tools: sort the entries inMakefileMurali Karicheri (5):
tools: sort the entries inMakefile
tools: mkimage: add support for gpimage formatIs this image format required? Can't one of the existing image formats be used?
Alebert,
Thanks for your response.
Quoted 8 lines
Quoted 3 lines
We are actually re-using part of the OMAP image format by factoring out the common code
and re-using. So this is not a new format. Please review the code.Thanks. This describes what you do and how you do it, but it does not tell me why you are doing it and why you can't do otherwise. Let me rephrase my question since you're mentioning branching off the OMAP image format: why branch off? Why not simply use the existing OMAP image format? Or another one?
Because the ROM bootloader in our platform (keystone2) expect the header to be in
the following format :-
Quoted 7 lines
<size - 4 byte> <load addr- 4 byte> <data>
OMAP uses different format
<omap header 512 bytes> <size - 4 byte> <load addr - 4 bytes>gp header (size, loadaddr) is common between the two image formats. So that is factored out and used in our platform. Hope this is clear now.
Ok, thanks.
Quoted 3 lines
Regards,
Murali
Amicalement,
Signature · 1 line
Albert.
cover Add support for Keystone2 SoC and K2HK EVM
In reply to Murali KaricheriQuoted 20 lines · Murali Karicheri
- Resending since I missed some in the CC
This patch series add support for keystone2 SoC and K2HK EVM.
Following patches were reviewed before in this list and v1 of the same is send with review comments incorporated:-
- tools: mkimage: add support for gpimage format
- arm: add support for arch timer
- NAND: DaVinci: allow forced disable of subpage writesThe patch below is added as a seperate patch based on comments:-
- tools: sort the entries inMakefileMurali Karicheri (5):
tools: sort the entries inMakefile
tools: mkimage: add support for gpimage format
NAND: DaVinci: allow forced disable of subpage writes
k2hk: add support for k2hk SOC and EVM
keystone2: net: add keystone ethernet driver
Quoted 3 lines
Vitaly Andrianov (2):
fdt: callft_board_setup_ex()at the end ofimage_setup_libfdt()
arm: add support for arch timer
For the next go-round, you shouldn't need to give git send-email anything more than --subject-prefix='PATCH v3' to get the subject correct and shorter.
In general:
- 7/7 got lost? Or did I just miss it?
- There's a lot of what looks like copy/paste from davinci drivers, we need to better re-use the code in place (and move to common locations as needed).
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140210/e605d9fb/attachment.pgp>