Re: [U-Boot] [PATCH v5 7/7] cros: exynos: enable cros-ec for smdk5250
On 15 May 2013 15:57, Hung-ying Tyan ty...@chromium.org wrote: This patch initiates cros-ec in board_init() to enable it for smdk5250. This patch depends on the patch in the MMC series that brings in exynos5-dt.c. Refer to http://patchwork.ozlabs.org/patch/240084. Signed-off-by: Simon Glass s...@chromium.org Signed-off-by: Vincent Palatin vpala...@chromium.org Signed-off-by: Hung-ying Tyan ty...@chromium.org --- Changes in v5: - Add exynos: tag. - Add dependency description. Changes in v4: None Changes in v3: None Changes in v2: - Moved code from smdk5250.c (non-FDT) to exynos5-dt.c (FDT). - Moved code from smdk5250.h to exynos5250-dt.h. Sorry for very late reply. You are enabling this feature on smdk5250, but adding the configuration in exynos5250-dt.h, though exynos5250-dt.h is seems to common. Though this patch is merged but isnt it possible to submit a patch to add configuration macros to smdk5250.h rather than exynos5250-dt.h. Or shall i submit the patch for doing so. - Added commit message. - Dropped the period from commit subject. board/samsung/smdk5250/exynos5-dt.c | 45 + include/configs/exynos5250-dt.h | 10 - 2 files changed, 54 insertions(+), 1 deletion(-) diff --git a/board/samsung/smdk5250/exynos5-dt.c b/board/samsung/smdk5250/exynos5-dt.c index b01fe72..8be3192 100644 --- a/board/samsung/smdk5250/exynos5-dt.c +++ b/board/samsung/smdk5250/exynos5-dt.c @@ -21,6 +21,7 @@ */ #include common.h +#include cros_ec.h #include fdtdec.h #include asm/io.h #include errno.h @@ -39,6 +40,13 @@ DECLARE_GLOBAL_DATA_PTR; +struct local_info { + struct cros_ec_dev *cros_ec_dev;/* Pointer to cros_ec device */ + int cros_ec_err;/* Error for cros_ec, 0 if ok */ +}; + +static struct local_info local; + #ifdef CONFIG_USB_EHCI_EXYNOS int board_usb_vbus_init(void) { @@ -55,12 +63,30 @@ int board_usb_vbus_init(void) } #endif +struct cros_ec_dev *board_get_cros_ec_dev(void) +{ + return local.cros_ec_dev; +} + +static int board_init_cros_ec_devices(const void *blob) +{ + local.cros_ec_err = cros_ec_init(blob, local.cros_ec_dev); + if (local.cros_ec_err) + return -1; /* Will report in board_late_init() */ + + return 0; +} + int board_init(void) { gd-bd-bi_boot_params = (PHYS_SDRAM_1 + 0x100UL); #ifdef CONFIG_EXYNOS_SPI spi_init(); #endif + + if (board_init_cros_ec_devices(gd-fdt_blob)) + return -1; + #ifdef CONFIG_USB_EHCI_EXYNOS board_usb_vbus_init(); #endif @@ -337,3 +363,22 @@ int board_early_init_f(void) return err; } #endif + +#ifdef CONFIG_BOARD_LATE_INIT +int board_late_init(void) +{ + stdio_print_current_devices(); + + if (local.cros_ec_err) { + /* Force console on */ + gd-flags = ~GD_FLG_SILENT; + + printf(cros-ec communications failure %d\n, + local.cros_ec_err); + puts(\nPlease reset with Power+Refresh\n\n); + panic(Cannot init cros-ec device); + return -1; + } + return 0; +} +#endif diff --git a/include/configs/exynos5250-dt.h b/include/configs/exynos5250-dt.h index 97c8825..289db00 100644 --- a/include/configs/exynos5250-dt.h +++ b/include/configs/exynos5250-dt.h @@ -82,11 +82,19 @@ #define CONFIG_BAUDRATE115200 #define EXYNOS5_DEFAULT_UART_OFFSET0x01 +/* Enable keyboard */ +#define CONFIG_CROS_EC /* CROS_EC protocol */ +#define CONFIG_CROS_EC_SPI /* Support CROS_EC over SPI */ +#define CONFIG_CROS_EC_I2C /* Support CROS_EC over I2C */ +#define CONFIG_CROS_EC_KEYB/* CROS_EC keyboard input */ +#define CONFIG_CMD_CROS_EC +#define CONFIG_KEYBOARD + /* Console configuration */ #define CONFIG_CONSOLE_MUX #define CONFIG_SYS_CONSOLE_IS_IN_ENV #define EXYNOS_DEVICE_SETTINGS \ - stdin=serial\0 \ + stdin=serial,cros-ec-keyb\0 \ stdout=serial,lcd\0 \ stderr=serial,lcd\0 -- 1.8.2.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot -- with warm regards, Chander Kashyap ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] CONFIG: EXYNOS5: Replace misnomer SMDK5250 with EXYNOS5250 and update Makefiles
Adding Minkyu, On 2 July 2013 13:10, Simon Glass s...@chromium.org wrote: On Tue, Jul 2, 2013 at 1:17 PM, Inderpal Singh inderpal.si...@linaro.orgwrote: Update the Makefiles so that all boards can use the same spl generation tool Signed-off-by: Inderpal Singh inderpal.si...@linaro.org Acked-by: Simon Glass s...@chromium.org Can it be merged ? Let me know if there is any issue. Thanks, inder --- This is needed for the Arndale board support patch just sent after sending this one. Makefile|2 +- include/configs/exynos5250-dt.h |2 +- tools/Makefile |4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index af4c3c0..d8c5d3f 100644 --- a/Makefile +++ b/Makefile @@ -821,7 +821,7 @@ clean: $(obj)tools/gdb/{astest,gdbcont,gdbsend} \ $(obj)tools/gen_eth_addr$(obj)tools/img2srec \ $(obj)tools/mk{env,}image $(obj)tools/mpc86x_clk \ - $(obj)tools/mk{smdk5250,}spl \ + $(obj)tools/mk{$(BOARD),}spl \ $(obj)tools/mxsboot \ $(obj)tools/ncb $(obj)tools/ubsha1 \ $(obj)tools/kernel-doc/docproc diff --git a/include/configs/exynos5250-dt.h b/include/configs/exynos5250-dt.h index 1c9eca2..a782880 100644 --- a/include/configs/exynos5250-dt.h +++ b/include/configs/exynos5250-dt.h @@ -29,7 +29,7 @@ #define CONFIG_SAMSUNG /* in a SAMSUNG core */ #define CONFIG_S5P /* S5P Family */ #define CONFIG_EXYNOS5 /* which is in a Exynos5 Family */ -#define CONFIG_SMDK5250/* which is in a SMDK5250 */ +#define CONFIG_EXYNOS5250 #include asm/arch/cpu.h /* get chip and board defs */ diff --git a/tools/Makefile b/tools/Makefile index 4630f03..5eb14c5 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -68,7 +68,7 @@ BIN_FILES-$(CONFIG_CMD_LOADS) += img2srec$(SFX) BIN_FILES-$(CONFIG_XWAY_SWAP_BYTES) += xway-swap-bytes$(SFX) BIN_FILES-y += mkenvimage$(SFX) BIN_FILES-y += mkimage$(SFX) -BIN_FILES-$(CONFIG_SMDK5250) += mksmdk5250spl$(SFX) +BIN_FILES-$(CONFIG_EXYNOS5250) += mk$(BOARD)spl$(SFX) BIN_FILES-$(CONFIG_MX23) += mxsboot$(SFX) BIN_FILES-$(CONFIG_MX28) += mxsboot$(SFX) BIN_FILES-$(CONFIG_NETCONSOLE) += ncb$(SFX) @@ -100,7 +100,7 @@ NOPED_OBJ_FILES-y += image-host.o NOPED_OBJ_FILES-y += omapimage.o NOPED_OBJ_FILES-y += mkenvimage.o NOPED_OBJ_FILES-y += mkimage.o -OBJ_FILES-$(CONFIG_SMDK5250) += mkexynosspl.o +OBJ_FILES-$(CONFIG_EXYNOS5250) += mkexynosspl.o OBJ_FILES-$(CONFIG_MX23) += mxsboot.o OBJ_FILES-$(CONFIG_MX28) += mxsboot.o OBJ_FILES-$(CONFIG_NETCONSOLE) += ncb.o -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] fs: fat: don't call disk_write with zero sector num
Hi, All On 7/24/2013 5:55 PM, Josh Wu wrote: In the set_cluster() function, it will convert the buffer size to sector numbers. Then call disk_write() to write by sector. For remaining buffer, the size is less than a sector, call disk_write() again to write them in one sector. But if the total buffer size is less then one sector, the original code will call disk_write() with zero sector number. It is unnecessary. So this patch fix this. Now it will not call disk_write() if total buffer size is less than one sector. Signed-off-by: Josh Wu josh...@atmel.com Forgot to mention that: this is the v2 patch for [PATCH] fs: fat: fix bug when write size is less than a sector size (http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/165997) Best Regards, Josh Wu --- fs/fat/fat_write.c |8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/fs/fat/fat_write.c b/fs/fat/fat_write.c index fd07240..a05327c 100644 --- a/fs/fat/fat_write.c +++ b/fs/fat/fat_write.c @@ -568,9 +568,11 @@ set_cluster(fsdata *mydata, __u32 clustnum, __u8 *buffer, debug(clustnum: %d, startsect: %d\n, clustnum, startsect); - if (disk_write(startsect, size / mydata-sect_size, buffer) 0) { - debug(Error writing data\n); - return -1; + if ((size / mydata-sect_size) 0) { + if (disk_write(startsect, size / mydata-sect_size, buffer) 0) { + debug(Error writing data\n); + return -1; + } } if (size % mydata-sect_size) { ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 0/5] ARM: IGEP0033: Updates for next release.
From: Enric Balletbo i Serra eballe...@iseebcn.com Hello, These are some updates to improve the support for IGEP COM AQUILA. Please consider adding for next release. Best regards, Enric Balletbo i Serra (5): ARM: IGEP0033: Remove undef of CONFIG_CMD_MEMTEST ARM: IGEP0033: Add support for Flattened Device Tree. ARM: IGEP0033: Remove CYGNUS name from header. ARM: IGEP0033: Add support to boot from NAND. ARM: IGEP0033: Remove duplicate / unused #defines. board/isee/igep0033/board.c | 2 +- board/isee/igep0033/board.h | 2 +- include/configs/igep0033.h | 78 +++-- 3 files changed, 42 insertions(+), 40 deletions(-) -- 1.8.1.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/5] ARM: IGEP0033: Remove undef of CONFIG_CMD_MEMTEST
From: Enric Balletbo i Serra eballe...@iseebcn.com After commit: 79cd2f814b1c75efd47161ac27f4cbebf768240f config_cmd_default.h: Remove CONFIG_CMD_MEMTEST It's not necessary to undef the CONFIG_CMD_MEMTEST, so we can remove it from configuration file. Signed-off-by: Enric Balletbo i Serra eballe...@iseebcn.com --- include/configs/igep0033.h | 7 --- 1 file changed, 7 deletions(-) diff --git a/include/configs/igep0033.h b/include/configs/igep0033.h index 12f28f8..41c083e 100644 --- a/include/configs/igep0033.h +++ b/include/configs/igep0033.h @@ -59,13 +59,6 @@ #define CONFIG_CMD_UBI #define CONFIG_CMD_UBIFS -/* - * Because the issues explained in doc/README.memory-test, the mtest command - * is considered deprecated. It should not be enabled in most normal ports of - * U-Boot. - */ -#undef CONFIG_CMD_MEMTEST - #define CONFIG_BOOTDELAY 1 /* negative for no autoboot */ #define CONFIG_ENV_VARS_UBOOT_CONFIG #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG -- 1.8.1.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 3/5] ARM: IGEP0033: Remove CYGNUS name from header.
From: Enric Balletbo i Serra eballe...@iseebcn.com We will not use CYGNUS names for any IGEP COM based on AM335x processor, so, to avoid confusion, remove from headers. Signed-off-by: Enric Balletbo i Serra eballe...@iseebcn.com --- board/isee/igep0033/board.c | 2 +- board/isee/igep0033/board.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/board/isee/igep0033/board.c b/board/isee/igep0033/board.c index ea3bea5..b3fcbb3 100644 --- a/board/isee/igep0033/board.c +++ b/board/isee/igep0033/board.c @@ -1,5 +1,5 @@ /* - * Board functions for IGEP COM AQUILA/CYGNUS based boards + * Board functions for IGEP COM AQUILA based boards * * Copyright (C) 2013, ISEE 2007 SL - http://www.isee.biz/ * diff --git a/board/isee/igep0033/board.h b/board/isee/igep0033/board.h index 37988e0..4368ee6 100644 --- a/board/isee/igep0033/board.h +++ b/board/isee/igep0033/board.h @@ -1,5 +1,5 @@ /* - * IGEP COM AQUILA/CYGNUS boards information header + * IGEP COM AQUILA boards information header * * Copyright (C) 2013, ISEE 2007 SL - http://www.isee.biz/ * -- 1.8.1.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/5] ARM: IGEP0033: Add support for Flattened Device Tree.
Now, the default kernel to boot the IGEP COM AQUILA is device tree based. As old kernel is deprecated we should adapt the boot commands to use DTB files. Also, with v3.9 and later of the Linux Kernel, uImage isn't builtable anymore by default, so we should switch to use the bootz command. Signed-off-by: Enric Balletbo i Serra eballe...@iseebcn.com --- include/configs/igep0033.h | 33 + 1 file changed, 13 insertions(+), 20 deletions(-) diff --git a/include/configs/igep0033.h b/include/configs/igep0033.h index 41c083e..be210a5 100644 --- a/include/configs/igep0033.h +++ b/include/configs/igep0033.h @@ -41,6 +41,9 @@ /* Display cpuinfo */ #define CONFIG_DISPLAY_CPUINFO +/* Flattened Device Tree */ +#define CONFIG_OF_LIBFDT + /* Commands to include */ #include config_cmd_default.h @@ -63,37 +66,27 @@ #define CONFIG_ENV_VARS_UBOOT_CONFIG #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG #define CONFIG_EXTRA_ENV_SETTINGS \ - loadaddr=0x8020\0 \ - rdaddr=0x8100\0 \ - bootfile=/boot/uImage\0 \ + loadaddr=0x80F8\0 \ + dtbaddr=0x8020\0 \ + bootdir=/boot\0 \ + bootfile=zImage\0 \ + dtbfile=am335x-base0033.dtb\0 \ console=ttyO0,115200n8\0 \ - optargs=\0 \ mmcdev=0\0 \ mmcroot=/dev/mmcblk0p2 rw\0 \ mmcrootfstype=ext4 rootwait\0 \ - ramroot=/dev/ram0 rw ramdisk_size=65536 initrd=${rdaddr},64M\0 \ - ramrootfstype=ext2\0 \ mmcargs=setenv bootargs console=${console} \ - ${optargs} \ root=${mmcroot} \ rootfstype=${mmcrootfstype}\0 \ bootenv=uEnv.txt\0 \ loadbootenv=load mmc ${mmcdev} ${loadaddr} ${bootenv}\0 \ importbootenv=echo Importing environment from mmc ...; \ - env import -t $loadaddr $filesize\0 \ - ramargs=setenv bootargs console=${console} \ - ${optargs} \ - root=${ramroot} \ - rootfstype=${ramrootfstype}\0 \ - loadramdisk=load mmc ${mmcdev} ${rdaddr} ramdisk.gz\0 \ - loaduimagefat=load mmc ${mmcdev} ${loadaddr} ${bootfile}\0 \ - loaduimage=load mmc ${mmcdev}:2 ${loadaddr} ${bootfile}\0 \ + env import -t ${loadaddr} ${filesize}\0 \ + mmcload=load mmc ${mmcdev}:2 ${loadaddr} ${bootdir}/${bootfile}; \ + load mmc ${mmcdev}:2 ${dtbaddr} ${bootdir}/${dtbfile}\0 \ mmcboot=echo Booting from mmc ...; \ run mmcargs; \ - bootm ${loadaddr}\0 \ - ramboot=echo Booting from ramdisk ...; \ - run ramargs; \ - bootm ${loadaddr}\0 \ + bootz ${loadaddr} - ${dtbaddr}\0 \ #define CONFIG_BOOTCOMMAND \ mmc dev ${mmcdev}; if mmc rescan; then \ @@ -106,7 +99,7 @@ echo Running uenvcmd ...; \ run uenvcmd; \ fi; \ - if run loaduimage; then \ + if run mmcload; then \ run mmcboot; \ fi; \ fi; \ -- 1.8.1.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 4/5] ARM: IGEP0033: Add support to boot from NAND.
From: Enric Balletbo i Serra eballe...@iseebcn.com Add to the default environment the possibily to boot from NAND using a ubi rootfs. Also the partition scheme is set as follows: Start Size SPL : 0x 0x0008 (512KiB) U-Boot : 0x0008 0x0010 (1MiB) U-Boot Env : 0x0018 0x0002 (128KiB) File System : 0x001C - The ubiboot script gets the kernel and the dtb file from the boot directory of the File System. Signed-off-by: Enric Balletbo i Serra eballe...@iseebcn.com --- include/configs/igep0033.h | 32 +++- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/include/configs/igep0033.h b/include/configs/igep0033.h index be210a5..3d08cfa 100644 --- a/include/configs/igep0033.h +++ b/include/configs/igep0033.h @@ -62,6 +62,10 @@ #define CONFIG_CMD_UBI #define CONFIG_CMD_UBIFS +/* Make the verbose messages from UBI stop printing */ +#define CONFIG_UBI_SILENCE_MSG +#define CONFIG_UBIFS_SILENCE_MSG + #define CONFIG_BOOTDELAY 1 /* negative for no autoboot */ #define CONFIG_ENV_VARS_UBOOT_CONFIG #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG @@ -72,21 +76,34 @@ bootfile=zImage\0 \ dtbfile=am335x-base0033.dtb\0 \ console=ttyO0,115200n8\0 \ + mtdids= MTDIDS_DEFAULT \0 \ + mtdparts= MTDPARTS_DEFAULT \0 \ mmcdev=0\0 \ mmcroot=/dev/mmcblk0p2 rw\0 \ + ubiroot=ubi0:filesystem rw ubi.mtd=3,2048\0 \ mmcrootfstype=ext4 rootwait\0 \ + ubirootfstype=ubifs rootwait\0 \ mmcargs=setenv bootargs console=${console} \ root=${mmcroot} \ rootfstype=${mmcrootfstype}\0 \ + ubiargs=setenv bootargs console=${console} \ + root=${ubiroot} \ + rootfstype=${ubirootfstype}\0 \ bootenv=uEnv.txt\0 \ loadbootenv=load mmc ${mmcdev} ${loadaddr} ${bootenv}\0 \ importbootenv=echo Importing environment from mmc ...; \ env import -t ${loadaddr} ${filesize}\0 \ mmcload=load mmc ${mmcdev}:2 ${loadaddr} ${bootdir}/${bootfile}; \ load mmc ${mmcdev}:2 ${dtbaddr} ${bootdir}/${dtbfile}\0 \ + ubiload=ubi part filesystem 2048; ubifsmount ubi0; \ + ubifsload ${loadaddr} ${bootdir}/${bootfile}; \ + ubifsload ${dtbaddr} ${bootdir}/${dtbfile} \0 \ mmcboot=echo Booting from mmc ...; \ run mmcargs; \ bootz ${loadaddr} - ${dtbaddr}\0 \ + ubiboot=echo Booting from nand (ubifs) ...; \ + run ubiargs; run ubiload; \ + bootz ${loadaddr} - ${dtbaddr}\0 \ #define CONFIG_BOOTCOMMAND \ mmc dev ${mmcdev}; if mmc rescan; then \ @@ -102,6 +119,8 @@ if run mmcload; then \ run mmcboot; \ fi; \ + else \ + run ubiboot; \ fi; \ /* Max number of command args */ @@ -181,18 +200,21 @@ #define CONFIG_SYS_MAX_NAND_DEVICE 1 #define CONFIG_SYS_NAND_ONFI_DETECTION 1 #define CONFIG_SYS_ENV_SECT_SIZE (128 10) /* 128 KiB */ +#define CONFIG_SYS_REDUNDAND_ENVIRONMENT #define CONFIG_ENV_IS_IN_NAND -#define CONFIG_ENV_OFFSET 0x26 /* environment starts here */ +#define CONFIG_ENV_OFFSET 0x18 /* environment starts here */ +#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_OFFSET + CONFIG_SYS_ENV_SECT_SIZE) +#define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE) #define CONFIG_MTD_PARTITIONS #define CONFIG_MTD_DEVICE #define CONFIG_RBTREE #define CONFIG_LZO -#define MTDIDS_DEFAULT nand0=nand -#define MTDPARTS_DEFAULT mtdparts=nand:512k(SPL),\ - 1m(U-Boot),128k(U-Boot Env),\ - 5m(Kernel),-(File System) +#define MTDIDS_DEFAULT nand0=omap2-nand.0 +#define MTDPARTS_DEFAULT mtdparts=omap2-nand.0:512k(spl),\ + 1m(uboot),256k(environment),\ + -(filesystem) /* Unsupported features */ #undef CONFIG_USE_IRQ -- 1.8.1.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 5/5] ARM: IGEP0033: Remove duplicate / unused #defines.
From: Enric Balletbo i Serra eballe...@iseebcn.com As config was originally based on am335x_evm.h we have also some duplicate / unnused #defines. Commit 15191c91 removed these #defines on various AM335x boards but not for IGEP COM AQUILA. This patch simply removes them for this board. Signed-off-by: Enric Balletbo i Serra eballe...@iseebcn.com --- include/configs/igep0033.h | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/include/configs/igep0033.h b/include/configs/igep0033.h index 3d08cfa..de60f75 100644 --- a/include/configs/igep0033.h +++ b/include/configs/igep0033.h @@ -136,7 +136,6 @@ /* Boot Argument Buffer Size */ #define CONFIG_SYS_BARGSIZECONFIG_SYS_CBSIZE #define CONFIG_SYS_LOAD_ADDR 0x8100 /* Default load address */ -#define CONFIG_SYS_HZ 1000 /* 1ms clock */ /* Physical Memory Map */ #define CONFIG_NR_DRAM_BANKS 1 /* 1 bank of DRAM */ @@ -149,7 +148,7 @@ /* Platform/Board specific defs */ #define CONFIG_SYS_TIMERBASE 0x4804 /* Use Timer2 */ #define CONFIG_SYS_PTV 2 /* Divisor: 2^(PTV+1) = 8 */ -#define CONFIG_SYS_HZ 1000 +#define CONFIG_SYS_HZ 1000/* 1ms clock */ /* NS16550 Configuration */ #define CONFIG_SYS_NS16550 @@ -158,7 +157,6 @@ #define CONFIG_SYS_NS16550_CLK (4800) #define CONFIG_SYS_NS16550_COM10x44e09000 /* UART0 */ -#define CONFIG_SERIAL_MULTI #define CONFIG_CONS_INDEX 1 #define CONFIG_BAUDRATE115200 @@ -272,10 +270,6 @@ #define CONFIG_SYS_NAND_ECCSIZE512 #define CONFIG_SYS_NAND_ECCBYTES 14 -#define CONFIG_SYS_NAND_ECCSTEPS 4 -#defineCONFIG_SYS_NAND_ECCTOTAL(CONFIG_SYS_NAND_ECCBYTES * \ - CONFIG_SYS_NAND_ECCSTEPS) - #defineCONFIG_SYS_NAND_U_BOOT_STARTCONFIG_SYS_TEXT_BASE #define CONFIG_SYS_NAND_U_BOOT_OFFS0x8 -- 1.8.1.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/7 v10] powerpc: deleted unused symbol CONFIG_SPL_NAND_MINIMAL and enabled some functionality for common SPL
From: Ying Zhang b40...@freescale.com 1. The symbol CONFIG_SPL_NAND_MINIMAL is unused, so deleted it. 2. Some functions were unused in the minimal SPL, but it is useful in the common SPL. So, enabled some functionality for common SPL. Signed-off-by: Ying Zhang b40...@freescale.com --- Change from v9: - No change. Change from v8: - No change. Change from v7: - No change. Change from v6: - No change. Change from v5: - No change. Change from v4: - Use !defined(CONFIG_SPL_BUILD) || !defined(CONFIG_SPL_INIT_MINIMAL). - to replace to new symbols. Change from v3: - Give up new symbol and delete the line. - ifndef CONFIG_SPL_BUILD in common/env_common.c. Change from v2: - Split from Add the symbol for the minimal SPL to eliminate unused code. Change from v1: - Split from boot from SD card/SPI flash with SPL. arch/powerpc/cpu/mpc85xx/tlb.c |3 ++- arch/powerpc/cpu/mpc8xxx/law.c |6 -- include/configs/MPC8313ERDB.h |1 - include/configs/P1022DS.h |1 - include/configs/p1_p2_rdb_pc.h |1 - 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/cpu/mpc85xx/tlb.c b/arch/powerpc/cpu/mpc85xx/tlb.c index 0dff37f..b903d02 100644 --- a/arch/powerpc/cpu/mpc85xx/tlb.c +++ b/arch/powerpc/cpu/mpc85xx/tlb.c @@ -55,7 +55,8 @@ void init_tlbs(void) return ; } -#if !defined(CONFIG_NAND_SPL) !defined(CONFIG_SPL_BUILD) +#if !defined(CONFIG_NAND_SPL) \ + (!defined(CONFIG_SPL_BUILD) || !defined(CONFIG_SPL_INIT_MINIMAL)) void read_tlbcam_entry(int idx, u32 *valid, u32 *tsize, unsigned long *epn, phys_addr_t *rpn) { diff --git a/arch/powerpc/cpu/mpc8xxx/law.c b/arch/powerpc/cpu/mpc8xxx/law.c index 6f9d568..6c0a307 100644 --- a/arch/powerpc/cpu/mpc8xxx/law.c +++ b/arch/powerpc/cpu/mpc8xxx/law.c @@ -92,7 +92,8 @@ void disable_law(u8 idx) return; } -#if !defined(CONFIG_NAND_SPL) !defined(CONFIG_SPL_BUILD) +#if !defined(CONFIG_NAND_SPL) \ + (!defined(CONFIG_SPL_BUILD) || !defined(CONFIG_SPL_INIT_MINIMAL)) static int get_law_entry(u8 i, struct law_entry *e) { u32 lawar; @@ -122,7 +123,8 @@ int set_next_law(phys_addr_t addr, enum law_size sz, enum law_trgt_if id) return idx; } -#if !defined(CONFIG_NAND_SPL) !defined(CONFIG_SPL_BUILD) +#if !defined(CONFIG_NAND_SPL) \ + (!defined(CONFIG_SPL_BUILD) || !defined(CONFIG_SPL_INIT_MINIMAL)) int set_last_law(phys_addr_t addr, enum law_size sz, enum law_trgt_if id) { u32 idx; diff --git a/include/configs/MPC8313ERDB.h b/include/configs/MPC8313ERDB.h index 1d753e7..0c15195 100644 --- a/include/configs/MPC8313ERDB.h +++ b/include/configs/MPC8313ERDB.h @@ -40,7 +40,6 @@ #define CONFIG_SPL_INIT_MINIMAL #define CONFIG_SPL_SERIAL_SUPPORT #define CONFIG_SPL_NAND_SUPPORT -#define CONFIG_SPL_NAND_MINIMAL #define CONFIG_SPL_FLUSH_IMAGE #define CONFIG_SPL_TARGET u-boot-with-spl.bin #define CONFIG_SPL_MPC83XX_WAIT_FOR_NAND diff --git a/include/configs/P1022DS.h b/include/configs/P1022DS.h index 9c27182..bcbda30 100644 --- a/include/configs/P1022DS.h +++ b/include/configs/P1022DS.h @@ -41,7 +41,6 @@ #define CONFIG_SPL_INIT_MINIMAL #define CONFIG_SPL_SERIAL_SUPPORT #define CONFIG_SPL_NAND_SUPPORT -#define CONFIG_SPL_NAND_MINIMAL #define CONFIG_SPL_FLUSH_IMAGE #define CONFIG_SPL_TARGET u-boot-with-spl.bin diff --git a/include/configs/p1_p2_rdb_pc.h b/include/configs/p1_p2_rdb_pc.h index 2fa5372..b35b966 100644 --- a/include/configs/p1_p2_rdb_pc.h +++ b/include/configs/p1_p2_rdb_pc.h @@ -159,7 +159,6 @@ #define CONFIG_SPL_INIT_MINIMAL #define CONFIG_SPL_SERIAL_SUPPORT #define CONFIG_SPL_NAND_SUPPORT -#define CONFIG_SPL_NAND_MINIMAL #define CONFIG_SPL_FLUSH_IMAGE #define CONFIG_SPL_TARGET u-boot-with-spl.bin -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/7 v10] powerpc: mpc85xx: Support booting from SD Card with SPL
From: Ying Zhang b40...@freescale.com the code from the internal on-chip ROM. It loads the final uboot image into DDR, then jump to it to begin execution. The SPL's size is sizeable, the maximum size must not exceed the size of L2 SRAM. It initializes the DDR through SPD code, and copys final uboot image to DDR. So there are two stage uboot images: * spl_boot, 96KB size. The env variables are copied to L2 SRAM, so that ddr spd code can get the interleaving mode setting in env. It loads final uboot image from offset 96KB. * final uboot image, size is variable depends on the functions enabled. Signed-off-by: Ying Zhang b40...@freescale.com --- Change from v9: - Mofidy drivers/mmc/fsl_esdhc_spl.c, fix checkpatch warnings. Change from v8: - No change. Change from v7: - No change. Change from v6: - Split to the patch Support booting from SD Card with SPL and the patch. - Enable P1022DS to boot from SD Card with SPL. this patch only support. - booting from SD Card with SPL. Change from v5: - Add new symbol CONFIG_SPL_ENV_IMPORT for contain the functionality. - env_import. Change from v4: - No change. Change from v3: - No change. Change from v2: - No change. Change from v1: - Split from boot from SD card/SPI flash with SPL. README |4 + arch/powerpc/cpu/mpc85xx/u-boot-spl.lds|5 + .../cpu/mpc8xxx/ddr/lc_common_dimm_params.c|4 + doc/README.mpc85xx-sd-spi-boot | 81 drivers/mmc/Makefile |3 + drivers/mmc/fsl_esdhc_spl.c| 130 drivers/mmc/mmc.c |2 + include/fsl_esdhc.h|1 + spl/Makefile |3 + 9 files changed, 233 insertions(+), 0 deletions(-) create mode 100644 doc/README.mpc85xx-sd-spi-boot create mode 100644 drivers/mmc/fsl_esdhc_spl.c diff --git a/README b/README index bcfffc3..f070e1b 100644 --- a/README +++ b/README @@ -3032,6 +3032,10 @@ FIT uImage format: Support for NAND boot using simple NAND drivers that expose the cmd_ctrl() interface. + CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT + Set for the SPL on PPC mpc8xxx targets, support for + arch/powerpc/cpu/mpc8xxx/ddr/libddr.o in SPL binary. + CONFIG_SYS_NAND_5_ADDR_CYCLE, CONFIG_SYS_NAND_PAGE_COUNT, CONFIG_SYS_NAND_PAGE_SIZE, CONFIG_SYS_NAND_OOBSIZE, CONFIG_SYS_NAND_BLOCK_SIZE, CONFIG_SYS_NAND_BAD_BLOCK_POS, diff --git a/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds b/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds index 20284ed..8aeb1a0 100644 --- a/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds +++ b/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds @@ -60,6 +60,11 @@ SECTIONS } _edata = .; + . = .; + __start___ex_table = .; + __ex_table : { *(__ex_table) } + __stop___ex_table = .; + . = ALIGN(8); __init_begin = .; __init_end = .; diff --git a/arch/powerpc/cpu/mpc8xxx/ddr/lc_common_dimm_params.c b/arch/powerpc/cpu/mpc8xxx/ddr/lc_common_dimm_params.c index e958e13..56128a7 100644 --- a/arch/powerpc/cpu/mpc8xxx/ddr/lc_common_dimm_params.c +++ b/arch/powerpc/cpu/mpc8xxx/ddr/lc_common_dimm_params.c @@ -218,12 +218,16 @@ compute_lowest_common_dimm_parameters(const dimm_params_t *dimm_params, if (dimm_params[i].n_ranks) { if (dimm_params[i].registered_dimm) { temp1 = 1; +#ifndef CONFIG_SPL_BUILD printf(Detected RDIMM %s\n, dimm_params[i].mpart); +#endif } else { temp2 = 1; +#ifndef CONFIG_SPL_BUILD printf(Detected UDIMM %s\n, dimm_params[i].mpart); +#endif } } } diff --git a/doc/README.mpc85xx-sd-spi-boot b/doc/README.mpc85xx-sd-spi-boot new file mode 100644 index 000..d5043cc --- /dev/null +++ b/doc/README.mpc85xx-sd-spi-boot @@ -0,0 +1,81 @@ + +Booting from On-Chip ROM (eSDHC or eSPI) + + +boot_format is a tool to write SD bootable images to a filesystem and build +SD/SPI images to a binary file for writing later. + +When booting from an SD card/MMC, boot_format puts the configuration file and +the RAM-based U-Boot image on the card. +When booting from an EEPROM, boot_format generates a binary image that is used +to boot from this EEPROM. + +Where to get boot_format: + + +you can browse it online at: +http://git.freescale.com/git/cgit.cgi/ppc/sdk/boot-format.git/ + +Building + + +Run the following to build this project + + $ make +
[U-Boot] [PATCH 3/7 v10] powerpc: p1022ds: Enable P1022DS to boot from SD Card with SPL
From: Ying Zhang b40...@freescale.com Enable p1022ds to start from eSDHC with SPL. Signed-off-by: Ying Zhang b40...@freescale.com --- Change from v9: - Mofidy board/freescale/p1022ds/spl.c, fix checkpatch warnings. Change from v8: - No change. Change from v7: - No change. Change from v6: - Split from the patch powerpc/p1022ds: boot from SD Card with SPL. - this patch only enables p1022ds to boot from SD Card with SPL. Change from v5: - No change. Change from v4: - No change. Change from v3: - No change. Change from v2: - No change. Change from v1: - No change. README |4 ++ board/freescale/common/Makefile |2 - board/freescale/p1022ds/Makefile |3 + board/freescale/p1022ds/spl.c| 110 ++ board/freescale/p1022ds/tlb.c| 23 +--- include/configs/P1022DS.h| 54 --- 6 files changed, 179 insertions(+), 17 deletions(-) create mode 100644 board/freescale/p1022ds/spl.c diff --git a/README b/README index f070e1b..f53613f 100644 --- a/README +++ b/README @@ -3036,6 +3036,10 @@ FIT uImage format: Set for the SPL on PPC mpc8xxx targets, support for arch/powerpc/cpu/mpc8xxx/ddr/libddr.o in SPL binary. + CONFIG_SPL_COMMON_INIT_DDR + Set for common ddr init with serial presence detect in + SPL binary. + CONFIG_SYS_NAND_5_ADDR_CYCLE, CONFIG_SYS_NAND_PAGE_COUNT, CONFIG_SYS_NAND_PAGE_SIZE, CONFIG_SYS_NAND_OOBSIZE, CONFIG_SYS_NAND_BLOCK_SIZE, CONFIG_SYS_NAND_BAD_BLOCK_POS, diff --git a/board/freescale/common/Makefile b/board/freescale/common/Makefile index 37236d0..e991def 100644 --- a/board/freescale/common/Makefile +++ b/board/freescale/common/Makefile @@ -61,9 +61,7 @@ COBJS-$(CONFIG_MPC8555CDS)+= cds_pci_ft.o COBJS-$(CONFIG_MPC8536DS) += ics307_clk.o COBJS-$(CONFIG_MPC8572DS) += ics307_clk.o -ifndef CONFIG_SPL_BUILD COBJS-$(CONFIG_P1022DS)+= ics307_clk.o -endif COBJS-$(CONFIG_P2020DS)+= ics307_clk.o COBJS-$(CONFIG_P3041DS)+= ics307_clk.o COBJS-$(CONFIG_P4080DS)+= ics307_clk.o diff --git a/board/freescale/p1022ds/Makefile b/board/freescale/p1022ds/Makefile index 0eeef05..9746063 100644 --- a/board/freescale/p1022ds/Makefile +++ b/board/freescale/p1022ds/Makefile @@ -24,6 +24,9 @@ ifdef MINIMAL COBJS-y+= spl_minimal.o tlb.o law.o else +ifdef CONFIG_SPL_BUILD +COBJS-y += spl.o +endif COBJS-y+= $(BOARD).o COBJS-y+= ddr.o COBJS-y+= law.o diff --git a/board/freescale/p1022ds/spl.c b/board/freescale/p1022ds/spl.c new file mode 100644 index 000..cc3000a --- /dev/null +++ b/board/freescale/p1022ds/spl.c @@ -0,0 +1,110 @@ +/* + * Copyright 2013 Freescale Semiconductor, Inc. + * + * 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 common.h +#include ns16550.h +#include malloc.h +#include mmc.h +#include nand.h +#include i2c.h +#include ../common/ngpixis.h +#include fsl_esdhc.h + +DECLARE_GLOBAL_DATA_PTR; + +static const u32 sysclk_tbl[] = { + 6000, 7499900, 83332500, 800, + 9000, 1000, 12499800, 1200 +}; + +ulong get_effective_memsize(void) +{ + return CONFIG_SYS_L2_SIZE; +} + +void board_init_f(ulong bootflag) +{ + int px_spd; + u32 plat_ratio, sys_clk, bus_clk; + ccsr_gur_t *gur = (void *)CONFIG_SYS_MPC85xx_GUTS_ADDR; + + console_init_f(); + + /* Set pmuxcr to allow both i2c1 and i2c2 */ + setbits_be32(gur-pmuxcr, in_be32(gur-pmuxcr) | 0x1000); + setbits_be32(gur-pmuxcr, +in_be32(gur-pmuxcr) | MPC85xx_PMUXCR_SD_DATA); + + /* Read back the register to synchronize the write. */ + in_be32(gur-pmuxcr); + + /* initialize selected port with appropriate baud rate */ + px_spd = in_8((unsigned char *)(PIXIS_BASE + PIXIS_SPD)); + sys_clk = sysclk_tbl[px_spd PIXIS_SPD_SYSCLK_MASK]; + plat_ratio = in_be32(gur-porpllsr) MPC85xx_PORPLLSR_PLAT_RATIO; + bus_clk = sys_clk * plat_ratio / 2; + + NS16550_init((NS16550_t)CONFIG_SYS_NS16550_COM1, +bus_clk / 16 / CONFIG_BAUDRATE); +#ifdef CONFIG_SPL_MMC_BOOT + puts(\nSD
[U-Boot] [PATCH 6/7 v10] NAND: TPL : introduce the TPL based on the SPL
From: Ying Zhang b40...@freescale.com Due to the nand SPL on some board(e.g. P1022DS)has a size limit, it can not be more than 4K. So, the SPL cannot initialize the DDR with the SPD code. This patch introduces TPL to enable a loader stub that is loaded by the code from the SPL. It initializes the DDR with the SPD or other operations. The TPL's size is sizeable, the maximum size is decided by the memory's size that TPL runs. It initializes the DDR through SPD code, and copys final uboot image to DDR. So there are three stage uboot images: * spl_boot, * tpl_boot, * final uboot image This patch is on top of the patch: SPL: Makefile: Build a separate autoconf.mk for SPL Signed-off-by: Ying Zhang b40...@freescale.com --- Change from v9: - Move the part revision to the other patch. for example:fsl_elbc_spl.c. - Modify the Makefile. - Modify doc/README.TPL, fix checkpatch warnings. Change from v8: - Modify the doc/README.TPL. - Modify the Makefile. - Modify the drivers/mtd/nand/fsl_elbc_spl.c. - Modify the spl/Makefile. Change from v7: - Modify the doc/README.TPL - Modify the spl/Makefile. Change from v6: - Modify the description of the patch. - Add the separate the autoconf.mk for TPL. - Delete the file tpl/Makefile and the directory tpl. - Reuse the spl/Makefie in TPL. Change from v5: - Use ifdef to define nand_load_image to non-static for non-SPL. Change from v4: - No change. Change from v3: - No change. Change from v2: - No change. Change from v1: - Split from powerpc/p1022ds: nand: introduce the TPL based on the SPL. Makefile | 50 ++ README | 16 config.mk | 30 -- doc/README.TPL | 45 + spl/Makefile | 20 5 files changed, 147 insertions(+), 14 deletions(-) create mode 100644 doc/README.TPL diff --git a/Makefile b/Makefile index 3ac97db..f4409eb 100644 --- a/Makefile +++ b/Makefile @@ -118,10 +118,11 @@ endif # ifneq ($(BUILD_DIR),) OBJTREE:= $(if $(BUILD_DIR),$(BUILD_DIR),$(CURDIR)) SPLTREE:= $(OBJTREE)/spl +TPLTREE:= $(OBJTREE)/tpl SRCTREE:= $(CURDIR) TOPDIR := $(SRCTREE) LNDIR := $(OBJTREE) -export TOPDIR SRCTREE OBJTREE SPLTREE +export TOPDIR SRCTREE OBJTREE SPLTREE TPLTREE MKCONFIG := $(SRCTREE)/mkconfig export MKCONFIG @@ -413,6 +414,7 @@ ALL-y += $(obj)u-boot.srec $(obj)u-boot.bin $(obj)System.map ALL-$(CONFIG_NAND_U_BOOT) += $(obj)u-boot-nand.bin ALL-$(CONFIG_ONENAND_U_BOOT) += $(obj)u-boot-onenand.bin ALL-$(CONFIG_SPL) += $(obj)spl/u-boot-spl.bin +ALL-$(CONFIG_TPL) += $(obj)tpl/u-boot-tpl.bin ALL-$(CONFIG_OF_SEPARATE) += $(obj)u-boot.dtb $(obj)u-boot-dtb.bin ifneq ($(CONFIG_SPL_TARGET),) ALL-$(CONFIG_SPL) += $(obj)$(subst ,,$(CONFIG_SPL_TARGET)) @@ -491,13 +493,25 @@ $(obj)u-boot.sha1:$(obj)u-boot.bin $(obj)u-boot.dis: $(obj)u-boot $(OBJDUMP) -d $ $@ +# $@ is output, $(1) and $(2) are inputs, $(3) is padded intermediate, +# $(4) is pad-to +SPL_PAD_APPEND = \ + $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(4) -I binary -O binary \ + $(1) $(obj)$(3); \ + cat $(obj)$(3) $(obj)$(2) $@; \ + rm $(obj)$(3) +ifdef CONFIG_TPL +SPL_PAYLOAD := $(obj)tpl/u-boot-with-tpl.bin +else +SPL_PAYLOAD := $(obj)u-boot.bin +endif -$(obj)u-boot-with-spl.bin: $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin - $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(CONFIG_SPL_PAD_TO) \ - -I binary -O binary $ $(obj)spl/u-boot-spl-pad.bin - cat $(obj)spl/u-boot-spl-pad.bin $(obj)u-boot.bin $@ - rm $(obj)spl/u-boot-spl-pad.bin +$(obj)u-boot-with-spl.bin: $(obj)spl/u-boot-spl.bin $(SPL_PAYLOAD) + $(call SPL_PAD_APPEND,$,$(SPL_PAYLOAD),spl/u-boot-spl-pad.bin,$(CONFIG_SPL_PAD_TO)) + +$(obj)tpl/u-boot-with-tpl.bin: $(obj)tpl/u-boot-tpl.bin $(obj)u-boot.bin + $(call SPL_PAD_APPEND,$,u-boot.bin,tpl/u-boot-tpl-pad.bin,$(CONFIG_TPL_PAD_TO)) $(obj)u-boot-with-spl.imx: $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin $(MAKE) -C $(SRCTREE)/arch/arm/imx-common \ @@ -623,6 +637,9 @@ $(obj)u-boot-nand.bin: nand_spl $(obj)u-boot.bin $(obj)spl/u-boot-spl.bin: $(SUBDIR_TOOLS) depend $(MAKE) -C spl all +$(obj)tpl/u-boot-tpl.bin: $(SUBDIR_TOOLS) depend + $(MAKE) -C spl all CONFIG_TPL_BUILD=y + updater: $(MAKE) -C tools/updater all @@ -630,6 +647,7 @@ updater: # parallel sub-makes creating .depend files simultaneously. depend dep:$(TIMESTAMP_FILE) $(VERSION_FILE) \ $(obj)include/spl-autoconf.mk \ + $(obj)include/tpl-autoconf.mk \ $(obj)include/autoconf.mk \ $(obj)include/generated/generic-asm-offsets.h \
[U-Boot] [PATCH 4/7 v10] powerpc : spi flash : Support to start from eSPI with SPL
From: Ying Zhang b40...@freescale.com This patch introduces SPL to enable a loader stub that being loaded by the code from the internal on-chip ROM. It loads the final uboot image into DDR, then jump to it to begin execution. The SPL's size is sizeable, the maximum size must not exceed the size of L2 SRAM. It initializes the DDR through SPD code, and copys final uboot image to DDR. So there are two stage uboot images: * spl_boot, 96KB size. The env variables are copied to L2 SRAM, so that ddr spd code can get the interleaving mode setting in env. It loads final uboot image from offset 96KB. * final uboot image, size is variable depends on the functions enabled. Signed-off-by: Ying Zhang b40...@freescale.com --- Change from v9: - Modify drivers/mtd/spi/fsl_espi_spl.c, fix checkpatch warnings. Change from v8: - No change. Change from v7: - No change. Change from v6: - No change. Change from v5: - Split from powerpc/p1022ds: boot from spi flash with SPL. - this patch add the capability starting from eSPI with SPL. Change from v4: - No change. Change from v3: - No change. Change from v2: - No change. Change from v1: - Split from boot from SD card/SPI flash with SPL. drivers/mtd/spi/Makefile |1 + drivers/mtd/spi/fsl_espi_spl.c | 77 drivers/mtd/spi/spi_flash.c|2 + 3 files changed, 80 insertions(+), 0 deletions(-) create mode 100644 drivers/mtd/spi/fsl_espi_spl.c diff --git a/drivers/mtd/spi/Makefile b/drivers/mtd/spi/Makefile index ecbb210..39e4e1d 100644 --- a/drivers/mtd/spi/Makefile +++ b/drivers/mtd/spi/Makefile @@ -27,6 +27,7 @@ LIB := $(obj)libspi_flash.o ifdef CONFIG_SPL_BUILD COBJS-$(CONFIG_SPL_SPI_LOAD) += spi_spl_load.o +COBJS-$(CONFIG_SPL_SPI_BOOT) += fsl_espi_spl.o endif COBJS-$(CONFIG_SPI_FLASH) += spi_flash.o diff --git a/drivers/mtd/spi/fsl_espi_spl.c b/drivers/mtd/spi/fsl_espi_spl.c new file mode 100644 index 000..9e216a6 --- /dev/null +++ b/drivers/mtd/spi/fsl_espi_spl.c @@ -0,0 +1,77 @@ +/* + * Copyright 2013 Freescale Semiconductor, Inc. + * + * 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 common.h +#include spi_flash.h +#include malloc.h + +#define ESPI_BOOT_IMAGE_SIZE 0x48 +#define ESPI_BOOT_IMAGE_ADDR 0x50 +#define CONFIG_CFG_DATA_SECTOR 0 + +/* + * The main entry for SPI booting. It's necessary that SDRAM is already + * configured and available since this code loads the main U-Boot image + * from SPI into SDRAM and starts it from there. + */ +void spi_boot(void) +{ + void (*uboot)(void) __noreturn; + u32 offset, code_len; + unsigned char *buf = NULL; + struct spi_flash *flash; + + flash = spi_flash_probe(CONFIG_ENV_SPI_BUS, CONFIG_ENV_SPI_CS, + CONFIG_ENV_SPI_MAX_HZ, CONFIG_ENV_SPI_MODE); + if (flash == NULL) { + puts(\nspi_flash_probe failed); + hang(); + } + + /* + * Load U-Boot image from SPI flash into RAM + */ + buf = malloc(flash-page_size); + if (buf == NULL) { + puts(\nmalloc failed); + hang(); + } + memset(buf, 0, flash-page_size); + + spi_flash_read(flash, CONFIG_CFG_DATA_SECTOR, + flash-page_size, (void *)buf); + offset = *(u32 *)(buf + ESPI_BOOT_IMAGE_ADDR); + /* Skip spl code */ + offset += CONFIG_SYS_SPI_FLASH_U_BOOT_OFFS; + /* Get the code size from offset 0x48 */ + code_len = *(u32 *)(buf + ESPI_BOOT_IMAGE_SIZE); + /* Skip spl code */ + code_len = code_len - CONFIG_SPL_MAX_SIZE; + /* copy code to DDR */ + spi_flash_read(flash, offset, code_len, + (void *)CONFIG_SYS_SPI_FLASH_U_BOOT_DST); + /* + * Jump to U-Boot image + */ + flush_cache(CONFIG_SYS_SPI_FLASH_U_BOOT_DST, code_len); + uboot = (void *)CONFIG_SYS_SPI_FLASH_U_BOOT_START; + (*uboot)(); +} diff --git a/drivers/mtd/spi/spi_flash.c b/drivers/mtd/spi/spi_flash.c index 6a6fe37..e474f5c 100644 --- a/drivers/mtd/spi/spi_flash.c +++ b/drivers/mtd/spi/spi_flash.c @@ -554,12 +554,14 @@ struct spi_flash *spi_flash_probe(unsigned int bus, unsigned int cs, goto err_manufacturer_probe; }
[U-Boot] [PATCH 7/7 v10] powerpc: p1022ds: add TPL for p1022ds nand boot
From: Ying Zhang b40...@freescale.com TPL is introduced in the patch NAND: TPL : introduce the TPL based on the SPL, here enable TPL for p1022ds nand boot. Signed-off-by: Ying Zhang b40...@freescale.com --- Change from v9: - Modify drivers/mtd/nand/Makefile. - Modify drivers/mtd/nand/fsl_elbc_spl.c. - Modify include/configs/P1022DS.h, fix checkpatch warnings. Change from v8: - Add new symbol CONFIG_SPL_ENV_IN_NAND. Change from v7: - No change. Change from v6: - Delete the file board/freescale/p1022ds/tpl.c. - Reuse the file board/freescale/p1022ds/spl.c in the TPL. Change from v5: - Change functionality nand_load_image to nand_load, it is called in TPL. Change from v4: - No change. Change from v3: - No change. Change from v2: - No change. Change from v1: - Split from powerpc/p1022ds: nand: introduce the TPL based on the SPL. board/freescale/p1022ds/spl.c | 16 +++ board/freescale/p1022ds/spl_minimal.c | 53 ++ drivers/mtd/nand/Makefile |1 + drivers/mtd/nand/fsl_elbc_spl.c | 27 +--- include/configs/P1022DS.h | 77 ++--- 5 files changed, 103 insertions(+), 71 deletions(-) diff --git a/board/freescale/p1022ds/spl.c b/board/freescale/p1022ds/spl.c index 1d52981..639f09d 100644 --- a/board/freescale/p1022ds/spl.c +++ b/board/freescale/p1022ds/spl.c @@ -100,21 +100,37 @@ void board_init_r(gd_t *gd, ulong dest_addr) get_clocks(); mem_malloc_init(CONFIG_SPL_RELOC_MALLOC_ADDR, CONFIG_SPL_RELOC_MALLOC_SIZE); +#ifndef CONFIG_SPL_NAND_BOOT env_init(); +#endif #ifdef CONFIG_SPL_MMC_BOOT mmc_initialize(bd); #endif /* relocate environment function pointers etc. */ +#ifdef CONFIG_SPL_NAND_BOOT + nand_spl_load_image(CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE, + (uchar *)CONFIG_ENV_ADDR); + + gd-env_addr = (ulong)(CONFIG_ENV_ADDR); + gd-env_valid = 1; +#else env_relocate(); +#endif i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE); gd-ram_size = initdram(0); +#ifdef CONFIG_SPL_NAND_BOOT + puts(Tertiary program loader running in sram...); +#else puts(Second program loader running in sram...\n); +#endif #ifdef CONFIG_SPL_MMC_BOOT mmc_boot(); #elif defined(CONFIG_SPL_SPI_BOOT) spi_boot(); +#elif defined(CONFIG_SPL_NAND_BOOT) + nand_boot(); #endif } diff --git a/board/freescale/p1022ds/spl_minimal.c b/board/freescale/p1022ds/spl_minimal.c index 8d12fa6..efb2af3 100644 --- a/board/freescale/p1022ds/spl_minimal.c +++ b/board/freescale/p1022ds/spl_minimal.c @@ -27,51 +27,6 @@ #include asm/fsl_ddr_sdram.h -/* - * Fixed sdram init -- doesn't use serial presence detect. - */ -void sdram_init(void) -{ - volatile ccsr_ddr_t *ddr = (ccsr_ddr_t *)CONFIG_SYS_MPC8xxx_DDR_ADDR; - - __raw_writel(CONFIG_SYS_DDR_CS0_BNDS, ddr-cs0_bnds); - __raw_writel(CONFIG_SYS_DDR_CS0_CONFIG, ddr-cs0_config); -#if CONFIG_CHIP_SELECTS_PER_CTRL 1 - __raw_writel(CONFIG_SYS_DDR_CS1_BNDS, ddr-cs1_bnds); - __raw_writel(CONFIG_SYS_DDR_CS1_CONFIG, ddr-cs1_config); -#endif - __raw_writel(CONFIG_SYS_DDR_TIMING_3, ddr-timing_cfg_3); - __raw_writel(CONFIG_SYS_DDR_TIMING_0, ddr-timing_cfg_0); - __raw_writel(CONFIG_SYS_DDR_TIMING_1, ddr-timing_cfg_1); - __raw_writel(CONFIG_SYS_DDR_TIMING_2, ddr-timing_cfg_2); - - __raw_writel(CONFIG_SYS_DDR_CONTROL_2, ddr-sdram_cfg_2); - __raw_writel(CONFIG_SYS_DDR_MODE_1, ddr-sdram_mode); - __raw_writel(CONFIG_SYS_DDR_MODE_2, ddr-sdram_mode_2); - - __raw_writel(CONFIG_SYS_DDR_INTERVAL, ddr-sdram_interval); - __raw_writel(CONFIG_SYS_DDR_DATA_INIT, ddr-sdram_data_init); - __raw_writel(CONFIG_SYS_DDR_CLK_CTRL, ddr-sdram_clk_cntl); - - __raw_writel(CONFIG_SYS_DDR_TIMING_4, ddr-timing_cfg_4); - __raw_writel(CONFIG_SYS_DDR_TIMING_5, ddr-timing_cfg_5); - __raw_writel(CONFIG_SYS_DDR_ZQ_CONTROL, ddr-ddr_zq_cntl); - __raw_writel(CONFIG_SYS_DDR_WRLVL_CONTROL, ddr-ddr_wrlvl_cntl); - - /* Set, but do not enable the memory */ - __raw_writel(CONFIG_SYS_DDR_CONTROL ~SDRAM_CFG_MEM_EN, - ddr-sdram_cfg); - - in_be32(ddr-sdram_cfg); - udelay(500); - - /* Let the controller go */ - out_be32(ddr-sdram_cfg, in_be32(ddr-sdram_cfg) | SDRAM_CFG_MEM_EN); - in_be32(ddr-sdram_cfg); - - set_next_law(0, CONFIG_SYS_SDRAM_SIZE_LAW, LAW_TRGT_IF_DDR_1); -} - const static u32 sysclk_tbl[] = { 6000, 7499900, 83332500, 800, 9000, 1000, 12499800, 1200 @@ -83,6 +38,10 @@ void board_init_f(ulong bootflag) u32 plat_ratio, sys_clk, bus_clk; ccsr_gur_t *gur = (void *)CONFIG_SYS_MPC85xx_GUTS_ADDR; +#if defined(CONFIG_SYS_NAND_BR_PRELIM) defined(CONFIG_SYS_NAND_OR_PRELIM) + set_lbc_br(0, CONFIG_SYS_NAND_BR_PRELIM); + set_lbc_or(0,
[U-Boot] [PATCH 5/7 v10] powerpc : p1022ds : enable p1022ds to start from eSPI with SPL
From: Ying Zhang b40...@freescale.com Enable p1022ds to start from eSPI with SPL. Signed-off-by: Ying Zhang b40...@freescale.com --- Change from v9: - No change. Change from v8: - No change. Change from v7: - No change. Change from v6: - No longer changes the header file included by the file. - board/freescale/p1022ds/spl.c. Change from v5: - Split from powerpc/p1022ds: boot from spi flash with SPL. - this patch enable P1022DS to start from eSPI with SPL. Change from v4: - No change. Change from v3: - No change. Change from v2: - No change. Change from v1: - Split from boot from SD card/SPI flash with SPL. board/freescale/p1022ds/spl.c | 10 ++ include/configs/P1022DS.h | 36 +--- 2 files changed, 39 insertions(+), 7 deletions(-) diff --git a/board/freescale/p1022ds/spl.c b/board/freescale/p1022ds/spl.c index cc3000a..1d52981 100644 --- a/board/freescale/p1022ds/spl.c +++ b/board/freescale/p1022ds/spl.c @@ -27,6 +27,7 @@ #include i2c.h #include ../common/ngpixis.h #include fsl_esdhc.h +#include spi_flash.h DECLARE_GLOBAL_DATA_PTR; @@ -53,6 +54,11 @@ void board_init_f(ulong bootflag) setbits_be32(gur-pmuxcr, in_be32(gur-pmuxcr) | MPC85xx_PMUXCR_SD_DATA); +#ifdef CONFIG_SPL_SPI_BOOT + /* Enable the SPI */ + clrsetbits_8(pixis-brdcfg0, PIXIS_ELBC_SPI_MASK, PIXIS_SPI); +#endif + /* Read back the register to synchronize the write. */ in_be32(gur-pmuxcr); @@ -66,6 +72,8 @@ void board_init_f(ulong bootflag) bus_clk / 16 / CONFIG_BAUDRATE); #ifdef CONFIG_SPL_MMC_BOOT puts(\nSD boot...\n); +#elif defined(CONFIG_SPL_SPI_BOOT) + puts(\nSPI Flash boot...\n); #endif /* copy code to RAM and jump to it - this should not return */ @@ -106,5 +114,7 @@ void board_init_r(gd_t *gd, ulong dest_addr) #ifdef CONFIG_SPL_MMC_BOOT mmc_boot(); +#elif defined(CONFIG_SPL_SPI_BOOT) + spi_boot(); #endif } diff --git a/include/configs/P1022DS.h b/include/configs/P1022DS.h index 5a532f4..11c464e 100644 --- a/include/configs/P1022DS.h +++ b/include/configs/P1022DS.h @@ -48,11 +48,33 @@ #endif #ifdef CONFIG_SPIFLASH -#define CONFIG_RAMBOOT_SPIFLASH -#define CONFIG_SYS_RAMBOOT -#define CONFIG_SYS_EXTRA_ENV_RELOC -#define CONFIG_SYS_TEXT_BASE 0x1100 -#define CONFIG_RESET_VECTOR_ADDRESS0x1107fffc +#define CONFIG_SPL +#define CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT +#define CONFIG_SPL_ENV_SUPPORT +#define CONFIG_SPL_SERIAL_SUPPORT +#define CONFIG_SPL_SPI_SUPPORT +#define CONFIG_SPL_SPI_FLASH_SUPPORT +#define CONFIG_SPL_SPI_FLASH_MINIMAL +#define CONFIG_SPL_FLUSH_IMAGE +#define CONFIG_SPL_TARGET u-boot-with-spl.bin +#define CONFIG_SPL_LIBGENERIC_SUPPORT +#define CONFIG_SPL_LIBCOMMON_SUPPORT +#define CONFIG_SPL_I2C_SUPPORT +#define CONFIG_FSL_LAW /* Use common FSL init code */ +#define CONFIG_SYS_TEXT_BASE 0x11001000 +#define CONFIG_SPL_TEXT_BASE 0xf8f81000 +#define CONFIG_SPL_PAD_TO 0x18000 +#define CONFIG_SPL_MAX_SIZE(96 * 1024) +#define CONFIG_SYS_SPI_FLASH_U_BOOT_SIZE (512 10) +#define CONFIG_SYS_SPI_FLASH_U_BOOT_DST(0x1100) +#define CONFIG_SYS_SPI_FLASH_U_BOOT_START (0x1100) +#define CONFIG_SYS_SPI_FLASH_U_BOOT_OFFS (96 10) +#define CONFIG_SYS_MPC85XX_NO_RESETVEC +#define CONFIG_SYS_LDSCRIPTarch/powerpc/cpu/mpc85xx/u-boot.lds +#define CONFIG_SPL_SPI_BOOT +#ifdef CONFIG_SPL_BUILD +#define CONFIG_SPL_COMMON_INIT_DDR +#endif #endif #define CONFIG_NAND_FSL_ELBC @@ -318,7 +340,7 @@ * Config the L2 Cache as L2 SRAM */ #if defined(CONFIG_SPL_BUILD) -#if defined(CONFIG_SDCARD) +#if defined(CONFIG_SDCARD) || defined(CONFIG_SPIFLASH) #define CONFIG_SYS_INIT_L2_ADDR0xf8f8 #define CONFIG_SYS_INIT_L2_ADDR_PHYS CONFIG_SYS_INIT_L2_ADDR #define CONFIG_SYS_L2_SIZE (256 10) @@ -562,7 +584,7 @@ /* * Environment */ -#ifdef CONFIG_RAMBOOT_SPIFLASH +#ifdef CONFIG_SPIFLASH #define CONFIG_ENV_IS_IN_SPI_FLASH #define CONFIG_ENV_SPI_BUS 0 #define CONFIG_ENV_SPI_CS 0 -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Pull request: u-boot-nds32
Hi Tom 2013/7/24 Macpaul Lin macp...@gmail.com: Hi Tom, Please pull the following patch from u-boot-nds32 into your tree. Thanks! Because of there are new patches and compile error fix, please ignore this pull-request. I'll review those new patches and resend this pull-request later. Thanks! -- Best regards, Macpaul Lin ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 01/10] ARM: move interrupt_init to before relocation
Hi Rob, On Wed, 12 Jun 2013 22:24:45 -0500, Rob Herring robherri...@gmail.com wrote: From: Rob Herring rob.herr...@calxeda.com interrupt_init also sets up the abort stack, but is not setup before relocation. So any aborts during relocation will hang and not print out any useful information. Fix this by moving the interrupt_init to after the stack setup in board_init_f. Signed-off-by: Rob Herring rob.herr...@calxeda.com --- v2: - Remove interrupt_init from board_init_r arch/arm/lib/board.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c index 09ab4ad..c90843e 100644 --- a/arch/arm/lib/board.c +++ b/arch/arm/lib/board.c @@ -447,6 +447,7 @@ void board_init_f(ulong bootflag) addr_sp += 128; /* leave 32 words for abort-stack */ gd-irq_sp = addr_sp; #endif + interrupt_init(); debug(New Stack Pointer is: %08lx\n, addr_sp); @@ -648,8 +649,6 @@ void board_init_r(gd_t *id, ulong dest_addr) misc_init_r(); #endif - /* set up exceptions */ - interrupt_init(); /* enable exceptions */ enable_interrupts(); Whole series applied to u-boot-arm/master, thanks! Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCHv2] socfpga: Move board/socfpga_cyclone5 to board/socfpga
Hi dingu...@altera.com, On Tue, 2 Jul 2013 17:00:18 -0500, dingu...@altera.com wrote: From: Dinh Nguyen dingu...@altera.com Because the SOCFPGA platform will include support for Cyclone V and Arria V FPGA parts, renaming socfpga_cyclone5 folder to socfpga to be more generic. Signed-off-by: Dinh Nguyen dingu...@altera.com Reviewed-by: Pavel Machek pa...@denx.de Cc: Chin Liang See cl...@altera.com Cc: Wolfgang Denk w...@denx.de CC: Pavel Machek pa...@denx.de Cc: Tom Rini tr...@ti.com v2: - Add Reviewed-by: Pavel Machek - Cc: Tom Rini --- .../altera/{socfpga_cyclone5 = socfpga}/Makefile |0 .../socfpga_cyclone5.c |0 boards.cfg |2 +- 3 files changed, 1 insertion(+), 1 deletion(-) rename board/altera/{socfpga_cyclone5 = socfpga}/Makefile (100%) rename board/altera/{socfpga_cyclone5 = socfpga}/socfpga_cyclone5.c (100%) diff --git a/board/altera/socfpga_cyclone5/Makefile b/board/altera/socfpga/Makefile similarity index 100% rename from board/altera/socfpga_cyclone5/Makefile rename to board/altera/socfpga/Makefile diff --git a/board/altera/socfpga_cyclone5/socfpga_cyclone5.c b/board/altera/socfpga/socfpga_cyclone5.c similarity index 100% rename from board/altera/socfpga_cyclone5/socfpga_cyclone5.c rename to board/altera/socfpga/socfpga_cyclone5.c diff --git a/boards.cfg b/boards.cfg index c0c4282..eea92d5 100644 --- a/boards.cfg +++ b/boards.cfg @@ -335,7 +335,7 @@ kzm9garm armv7 kzm9g kmc armadillo-800eva arm armv7 armadillo-800eva atmark-techno rmobile zynq arm armv7 zynq xilinx zynq zynq_dcc arm armv7 zynq xilinx zynqzynq:ZYNQ_DCC -socfpga_cyclone5arm armv7 socfpga_cyclone5 alterasocfpga +socfpga_cyclone5arm armv7 socfpgaaltera socfpga actux1_4_16 arm ixp actux1 - - actux1:FLASH2X2 actux1_4_32 arm ixp actux1 - - actux1:FLASH2X2,RAM_32MB actux1_8_16 arm ixp actux1 - - actux1:FLASH1X8 Applied to u-boot-arm/master, thanks! Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v6 00/12] arm: add Faraday A36x SoC platform support
Hi Kuo-Jung, On Thu, 4 Jul 2013 11:40:32 +0800, Kuo-Jung Su dant...@gmail.com wrote: From: Kuo-Jung Su dant...@faraday-tech.com These patches introduce Faraday A36x SoC platform support. So where are we on this series? Seems like there were a few comments about V6, and I haven't seen a V7 to address them. Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Pull request v2: u-boot-nds32
Hi Tom, Please pull the following patch from u-boot-nds32 into your tree. Thanks! The following changes since commit 62c175fbb8a0f9a926c88294ea9f7e88eb898f6c: Prepare v2013.07 (2013-07-23 07:58:13 -0400) are available in the git repository at: git://git.denx.de/u-boot-nds32.git master for you to fetch changes up to c54fd3efa497876a33cc3c6e7df514ae53abc729: nds32: Enable FPU if the version of CPU supported (2013-07-25 16:54:19 +0800) Axel Lin (1): nds32: ag101/ag102: Fix setting lastdec and now values Gabor Juhos (6): nds32: introduce macros for bit manipulation mmc: ftsdc010_mci: fix build error if CONFIG_FTSDC010_SDIO is not defined block: constify sect_buf argument of ide_write_data pci: add prototype for pci_ftpci_init() function pci: move pci_ftpci100.h to include/faraday/ftpci100.h nds32: adp-ag102: use 'faraday/ftpci100.h' for pci_ftpci_init Tom Rini (1): nds32: Update asm/io.h and asm/setup.h with SPDX license identifiers ken kuo (5): nds32: Enable two banks of SDRAM on Andes board nds32: Enable SDIO and EXT2 command support for Andes board nds32: Enable the function of passing parameters to Linux nds32: Convert Makefiles to use COBJS-y style nds32: Enable FPU if the version of CPU supported arch/nds32/cpu/n1213/Makefile| 4 ++-- arch/nds32/cpu/n1213/ag101/Makefile | 8 arch/nds32/cpu/n1213/ag101/lowlevel_init.S | 32 - arch/nds32/cpu/n1213/ag101/timer.c | 7 --- arch/nds32/cpu/n1213/ag102/Makefile | 8 arch/nds32/cpu/n1213/ag102/lowlevel_init.S | 26 arch/nds32/cpu/n1213/ag102/timer.c | 7 --- arch/nds32/include/asm/io.h | 41 ++--- arch/nds32/include/asm/setup.h | 190 arch/nds32/lib/Makefile | 9 ++--- board/AndesTech/adp-ag101/Makefile | 6 +++--- board/AndesTech/adp-ag101/adp-ag101.c| 10 +- board/AndesTech/adp-ag101p/Makefile | 6 +++--- board/AndesTech/adp-ag101p/adp-ag101p.c | 10 +- board/AndesTech/adp-ag102/Makefile | 4 ++-- board/AndesTech/adp-ag102/adp-ag102.c| 3 +-- doc/driver-model/UDM-block.txt | 2 +- drivers/block/ftide020.c | 2 +- drivers/mmc/ftsdc010_mci.c | 6 +- drivers/pci/pci_ftpci100.c | 4 ++-- include/common.h | 1 + include/configs/adp-ag101.h | 19 +- include/configs/adp-ag101p.h | 18 - drivers/pci/pci_ftpci100.h = include/faraday/ftpci100.h | 2 ++ include/ide.h| 2 +- 25 files changed, 384 insertions(+), 43 deletions(-) create mode 100644 arch/nds32/include/asm/setup.h rename drivers/pci/pci_ftpci100.h = include/faraday/ftpci100.h (98%) -- Best regards, Macpaul Lin ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 6/7] USB: usb-hub: Add a weak function for resetting devices
Hi Marek, On 07/25/2013 08:32 AM, Marek Vasut wrote: Dear Dan Murphy, Marek On 07/17/2013 11:30 PM, Marek Vasut wrote: Dear Dan Murphy, Add a __weak function that can be overridden to reset devices attached to an ehci devices after the FEAT_POWER has been submitted Signed-off-by: Dan Murphy dmur...@ti.com --- v3 - Modified location of the weak function - http://patchwork.ozlabs.org/patch/258229/ common/usb_hub.c | 12 1 file changed, 12 insertions(+) diff --git a/common/usb_hub.c b/common/usb_hub.c index 774ba63..c655b75 100644 --- a/common/usb_hub.c +++ b/common/usb_hub.c @@ -62,6 +62,10 @@ static struct usb_hub_device hub_dev[USB_MAX_HUB]; static int usb_hub_index; +__weak void usb_hub_reset_devices(int port) +{ + return; +} static int usb_get_hub_descriptor(struct usb_device *dev, void *data, int size) { @@ -444,6 +448,14 @@ static int usb_hub_configure(struct usb_device *dev) : no ); usb_hub_power_on(hub); + /* + * Reset any devices that may be in a bad state when applying + * the power. This is a __weak function. Resettig of the devices + * should occur in the board file of the device. + */ + for (i = 0; i dev-maxchild; i++) + usb_hub_reset_devices(i + 1); + for (i = 0; i dev-maxchild; i++) { ALLOC_CACHE_ALIGN_BUFFER(struct usb_port_status, portsts, 1); unsigned short portstatus, portchange; We hae like 10 reset hooks in the usb code, this means something just isn't right. The device doesn't enumerate, right ? Have you tried waiting a little after releasing the reset and before starting the EHCI ? Best regards, Marek Vasut Sorry for the delay in the response I have been looking heavily into this. I see we have many reset hooks but they all seem to mean something for different components. The one I am introducing is for the device itself and made it weak as there are devices that work properly like the 3503. What I am finding is that I have to apply port power and then hit the device's reset line to get the device to enumerate. Or I can hold the 9730 device in reset throughout the full USB init sequence and upon releasing it after port power the device is detected. There is no opportunity to release the reset while the USB detection state machine is running I have contacted the vendor to see if there are any known anomalies with this part if there is then I can document this in the commit. Sigh, ok, that's unfortunate. I keep wondering how come it works in Linux. But anyway, if the manufacturer won't come up with anything, we will apply this stuff. On Linux, we don't toggle Port power of the root hub once it has been enabled (i.e. EHCI started) and RESET line to 9730 is released. Dan, mentioned to me that on u-boot we toggle the Port power of the root hub each time a USB session is started. This seems to be causing problems with the 9730 as it seems to need an explicit reset after the Port power bit is toggled, in order to be detected. cheers, -roger ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] nds32: Update asm/io.h and asm/setup.h with SPDX license identifiers
Hi Tom, 2013/7/24 Tom Rini tr...@ti.com: Signed-off-by: Tom Rini tr...@ti.com --- arch/nds32/include/asm/io.h|4 +--- arch/nds32/include/asm/setup.h |4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) Applied to u-boot-nds32. Thanks! -- Best regards, Macpaul Lin ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] nds32: Convert Makefiles to use COBJS-y style
Hi Kuan-Yu, 2013/7/25 Kuan-Yu Kuo ken.ku...@gmail.com: Signed-off-by: Kuan-Yu Kuo ken.ku...@gmail.com Cc: Macpaul Lin macp...@gmail.com --- arch/nds32/cpu/n1213/Makefile |4 ++-- arch/nds32/cpu/n1213/ag101/Makefile |8 arch/nds32/cpu/n1213/ag102/Makefile |8 arch/nds32/lib/Makefile |9 ++--- board/AndesTech/adp-ag101/Makefile |6 +++--- board/AndesTech/adp-ag101p/Makefile |6 +++--- board/AndesTech/adp-ag102/Makefile |4 ++-- 7 files changed, 24 insertions(+), 21 deletions(-) Applied to u-boot-nds32. Thanks! -- Best regards, Macpaul Lin ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] nds32: Enable FPU if the version of CPU supported
Hi Kuan-Yu, 2013/7/25 Kuan-Yu Kuo ken.ku...@gmail.com: Some version of Andes core support FPU coprocessor, if this is the case, and toolchain support FPU instruction set, we should enable it at low level initialization time. Signed-off-by: Kuan-Yu Kuo ken.ku...@gmail.com Cc: Macpaul Lin macp...@gmail.com --- Change for v2: - Add compile option to determine if current used toolchain support FPU instruction or not. arch/nds32/cpu/n1213/ag101/lowlevel_init.S | 26 ++ arch/nds32/cpu/n1213/ag102/lowlevel_init.S | 26 ++ 2 files changed, 52 insertions(+) Applied to u-boot-nds32. Thanks! -- Best regards, Macpaul Lin ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC] [PATCH 0/5] Refactor MAINTAINERS file
Hi Wolfgang, On Wed, 24 Jul 2013 06:34:30 +0200, Wolfgang Denk w...@denx.de wrote: Dear Albert, In message 1374611299-16836-1-git-send-email-albert.u.b...@aribaud.net you wrote: This patch series aims at refactoring MAINTAINERS into an easily processable file. Thanks! Much appreciated. There are not actually five changes as such; the first four patches are step-by-step cleaning so that the last patch can be created essentially by running an AWK script on MAINTAINERS. Hm, I wonder if we shouldadd (back) a column providing information about the SoC type? When searching for - for example - maintainers for all i.MX6 boards it's not really helpful to only have a huge list of ARM boards. OK, you can argument that we can extract this information using MAKEALL -l, but then we could also omit the architecture column in the MAINTAINERS file. Alternatively, we could drop the MAINTAINERS file and just add the status and name/mail address columns to the boards.cfg file. I agree that this would become even more unreadabe, but then we'd have all information in a single place. [Merging MAINTAINERS into boards.cfg could be done automatically using your last file format as input.] What do you think? Thanks for your coments. I'd thought about this too but I feared the change would be too drastic. Happy to see you're considering it. Merging is feasible. The major change to my current RFC would be that instead of multiple lines for a board with multiple maintainers (which build processes based on boards.cfg would have trouble dealing with), I would keep a single line listing all maintainers' e-mail addresses, probably separated with commas and no spaces, for consistency with the options field and to keep script-based parsing easier. Empty options fields would probably have to be replaced with something like '-', which is already being used in boards.cfg, e.g. for Vendor, so that Options and Maintainers fields are easily distinguished. Of course, active boards boards should be put at the start of the file and orphans at the end, so that scripts only meant for active boards could detect when reaching the first orphan board and stop processing boards.cfg as early as possible. While we are on the sorting topic, the canonic sorting order for boards.cfg is, as per its heading comments, ARCH, CPU, SoC, Vendor, Target while the current display order has Target first, and Vendor and SoC the other way around. We can take this occasion to fix and homogenize the sorting and display orders. I would suggest adopting a 'progressive refinement' sort and display order: Status, ARCH, CPU, SoC, Vendor, Board name, Target, Options, Maintainers This has the benefit that, assuming the tabular column format is kept, a simple sort command should be enough to keep the entries in order, rather than the convoluted 'sort -bdf -k2,2 -k3,3 -k6,6 -k5,5 -k1,1' currently needed. Another benefit is that this display order groups together 'technical' fields (ARCH, CPU, and SoC), 'commercial' fields (Vendor and Board name), and 'U-Boot' fields (Target, Options and Maintainers). One could argue that by my own logic Status should be in the last group; but Status is an important sort key for scripts that only want to process active boards as I described above, and I want to remain able to simply 'sort' boards.cfg, hence the trade-off. Of course, these changes to the boards.cfg field order would have to reflect on the scripts that use it. I can take care of uses within the U-boot repo, but whatever is out there in the wild will have to cope by itself. Best regards, Wolfgang Denk Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] arm: goni: remove config.mk file
On Thu, 25 Jul 2013 10:45:35 +0900 Minkyu Kang mk7.k...@samsung.com wrote, Hi Minkyu, Since config.mk is deprecated, remove this file, and move CONFIG_SYS_TEXT_BASE define to config file. Signed-off-by: Minkyu Kang mk7.k...@samsung.com --- board/samsung/goni/config.mk | 34 -- include/configs/s5p_goni.h | 3 +++ 2 files changed, 3 insertions(+), 34 deletions(-) delete mode 100644 board/samsung/goni/config.mk diff --git a/board/samsung/goni/config.mk b/board/samsung/goni/config.mk deleted file mode 100644 index e4581ca..000 --- a/board/samsung/goni/config.mk +++ /dev/null @@ -1,34 +0,0 @@ -# -# Copyright (C) 2010 Samsung Electronics -# Kyungmin Park kyungmin.p...@samsung.com -# -# See file CREDITS for list of people who contributed to this -# project. -# -# 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 -# - -# On S5PC100 we use the 128 MiB OneDRAM bank at -# -# 0x3000 to 0x3500 (80MiB) -# 0x3800 to 0x4000 (128MiB) -# -# On S5PC110 we use the 128 MiB OneDRAM bank at -# -# 0x3000 to 0x3500 (80MiB) -# 0x4000 to 0x5000 (256MiB) -# -CONFIG_SYS_TEXT_BASE = 0x3480 diff --git a/include/configs/s5p_goni.h b/include/configs/s5p_goni.h index 56e8347..02355a6 100644 --- a/include/configs/s5p_goni.h +++ b/include/configs/s5p_goni.h @@ -45,6 +45,9 @@ /* DRAM Base */ #define CONFIG_SYS_SDRAM_BASE0x3000 Would it be possible to change the DMC0 (Memory controller) base address from 0x3000 to 0x2000? This is what the Linux kernel expects. (at /arch/arm/mach-s5pv210/include/mach/memory.h) +/* Text Base */ +#define CONFIG_SYS_TEXT_BASE 0x3480 + #define CONFIG_SETUP_MEMORY_TAGS #define CONFIG_CMDLINE_TAG #define CONFIG_INITRD_TAG -- Best regards, Lukasz Majewski Samsung RD Institute Poland (SRPOL) | Linux Platform Group ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v4 2/2] exynos5250: arndale: Add mmc support
From: Inderpal Singh inderpal.si...@linaro.org This patch adds mmc support to the arndale board. Signed-off-by: Inderpal Singh inderpal.si...@linaro.org --- board/samsung/arndale/arndale.c | 14 ++ board/samsung/dts/exynos5250-arndale.dts | 18 ++ 2 files changed, 32 insertions(+) diff --git a/board/samsung/arndale/arndale.c b/board/samsung/arndale/arndale.c index 47cbac8..5ee7252 100644 --- a/board/samsung/arndale/arndale.c +++ b/board/samsung/arndale/arndale.c @@ -22,6 +22,7 @@ #include common.h #include asm/arch/pinmux.h +#include asm/arch/dwmmc.h #include asm/arch/power.h DECLARE_GLOBAL_DATA_PTR; @@ -64,6 +65,19 @@ void dram_init_banksize(void) } } +#ifdef CONFIG_GENERIC_MMC +int board_mmc_init(bd_t *bis) +{ + int ret; + /* dwmmc initializattion for available channels */ + ret = exynos_dwmmc_init(gd-fdt_blob); + if (ret) + debug(dwmmc init failed\n); + + return ret; +} +#endif + static int board_uart_init(void) { int err, uart_id, ret = 0; diff --git a/board/samsung/dts/exynos5250-arndale.dts b/board/samsung/dts/exynos5250-arndale.dts index 3081ab4..948275a 100644 --- a/board/samsung/dts/exynos5250-arndale.dts +++ b/board/samsung/dts/exynos5250-arndale.dts @@ -20,4 +20,22 @@ serial0 = /serial@12C2; console = /serial@12C2; }; + + mmc@1220 { + samsung,bus-width = 8; + samsung,timing = 1 3 3; + }; + + mmc@1221 { + status = disabled; + }; + + mmc@1222 { + samsung,bus-width = 4; + samsung,timing = 1 2 3; + }; + + mmc@1223 { + status = disabled; + }; }; -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2] CONFIG: EXYNOS5: Replace misnomer SMDK5250 with EXYNOS5250 and update Makefiles
From: Chander Kashyap chander.kash...@linaro.org Update the Makefiles so that all boards can use the same spl generation tool Signed-off-by: Inderpal Singh inderpal.si...@linaro.org Acked-by: Simon Glass s...@chromium.org --- changes in v2: - Rebased to latest u-boot-samsung master branch Makefile|2 +- include/configs/exynos5250-dt.h |2 +- tools/Makefile |4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 4218226..51b02cd 100644 --- a/Makefile +++ b/Makefile @@ -829,7 +829,7 @@ clean: $(obj)tools/gdb/{astest,gdbcont,gdbsend} \ $(obj)tools/gen_eth_addr$(obj)tools/img2srec \ $(obj)tools/mk{env,}image $(obj)tools/mpc86x_clk \ - $(obj)tools/mk{smdk5250,}spl \ + $(obj)tools/mk{$(BOARD),}spl \ $(obj)tools/mxsboot\ $(obj)tools/ncb $(obj)tools/ubsha1 \ $(obj)tools/kernel-doc/docproc \ diff --git a/include/configs/exynos5250-dt.h b/include/configs/exynos5250-dt.h index 582c584..332a579 100644 --- a/include/configs/exynos5250-dt.h +++ b/include/configs/exynos5250-dt.h @@ -29,7 +29,7 @@ #define CONFIG_SAMSUNG /* in a SAMSUNG core */ #define CONFIG_S5P /* S5P Family */ #define CONFIG_EXYNOS5 /* which is in a Exynos5 Family */ -#define CONFIG_SMDK5250/* which is in a SMDK5250 */ +#define CONFIG_EXYNOS5250 #include asm/arch/cpu.h /* get chip and board defs */ diff --git a/tools/Makefile b/tools/Makefile index 46159b2..519b239 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -68,7 +68,7 @@ BIN_FILES-$(CONFIG_CMD_LOADS) += img2srec$(SFX) BIN_FILES-$(CONFIG_XWAY_SWAP_BYTES) += xway-swap-bytes$(SFX) BIN_FILES-y += mkenvimage$(SFX) BIN_FILES-y += mkimage$(SFX) -BIN_FILES-$(CONFIG_SMDK5250) += mksmdk5250spl$(SFX) +BIN_FILES-$(CONFIG_EXYNOS5250) += mk$(BOARD)spl$(SFX) BIN_FILES-$(CONFIG_MX23) += mxsboot$(SFX) BIN_FILES-$(CONFIG_MX28) += mxsboot$(SFX) BIN_FILES-$(CONFIG_NETCONSOLE) += ncb$(SFX) @@ -103,7 +103,7 @@ NOPED_OBJ_FILES-y += image-host.o NOPED_OBJ_FILES-y += omapimage.o NOPED_OBJ_FILES-y += mkenvimage.o NOPED_OBJ_FILES-y += mkimage.o -OBJ_FILES-$(CONFIG_SMDK5250) += mkexynosspl.o +OBJ_FILES-$(CONFIG_EXYNOS5250) += mkexynosspl.o OBJ_FILES-$(CONFIG_MX23) += mxsboot.o OBJ_FILES-$(CONFIG_MX28) += mxsboot.o OBJ_FILES-$(CONFIG_NETCONSOLE) += ncb.o -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] drivers/i2c: Update fti2c010.[ch], i2c_core.c to use SPDX identifiers
On Wed, Jul 24, 2013 at 09:26:40AM -0400, Tom Rini wrote: Signed-off-by: Tom Rini tr...@ti.com --- drivers/i2c/fti2c010.c |3 +-- drivers/i2c/fti2c010.h |3 +-- drivers/i2c/i2c_core.c | 14 +- 3 files changed, 3 insertions(+), 17 deletions(-) Applied to u-boot/master. -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Fwd: [i2c] Pull request
On Tue, Jul 23, 2013 at 03:52:10PM +0200, Heiko Schocher wrote: Hello, forgot to add the U-Boot mailinglist to Cc: ... Original-Nachricht Betreff: [U-Boot] [i2c] Pull request Datum: Tue, 23 Jul 2013 14:54:39 +0200 Von: Heiko Schocher h...@denx.de Antwort an: h...@denx.de Organisation: DENX Software Engineering An: Tom Rini tr...@ti.com Kopie (CC): Brunck, Holger holger.bru...@keymile.com, Kuo-Jung Su dant...@faraday-tech.com, Simon Glass s...@chromium.org, Naveen Krishna Chatradhi ch.nav...@samsung.com, Dirk Eibach dirk.eib...@gdsys.cc, Axel Lin axel@ingics.com, Alison Wang b18...@freescale.com Hello Tom, please pull from u-boot-i2c, thanks! This tree compiles clean for arm and powerpc with eldk-5.3. The following changes since commit 50ffc3b64aa3c8113f0a9fc31ea96e596d60054a: fs/ext4: fix log2blksz un-initialized error, by cacaulating its value from blksz (2013-07-22 10:09:56 -0400) are available in the git repository at: git://git.denx.de/u-boot-i2c.git master for you to fetch changes up to ecbd7e1ec7280d90d151a99691f74b892588cadd: fdtdec: Add compatible string for High speed i2c (2013-07-23 08:34:58 +0200) Alison Wang (2): vf610: Add I2C support for Vybrid VF610 platform I2C: mxc_i2c: Add support for Vybrid VF610 platform Axel Lin (1): cmd_i2c: Use ARRAY_SIZE instead of reinventing it Dirk Eibach (1): i2c, ppc4xx_i2c: switch to new multibus/multiadapter support Heiko Schocher (6): i2c: add i2c_core and prepare for new multibus support i2c: common changes for multibus/multiadapter support i2c, soft-i2c: switch to new multibus/multiadapter support i2c, fsl_i2c: switch to new multibus/multiadapter support i2c, multibus: get rid of CONFIG_I2C_MUX i2c, multibus, keymile: get rid of EEprom_ivm envvariable Holger Brunck (1): arm/km: fix u-boot update functionality Kuo-Jung Su (1): i2c: add Faraday FTI2C010 I2C controller support Simon Glass (2): tegra: i2c: Add function to know about current bus tegra: i2c: Enable new CONFIG_SYS_I2C framework naveen krishna chatradhi (1): fdtdec: Add compatible string for High speed i2c Applied to u-boot/master. -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 0/5] Introducing SPDX-License-Identifiers
On Wed, Jul 10, 2013 at 09:37:36AM +0200, Wolfgang Denk wrote: Like many other projects, U-Boot has a tradition of including big blocks of License headers in all files. This not only blows up the source code with mostly redundant information, but also makes it very difficult to generate License Clearing Reports. An additional problem is that even the same lincenses are referred to by a number of slightly varying text blocks (full, abbreviated, different indentation, line wrapping and/or white space, with obsolete address information, ...) which makes automatic processing a nightmare. To make this easier, such license headers in the source files will be replaced with a single line reference to Unique Lincense Identifiers as defined by the Linux Foundation's SPDX project [1]. For example, in a source file the full GPL v2.0 or later header text will be replaced by a single line: SPDX-License-Identifier:GPL-2.0+ OK, with the cmd_io.c fix squashed in (and S-o-B added), and v3 of 1/5 used instead, this is now applied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [GIT PULL] u-boot-mips/master
On Wed, Jul 24, 2013 at 12:42:14AM +0200, Daniel Schwierzeck wrote: Hi Tom, The following changes since commit 62c175fbb8a0f9a926c88294ea9f7e88eb898f6c: Prepare v2013.07 (2013-07-23 07:58:13 -0400) are available in the git repository at: git://git.denx.de/u-boot-mips.git master for you to fetch changes up to ef422fdc0e1684f4809e28ecbedaa922b7b50af5: MIPS: mips32/cache.S: use v1 register for indirect function calls (2013-07-24 00:20:07 +0200) Gabor Juhos (24): MIPS: mips64: fix typos in copyright text of start.S net: pcnet: use pci_virt_to_mem to obtain buffer addresses MIPS: import gt64120.h header from Linux MIPS: start.S: emulate REVISION register for qemu-malta MIPS: qemu-malta: add support for emulated MIPS Malta board MIPS: qemu-malta: add reset support MIPS: qemu-malta: enable flash support MIPS: qemu-malta: setup GT64120 registers as done by YAMON MIPS: qemu-malta: add PCI support MIPS: qemu-malta: bring up ethernet MIPS: mips32/time.c: fix checkpatch errors/warnings MIPS: mips64/interrupt.c: remove superfluous include MIPS: remove obsolete TODO items MIPS: mips32/cache.S: remove superfluous register assignment MIPS: mips32/start.S: use t8 register for dynamic relocation MIPS: mips32/start.S: rework relocation info check MIPS: xburst/start.S: save relocation address in s2 register MIPS: xburst/start.S: save relocation offset in s1 register MIPS: xburst/start.S: save gd in s0 register MIPS: xburst/start.S: use t8 register for dynamic relocation MIPS: xburst/start.S: rework relocation info check MIPS: mips32/cache.S: save return address in t9 register MIPS: mips32/cache.S: store cache line size in t8 register MIPS: mips32/cache.S: use v1 register for indirect function calls Applied to u-boot/master. -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Pull request v2: u-boot-nds32
On Thu, Jul 25, 2013 at 05:17:05PM +0800, Macpaul Lin wrote: Hi Tom, Please pull the following patch from u-boot-nds32 into your tree. Thanks! The following changes since commit 62c175fbb8a0f9a926c88294ea9f7e88eb898f6c: Prepare v2013.07 (2013-07-23 07:58:13 -0400) are available in the git repository at: git://git.denx.de/u-boot-nds32.git master for you to fetch changes up to c54fd3efa497876a33cc3c6e7df514ae53abc729: nds32: Enable FPU if the version of CPU supported (2013-07-25 16:54:19 +0800) Axel Lin (1): nds32: ag101/ag102: Fix setting lastdec and now values Gabor Juhos (6): nds32: introduce macros for bit manipulation mmc: ftsdc010_mci: fix build error if CONFIG_FTSDC010_SDIO is not defined block: constify sect_buf argument of ide_write_data pci: add prototype for pci_ftpci_init() function pci: move pci_ftpci100.h to include/faraday/ftpci100.h nds32: adp-ag102: use 'faraday/ftpci100.h' for pci_ftpci_init Tom Rini (1): nds32: Update asm/io.h and asm/setup.h with SPDX license identifiers ken kuo (5): nds32: Enable two banks of SDRAM on Andes board nds32: Enable SDIO and EXT2 command support for Andes board nds32: Enable the function of passing parameters to Linux nds32: Convert Makefiles to use COBJS-y style nds32: Enable FPU if the version of CPU supported Applied to u-boot/master. -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] qemu-malta: Update for SPDX license identifiers
On Wed, Jul 24, 2013 at 09:35:23AM -0400, Tom Rini wrote: Signed-off-by: Tom Rini tr...@ti.com --- board/qemu-malta/Makefile| 18 +- board/qemu-malta/lowlevel_init.S |4 +--- board/qemu-malta/qemu-malta.c|4 +--- drivers/pci/pci_gt64120.c|4 +--- include/configs/qemu-malta.h |4 +--- include/gt64120.h| 13 + include/pci_gt64120.h|4 +--- 7 files changed, 7 insertions(+), 44 deletions(-) Applied to u-boot/master. -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] dfu: bConfigurationValue=2 makes download from windows fail
Hi Lukasz We found out that there is an issue with dfu implementation on the latest U-Boot (v2013.07) when downloading from windows. From linux everything works fine. I discussed this with Tormod on the dfu-util mailing list. In short, I found out that when downloading with dfu-util in libusbx in windows_usb.c at some point we have the comparison config_index = dev-num_configurations and which becomes 1 = 1 and finally leads to return LIBUSB_ERROR_INVALID_PARAM. This is because in U-Boot drivers/usb/gadget/g_dnl.c we have LN 119: .bConfigurationValue = CONFIG_USBDOWNLOADER, and CONFIG_USBDOWNLOADER = 2 So my question is why do we have CONFIG_USBDOWNLOADER = 2? In a previous dfu implementation in U-Boot (v2011.09) bConfigurationValue was set to 1. When setting CONFIG_USBDOWNLOADER to 1, dfu download works on windows again. Is there any reasons against setting CONFIG_USBDOWNLOADER = 1? Of course this could be solved on linbusbx side. But I have the impression that this should be fixed in U-Boot. I posted my observations on the libusbx mailing list as well. Here the logs that I posted there: Log for dfu-util -a 1 -D MLO -v -v -v Linux: http://pastebin.com/iq80kg0p - ok Win: http://pastebin.com/Ax7RDFHk - fails Log for lsusb on linux for the different u-boot versions U-Boot v2011-09: http://pastebin.com/jeC01WxQ U-Boot v2013-07: http://pastebin.com/mvNLkUAs Best Sam ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v4 0/2] Add Arndale board support
The Arndale board is based on samsung's exynos5250 SOC. For spl generation, it depends on the patch at [5]. First patch provides the basic arndale board support. The second patch adds the MMC support. Changes in v2: - split from earlier patchset at [3] as per Minkyu - Removed checkpatch errors pointed out by Wolfgang - rebased to latest u-boot-samsung master branch - created mmc_boot.c to remove dependency on consolidation patch at [4] - split the mmc support to new patch as it depends on [2] [1] http://permalink.gmane.org/gmane.comp.boot-loaders.u-boot/162883 [2] http://comments.gmane.org/gmane.comp.boot-loaders.u-boot/159887 [3] http://comments.gmane.org/gmane.comp.boot-loaders.u-boot/157101 [4] http://comments.gmane.org/gmane.comp.boot-loaders.u-boot/156272 Changes in v3: - Used dt based serial - rebased to latest u-boot-samsung master branch Changes in v4: - Removed the config depedency on exynos5_dt.h as it contains smdk5250 configurations rather than the common exynos5 generic configurations. - Reused common exynos clock and memory initlialization routines. - rebased to latest u-boot-samsung master branch [5] http://permalink.gmane.org/gmane.comp.boot-loaders.u-boot/164824 Chander Kashyap (1): exynos5250: Add arndale board support Inderpal Singh (1): exynos5250: arndale: Add mmc support MAINTAINERS |4 + board/samsung/arndale/Makefile | 50 ++ board/samsung/arndale/arndale.c | 116 + board/samsung/arndale/arndale_spl.c | 66 board/samsung/dts/exynos5250-arndale.dts | 41 + boards.cfg |1 + include/configs/arndale.h| 271 ++ 7 files changed, 549 insertions(+) create mode 100644 board/samsung/arndale/Makefile create mode 100644 board/samsung/arndale/arndale.c create mode 100644 board/samsung/arndale/arndale_spl.c create mode 100644 board/samsung/dts/exynos5250-arndale.dts create mode 100644 include/configs/arndale.h -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 0/5] Introducing SPDX-License-Identifiers
Dear Tom, In message 20130725130551.GE19104@bill-the-cat you wrote: OK, with the cmd_io.c fix squashed in (and S-o-B added), and v3 of 1/5 used instead, this is now applied to u-boot/master, thanks! Thanks a lot! [But I can't see it on the server, yet?] Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de A day without sunshine is like night. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v4 1/2] exynos5250: Add arndale board support
Arndale board is based on samsung's exynos5250 soc. Signed-off-by: Inderpal Singh inderpal.si...@linaro.org Signed-off-by: Chander Kashyap chander.kash...@linaro.org --- MAINTAINERS |4 + board/samsung/arndale/Makefile | 50 ++ board/samsung/arndale/arndale.c | 102 +++ board/samsung/arndale/arndale_spl.c | 66 board/samsung/dts/exynos5250-arndale.dts | 23 +++ boards.cfg |1 + include/configs/arndale.h| 271 ++ 7 files changed, 517 insertions(+) create mode 100644 board/samsung/arndale/Makefile create mode 100644 board/samsung/arndale/arndale.c create mode 100644 board/samsung/arndale/arndale_spl.c create mode 100644 board/samsung/dts/exynos5250-arndale.dts create mode 100644 include/configs/arndale.h diff --git a/MAINTAINERS b/MAINTAINERS index 081cf96..bf489d4 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -747,6 +747,10 @@ Chander Kashyap k.chan...@samsung.com SMDKV310ARM ARMV7 (EXYNOS4210 SoC) SMDK5250ARM ARMV7 (EXYNOS5250 SoC) +Inderpal Singh inderpal.si...@linaro.org + + Arndale ARM ARMV7 (EXYNOS5250 SoC) + Lukasz Majewski l.majew...@samsung.com trats ARM ARMV7 (EXYNOS4210 SoC) diff --git a/board/samsung/arndale/Makefile b/board/samsung/arndale/Makefile new file mode 100644 index 000..5786774 --- /dev/null +++ b/board/samsung/arndale/Makefile @@ -0,0 +1,50 @@ +# +# Copyright (C) 2013 Samsung Electronics +# +# See file CREDITS for list of people who contributed to this +# project. +# +# 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 $(TOPDIR)/config.mk + +LIB= $(obj)lib$(BOARD).o + +COBJS += arndale_spl.o + +ifndef CONFIG_SPL_BUILD +COBJS += arndale.o +endif + +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS)) + +ALL:= $(obj).depend $(LIB) + +all: $(ALL) + +$(LIB):$(OBJS) + $(call cmd_link_o_target, $(OBJS)) + +# + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +# diff --git a/board/samsung/arndale/arndale.c b/board/samsung/arndale/arndale.c new file mode 100644 index 000..47cbac8 --- /dev/null +++ b/board/samsung/arndale/arndale.c @@ -0,0 +1,102 @@ +/* + * Copyright (C) 2013 Samsung Electronics + * + * See file CREDITS for list of people who contributed to this + * project. + * + * 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 common.h +#include asm/arch/pinmux.h +#include asm/arch/power.h + +DECLARE_GLOBAL_DATA_PTR; + +int board_init(void) +{ + gd-bd-bi_boot_params = (PHYS_SDRAM_1 + 0x100UL); + return 0; +} + +int dram_init(void) +{ + int i; + u32 addr; + + for (i = 0; i CONFIG_NR_DRAM_BANKS; i++) { + addr = CONFIG_SYS_SDRAM_BASE + (i * SDRAM_BANK_SIZE); + gd-ram_size += get_ram_size((long *)addr, SDRAM_BANK_SIZE); + } + return 0; +} + +int power_init_board(void) +{ + set_ps_hold_ctrl(); + return 0; +} + +void dram_init_banksize(void) +{ + int i; + u32 addr, size; + + for (i = 0; i CONFIG_NR_DRAM_BANKS; i++) { + addr = CONFIG_SYS_SDRAM_BASE + (i * SDRAM_BANK_SIZE); + size = get_ram_size((long *)addr, SDRAM_BANK_SIZE); + + gd-bd-bi_dram[i].start = addr; +
[U-Boot] [PATCH 2/2] fpga: zynqpl: Clear loopback mode during device init
From: Soren Brinkmann soren.brinkm...@xilinx.com Some versions of the Zynq first stage boot loader enable PCAP loopback during boot regardless of whether or not the boot image includes PL configuration. This behavior only appears in certain boot modes (notably QSPI boot). Attempting to configure the PL with the loopback bit set will result in timeouts and will prevent successful configuration. In order to avoid this problem, and to avoid dependency on the version of the FSBL used to boot the system, ensure that the loopback enable bit is cleared when loading the driver. Signed-off-by: Soren Brinkmann soren.brinkm...@xilinx.com Signed-off-by: Michal Simek michal.si...@xilinx.com --- drivers/fpga/zynqpl.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/fpga/zynqpl.c b/drivers/fpga/zynqpl.c index 6a5764f..7f5d90f 100644 --- a/drivers/fpga/zynqpl.c +++ b/drivers/fpga/zynqpl.c @@ -39,6 +39,7 @@ #define DEVCFG_STATUS_DMA_CMD_Q_E 0x4000 #define DEVCFG_STATUS_DMA_DONE_CNT_MASK0x3000 #define DEVCFG_STATUS_PCFG_INIT0x0010 +#define DEVCFG_MCTRL_PCAP_LPBK 0x0010 #define DEVCFG_MCTRL_RFIFO_FLUSH 0x0002 #define DEVCFG_MCTRL_WFIFO_FLUSH 0x0001 @@ -216,6 +217,9 @@ int zynq_load(Xilinx_desc *desc, const void *buf, size_t bsize) swap = SWAP_DONE; } + /* Clear loopback bit */ + clrbits_le32(devcfg_base-mctrl, DEVCFG_MCTRL_PCAP_LPBK); + if (!partialbit) { zynq_slcr_devcfg_disable(); -- 1.8.2.3 pgpwoymNdiA8D.pgp Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] dfu: bConfigurationValue=2 makes download from windows fail
On Thu, 25 Jul 2013 12:29:01 + Egli, Samuel samuel.e...@siemens.com wrote, Hi Samuel, Thanks for very detailed bug/problem report. Hi Lukasz We found out that there is an issue with dfu implementation on the latest U-Boot (v2013.07) when downloading from windows. From linux everything works fine. I discussed this with Tormod on the dfu-util mailing list. In short, I found out that when downloading with dfu-util in libusbx in windows_usb.c at some point we have the comparison config_index = dev-num_configurations and which becomes 1 = 1 and finally leads to return LIBUSB_ERROR_INVALID_PARAM. This is because in U-Boot drivers/usb/gadget/g_dnl.c we have LN 119: .bConfigurationValue =CONFIG_USBDOWNLOADER, and CONFIG_USBDOWNLOADER = 2 So my question is why do we have CONFIG_USBDOWNLOADER = 2? From the very short glimpse, I can suspect that this was set to 2 because of two supported functions (dfu and USB mass storage) at the g_dnl gadget. However this needs more investigation. I will delve into the code and reply tomorrow with more details. In a previous dfu implementation in U-Boot (v2011.09) bConfigurationValue was set to 1. I've checked out to v2011.09 u-boot and as fair as I see DFU was not implemented (in the mainline) then. The first posted by me dfu implementation was at http://article.gmane.org/gmane.comp.boot-loaders.u-boot/129318/match=dfu+usb Am I missing something? Do you use some older patch, which is unknown to me? When setting CONFIG_USBDOWNLOADER to 1, dfu download works on windows again. Is there any reasons against setting CONFIG_USBDOWNLOADER = 1? Of course this could be solved on linbusbx side. But I have the impression that this should be fixed in U-Boot. I posted my observations on the libusbx mailing list as well. Here the logs that I posted there: Log for dfu-util -a 1 -D MLO -v -v -v Linux: http://pastebin.com/iq80kg0p - ok Win: http://pastebin.com/Ax7RDFHk - fails Log for lsusb on linux for the different u-boot versions U-Boot v2011-09: http://pastebin.com/jeC01WxQ U-Boot v2013-07: http://pastebin.com/mvNLkUAs Best Sam -- Best regards, Lukasz Majewski Samsung RD Institute Poland (SRPOL) | Linux Platform Group ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/2] fpga: zynqpl: Add support for zc7100 device.
- Add support for zc7100 device. - FPGA programming on few of the SOC(zc7100) takes more than 1sec, hence increased the program time by 4sec to sync' all soc's. Signed-off-by: Jagannadha Sutradharudu Teki jaga...@xilinx.com Signed-off-by: Michal Simek michal.si...@xilinx.com --- board/xilinx/zynq/board.c | 4 drivers/fpga/zynqpl.c | 2 +- include/zynqpl.h | 5 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/board/xilinx/zynq/board.c b/board/xilinx/zynq/board.c index b02c364..c2046cf 100644 --- a/board/xilinx/zynq/board.c +++ b/board/xilinx/zynq/board.c @@ -36,6 +36,7 @@ Xilinx_desc fpga010 = XILINX_XC7Z010_DESC(0x10); Xilinx_desc fpga020 = XILINX_XC7Z020_DESC(0x20); Xilinx_desc fpga030 = XILINX_XC7Z030_DESC(0x30); Xilinx_desc fpga045 = XILINX_XC7Z045_DESC(0x45); +Xilinx_desc fpga100 = XILINX_XC7Z100_DESC(0x100); #endif int board_init(void) @@ -58,6 +59,9 @@ int board_init(void) case XILINX_ZYNQ_7045: fpga = fpga045; break; + case XILINX_ZYNQ_7100: + fpga = fpga100; + break; } #endif diff --git a/drivers/fpga/zynqpl.c b/drivers/fpga/zynqpl.c index 8feccde..6a5764f 100644 --- a/drivers/fpga/zynqpl.c +++ b/drivers/fpga/zynqpl.c @@ -47,7 +47,7 @@ #endif #ifndef CONFIG_SYS_FPGA_PROG_TIME -#define CONFIG_SYS_FPGA_PROG_TIME CONFIG_SYS_HZ/* 1 s */ +#define CONFIG_SYS_FPGA_PROG_TIME (CONFIG_SYS_HZ * 4) /* 4 s */ #endif int zynq_info(Xilinx_desc *desc) diff --git a/include/zynqpl.h b/include/zynqpl.h index 0247ef6..c5ea745 100644 --- a/include/zynqpl.h +++ b/include/zynqpl.h @@ -36,12 +36,14 @@ extern int zynq_info(Xilinx_desc *desc); #define XILINX_ZYNQ_7020 0x7 #define XILINX_ZYNQ_7030 0xc #define XILINX_ZYNQ_7045 0x11 +#define XILINX_ZYNQ_7100 0x16 /* Device Image Sizes */ #define XILINX_XC7Z010_SIZE16669920/8 #define XILINX_XC7Z020_SIZE32364512/8 #define XILINX_XC7Z030_SIZE47839328/8 #define XILINX_XC7Z045_SIZE106571232/8 +#define XILINX_XC7Z100_SIZE139330784/8 /* Descriptor Macros */ #define XILINX_XC7Z010_DESC(cookie) \ @@ -56,4 +58,7 @@ extern int zynq_info(Xilinx_desc *desc); #define XILINX_XC7Z045_DESC(cookie) \ { xilinx_zynq, devcfg, XILINX_XC7Z045_SIZE, NULL, cookie, 7z045 } +#define XILINX_XC7Z100_DESC(cookie) \ +{ xilinx_zynq, devcfg, XILINX_XC7Z100_SIZE, NULL, cookie, 7z100 } + #endif /* _ZYNQPL_H_ */ -- 1.8.2.3 pgpkztIH_Tibr.pgp Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] arm: lds: Remove libgcc eabi exception handling tables
Remove ARM eabi exception handling tables (for frame unwinding). AFAICT, u-boot stubs away the frame unwiding routines, so the tables will more or less just consume space. It should be OK to remove them. Signed-off-by: Edgar E. Iglesias edgar.igles...@xilinx.com Signed-off-by: Michal Simek michal.si...@xilinx.com --- This patch was sent to ML as RFC (May 9) Here is the origin response in connection to this patch. Ok, so Michal and I just did some fiddling with zynq builds and *exidx* sections. By default the *exidx* sections are between rodata and data, so removing them causes many apparent changes at the binary level. However, builds of zynq based on ARM master with the patch above vs master with a patch mapping *exidx* sections after BSS gives identical binaries. Thus the RFC has no functional effect. Also, ARM EHABI states that [exception] Tables are not required for ABI compliance at the C/Assembler level but are required for C++. http://infocenter.arm.com/help/topic/com.arm.doc.ihi0038a/IHI0038A_ehabi.pdf So as long as we don't put any C++ code in U-Boot (a prospect that I don't see happening any time soon), this RFC is safe and either is a no-op or removes useless bytes from the binary. --- arch/arm/cpu/u-boot.lds | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/cpu/u-boot.lds b/arch/arm/cpu/u-boot.lds index 3037885..8894c8a 100644 --- a/arch/arm/cpu/u-boot.lds +++ b/arch/arm/cpu/u-boot.lds @@ -113,4 +113,6 @@ SECTIONS /DISCARD/ : { *(.plt*) } /DISCARD/ : { *(.interp*) } /DISCARD/ : { *(.gnu*) } + /DISCARD/ : { *(.ARM.exidx*) } + /DISCARD/ : { *(.gnu.linkonce.armexidx.*) } } -- 1.8.2.3 pgpDo7HBEzclz.pgp Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/3] zynq: slcr: Wait 100ms till clk is properly setup
If you don't wait you will loose the first sent packet even all bits in emacps are correctly setup. Signed-off-by: Michal Simek michal.si...@xilinx.com --- arch/arm/cpu/armv7/zynq/slcr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/cpu/armv7/zynq/slcr.c b/arch/arm/cpu/armv7/zynq/slcr.c index 52048c6..1c28e96 100644 --- a/arch/arm/cpu/armv7/zynq/slcr.c +++ b/arch/arm/cpu/armv7/zynq/slcr.c @@ -86,7 +86,7 @@ void zynq_slcr_gem_clk_setup(u32 gem_id, u32 rclk, u32 clk) /* Configure GEM_RCLK_CTRL */ writel(rclk, slcr_base-gem0_rclk_ctrl); } - + udelay(10); out: zynq_slcr_lock(); } -- 1.8.2.3 pgp06PVH3GgnP.pgp Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 3/3] zynq: Enable axi ethernet and emaclite driver initialization
Zynq can have axi ethernet and emaclite IPs in programmable logic. Signed-off-by: Michal Simek michal.si...@xilinx.com --- board/xilinx/zynq/board.c | 17 + 1 file changed, 17 insertions(+) diff --git a/board/xilinx/zynq/board.c b/board/xilinx/zynq/board.c index 61a96b8..f9766a1 100644 --- a/board/xilinx/zynq/board.c +++ b/board/xilinx/zynq/board.c @@ -77,6 +77,23 @@ int board_eth_init(bd_t *bis) { u32 ret = 0; +#ifdef CONFIG_XILINX_AXIEMAC + ret |= xilinx_axiemac_initialize(bis, XILINX_AXIEMAC_BASEADDR, + XILINX_AXIDMA_BASEADDR); +#endif +#ifdef CONFIG_XILINX_EMACLITE + u32 txpp = 0; + u32 rxpp = 0; +# ifdef CONFIG_XILINX_EMACLITE_TX_PING_PONG + txpp = 1; +# endif +# ifdef CONFIG_XILINX_EMACLITE_RX_PING_PONG + rxpp = 1; +# endif + ret |= xilinx_emaclite_initialize(bis, XILINX_EMACLITE_BASEADDR, + txpp, rxpp); +#endif + #if defined(CONFIG_ZYNQ_GEM) # if defined(CONFIG_ZYNQ_GEM0) ret |= zynq_gem_initialize(bis, ZYNQ_GEM_BASEADDR0, -- 1.8.2.3 pgpr8glqZsUI6.pgp Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/3] zynq: Add new ddrc driver for ECC support
The first 1MB is not initialized by first stage bootloader. Check if memory is setup to 16bit mode and ECC is enabled. If it is, clear the first 1MB. Also u-boot should report only the half size of memory. Signed-off-by: Michal Simek michal.si...@xilinx.com Acked-by: Jagannadha Sutradharudu Teki jaga...@xilinx.com --- arch/arm/cpu/armv7/zynq/Makefile | 1 + arch/arm/cpu/armv7/zynq/ddrc.c | 65 ++ arch/arm/include/asm/arch-zynq/hardware.h | 8 arch/arm/include/asm/arch-zynq/sys_proto.h | 1 + board/xilinx/zynq/board.c | 2 + 5 files changed, 77 insertions(+) create mode 100644 arch/arm/cpu/armv7/zynq/ddrc.c diff --git a/arch/arm/cpu/armv7/zynq/Makefile b/arch/arm/cpu/armv7/zynq/Makefile index 388085d..f38b3b7 100644 --- a/arch/arm/cpu/armv7/zynq/Makefile +++ b/arch/arm/cpu/armv7/zynq/Makefile @@ -30,6 +30,7 @@ LIB = $(obj)lib$(SOC).o COBJS-y:= timer.o COBJS-y+= cpu.o +COBJS-y+= ddrc.o COBJS-y+= slcr.o COBJS := $(COBJS-y) diff --git a/arch/arm/cpu/armv7/zynq/ddrc.c b/arch/arm/cpu/armv7/zynq/ddrc.c new file mode 100644 index 000..e8f8c19 --- /dev/null +++ b/arch/arm/cpu/armv7/zynq/ddrc.c @@ -0,0 +1,65 @@ +/* + * Copyright (C) 2012 Michal Simek mon...@monstr.eu + * Copyright (C) 2012 Xilinx, Inc. All rights reserved. + * + * See file CREDITS for list of people who contributed to this + * project. + * + * 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 common.h +#include asm/io.h +#include asm/arch/sys_proto.h +#include asm/arch/hardware.h + +DECLARE_GLOBAL_DATA_PTR; + +/* Control regsiter bitfield definitions */ +#define ZYNQ_DDRC_CTRLREG_BUSWIDTH_MASK0xC +#define ZYNQ_DDRC_CTRLREG_BUSWIDTH_SHIFT 2 +#define ZYNQ_DDRC_CTRLREG_BUSWIDTH_16BIT 1 + +/* ECC scrub regsiter definitions */ +#define ZYNQ_DDRC_ECC_SCRUBREG_ECC_MODE_MASK 0x7 +#define ZYNQ_DDRC_ECC_SCRUBREG_ECCMODE_SECDED 0x4 + +void zynq_ddrc_init(void) +{ + u32 width, ecctype; + + width = readl(ddrc_base-ddrc_ctrl); + width = (width ZYNQ_DDRC_CTRLREG_BUSWIDTH_MASK) + ZYNQ_DDRC_CTRLREG_BUSWIDTH_SHIFT; + ecctype = (readl(ddrc_base-ecc_scrub) + ZYNQ_DDRC_ECC_SCRUBREG_ECC_MODE_MASK); + + /* ECC is enabled when memory is in 16bit mode and it is enabled */ + if ((ecctype == ZYNQ_DDRC_ECC_SCRUBREG_ECCMODE_SECDED) + (width == ZYNQ_DDRC_CTRLREG_BUSWIDTH_16BIT)) { + puts(Memory: ECC enabled\n); + /* +* Clear the first 1MB because it is not initialized from +* first stage bootloader. To get ECC to work all memory has +* been initialized by writing any value. +*/ + memset(0, 0, 1 * 1024 * 1024); + } else { + puts(Memory: ECC disabled\n); + } + + if (width == ZYNQ_DDRC_CTRLREG_BUSWIDTH_16BIT) + gd-ram_size /= 2; +} diff --git a/arch/arm/include/asm/arch-zynq/hardware.h b/arch/arm/include/asm/arch-zynq/hardware.h index 8b8a91a..b0e713d 100644 --- a/arch/arm/include/asm/arch-zynq/hardware.h +++ b/arch/arm/include/asm/arch-zynq/hardware.h @@ -33,6 +33,7 @@ #define ZYNQ_SDHCI_BASEADDR1 0xE0101000 #define ZYNQ_I2C_BASEADDR0 0xE0004000 #define ZYNQ_I2C_BASEADDR1 0xE0005000 +#define ZYNQ_DDRC_BASEADDR 0xF8006000 /* Reflect slcr offsets */ struct slcr_regs { @@ -100,4 +101,11 @@ struct scu_regs { #define scu_base ((struct scu_regs *)ZYNQ_SCU_BASEADDR) +struct ddrc_regs { + u32 ddrc_ctrl; /* 0x0 */ + u32 reserved[60]; + u32 ecc_scrub; /* 0xF4 */ +}; +#define ddrc_base ((struct ddrc_regs *)ZYNQ_DDRC_BASEADDR) + #endif /* _ASM_ARCH_HARDWARE_H */ diff --git a/arch/arm/include/asm/arch-zynq/sys_proto.h b/arch/arm/include/asm/arch-zynq/sys_proto.h index 2317121..2698846 100644 --- a/arch/arm/include/asm/arch-zynq/sys_proto.h +++ b/arch/arm/include/asm/arch-zynq/sys_proto.h @@ -30,6 +30,7 @@ extern void zynq_slcr_gem_clk_setup(u32 gem_id, u32 rclk, u32 clk); extern void zynq_slcr_devcfg_disable(void); extern void zynq_slcr_devcfg_enable(void); extern u32 zynq_slcr_get_idcode(void); +extern void
Re: [U-Boot] [PATCH 2/6] drivers/power/pmic: Add tps65217 driver
On Tue, Jul 23, 2013 at 01:34:15PM -0500, Dan Murphy wrote: On 07/19/2013 02:00 PM, Tom Rini wrote: From: Greg Guyotte gguyo...@ti.com Add a driver for the TPS65217 PMIC that is found in the Beaglebone family of boards. Signed-off-by: Greg Guyotte gguyo...@ti.com [trini: Split and rework Greg's changes into new drivers/power framework] Signed-off-by: Tom Rini tr...@ti.com --- drivers/power/pmic/Makefile|1 + drivers/power/pmic/pmic_tps65217.c | 108 include/power/tps65217.h | 92 ++ 3 files changed, 201 insertions(+) create mode 100644 drivers/power/pmic/pmic_tps65217.c create mode 100644 include/power/tps65217.h diff --git a/drivers/power/pmic/Makefile b/drivers/power/pmic/Makefile index 14d426f..473cb80 100644 --- a/drivers/power/pmic/Makefile +++ b/drivers/power/pmic/Makefile @@ -29,6 +29,7 @@ COBJS-$(CONFIG_POWER_MAX8998) += pmic_max8998.o COBJS-$(CONFIG_POWER_MAX8997) += pmic_max8997.o COBJS-$(CONFIG_POWER_MUIC_MAX8997) += muic_max8997.o COBJS-$(CONFIG_POWER_MAX77686) += pmic_max77686.o +COBJS-$(CONFIG_POWER_TPS65217) += pmic_tps65217.o COBJS := $(COBJS-y) SRCS := $(COBJS:.o=.c) diff --git a/drivers/power/pmic/pmic_tps65217.c b/drivers/power/pmic/pmic_tps65217.c new file mode 100644 index 000..c84bbcd --- /dev/null +++ b/drivers/power/pmic/pmic_tps65217.c @@ -0,0 +1,108 @@ +/* + * (C) Copyright 2011-2013 Curious if this is the first time in why does it have a 2011 copyright? Because the code was written in 2011 (and has been whacked around a few times every year. [snip] +/** + * tps65217_reg_read() - Generic function that can read a TPS65217 register + * @src_reg: Source register address + * @src_val: Address of destination variable No return defined here in the brief Fixed. + */ +uchar tps65217_reg_read(uchar src_reg, uchar *src_val) +{ + if (i2c_read(TPS65217_CHIP_PM, src_reg, 1, src_val, 1)) + return 1; This may be nit picky but generally in error cases we return negative. Also why not return an error from errno? Because we're following i2c which is 0 or not 0, updated to use ret = i2c_read(...); if (ret) return ret here and throughout. Also why an uchar when you are returning an int? Fixed. [snip] +int tps65217_reg_write(uchar prot_level, uchar dest_reg, uchar dest_val, is prot_level a uchar or int? It's 0/1/2. I don't have a strong preference on if we type this out as an int or uchar. Also would it not be better to have an interface that will check for mask and do the read and just have a dedicated write function? I don't see the benefit, especially given the usage we have of just updating certain bitfields at a time. [snip] +int tps65217_voltage_update(uchar dc_cntrl_reg, uchar volt_sel) No header for the interface Fixed. +{ + if ((dc_cntrl_reg != DEFDCDC1) (dc_cntrl_reg != DEFDCDC2) + (dc_cntrl_reg != DEFDCDC3)) What do these magic numbers mean? Are these HEX numbers or a string? OK, it took me a minute to understand your question here. These are defines to register names, matching the TRM for the part. The register names are however annoyingly and easily confused as hex values. +#define PROT_LEVEL_NONE0x00 Are these registers or a mask now? +#define PROT_LEVEL_1 0x01 +#define PROT_LEVEL_2 0x02 These are values as to what level of protection the chip has the register under. +uchar tps65217_reg_read(uchar src_reg, uchar *src_val); +int tps65217_reg_write(uchar prot_level, uchar dest_reg, uchar dest_val, + uchar mask); +int tps65217_voltage_update(uchar dc_cntrl_reg, uchar volt_sel); Are these interfaces supposed to be accessed by an outside object? Typically there should be no direct register access from other objects. We can evaluate if there's consolidation to be done here once other boards go and adapt MPU clock frequency scaling. What registers need to be whacked on what board are going to decide if we can hide more details, or not. -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] dfu: bConfigurationValue=2 makes download from windows fail
Hi Lukasz, -Original Message- From: Lukasz Majewski [mailto:l.majew...@samsung.com] Sent: Donnerstag, 25. Juli 2013 16:03 To: Egli, Samuel Cc: Heiko Schocher; Wolfgang Denk; Bach, Pascal; Meier, Roger; u- b...@lists.denx.de; Tormod Volden Subject: Re: dfu: bConfigurationValue=2 makes download from windows fail On Thu, 25 Jul 2013 12:29:01 + Egli, Samuel samuel.e...@siemens.com wrote, Hi Samuel, Thanks for very detailed bug/problem report. your welcome. [...] From the very short glimpse, I can suspect that this was set to 2 because of two supported functions (dfu and USB mass storage) at the g_dnl gadget. Ok, but then bNumConfigurations would be set to 2 as well? However this needs more investigation. I will delve into the code and reply tomorrow with more details. Ok. In a previous dfu implementation in U-Boot (v2011.09) bConfigurationValue was set to 1. I've checked out to v2011.09 u-boot and as fair as I see DFU was not implemented (in the mainline) then. The first posted by me dfu implementation was at http://article.gmane.org/gmane.comp.boot-loaders.u- boot/129318/match=dfu+usb Am I missing something? Do you use some older patch, which is unknown to me? Sorry. No, I wasn't very clear. We used U-Boot based on 2011.09_AM335xPSP_04.06.00.08 from arago-project. But know I cannot find the patches on arago-project.org. If you want I can provide these patches to you. But, we're sticking now to v2013.07 anyway. [...] Best Sam ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/7 v10] powerpc: deleted unused symbol CONFIG_SPL_NAND_MINIMAL and enabled some functionality for common SPL
On 07/25/2013 02:44:39 AM, ying.zh...@freescale.com wrote: From: Ying Zhang b40...@freescale.com 1. The symbol CONFIG_SPL_NAND_MINIMAL is unused, so deleted it. 2. Some functions were unused in the minimal SPL, but it is useful in the common SPL. So, enabled some functionality for common SPL. Signed-off-by: Ying Zhang b40...@freescale.com --- This is the second time you've posted v10 of this series... -Scott ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v6 04/12] cfi_flash: use buffer length in unmap_physmem()
On 07/04/2013 05:40 AM, Kuo-Jung Su wrote: From: Kuo-Jung Su dant...@faraday-tech.com While the flash_detect_legacy() of drivers/mtd/cfi_flash.c feed unmap_physmem() with MAP_NOCACHE as 2nd parameter, the do_spi_flash_read_write() of common/cmd_sf.c feed unmap_physmem() with the length of the mapped buffer as 2nd parameter. It's apparently a bug, and I personally think the 2nd parameter should be the length of the mapped buffer. Signed-off-by: Kuo-Jung Su dant...@faraday-tech.com CC: Albert Aribaud albert.u.b...@aribaud.net CC: Stefan Roese s...@denx.de Applied to u-boot-cfi-flash. Thanks, Stefan ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Please pull u-boot-cfi-flash
Hi Tom, please pull the following patch: The following changes since commit 62c175fbb8a0f9a926c88294ea9f7e88eb898f6c: Prepare v2013.07 (2013-07-23 07:58:13 -0400) are available in the git repository at: git://www.denx.de/git/u-boot-cfi-flash.git master for you to fetch changes up to d8b57c0a83f9cabc476ca0045c0089195c894b81: cfi_flash: use buffer length in unmap_physmem() (2013-07-25 16:43:40 +0200) Kuo-Jung Su (1): cfi_flash: use buffer length in unmap_physmem() drivers/mtd/cfi_flash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] cfi_flash: Add prototypes of overridable functions
On 06/06/2013 09:54 AM, Masahiro Yamada wrote: This commit adds some prototypes into include/mtd/cfi_flash.h. These functions are defined with a weak attribute in drivers/mtd/cfi_flash.c. This means they can be overrided by board-specific ones if necessary. When defining such functions under board/ directory or somewhere, cfi_flash.h should be included. This makes sure that board-specfic cfi functions are defined in a correct prototype. Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com Is this patch still needed? Thanks, Stefan ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] dfu: bConfigurationValue=2 makes download from windows fail
On Thu, 25 Jul 2013 14:41:02 + Egli, Samuel samuel.e...@siemens.com wrote, Hi Lukasz, -Original Message- From: Lukasz Majewski [mailto:l.majew...@samsung.com] Sent: Donnerstag, 25. Juli 2013 16:03 To: Egli, Samuel Cc: Heiko Schocher; Wolfgang Denk; Bach, Pascal; Meier, Roger; u- b...@lists.denx.de; Tormod Volden Subject: Re: dfu: bConfigurationValue=2 makes download from windows fail On Thu, 25 Jul 2013 12:29:01 + Egli, Samuel samuel.e...@siemens.com wrote, Hi Samuel, Thanks for very detailed bug/problem report. your welcome. [...] From the very short glimpse, I can suspect that this was set to 2 because of two supported functions (dfu and USB mass storage) at the g_dnl gadget. Ok, but then bNumConfigurations would be set to 2 as well? However this needs more investigation. I will delve into the code and reply tomorrow with more details. Ok. In a previous dfu implementation in U-Boot (v2011.09) bConfigurationValue was set to 1. I've checked out to v2011.09 u-boot and as fair as I see DFU was not implemented (in the mainline) then. The first posted by me dfu implementation was at http://article.gmane.org/gmane.comp.boot-loaders.u- boot/129318/match=dfu+usb Am I missing something? Do you use some older patch, which is unknown to me? Sorry. No, I wasn't very clear. We used U-Boot based on 2011.09_AM335xPSP_04.06.00.08 from arago-project. But know I cannot find the patches on arago-project.org. If you want I can provide these patches to you. But, we're sticking now to v2013.07 anyway. I think, that we shall focus now at newest u-boot (v2013.07). [...] Best Sam -- Best regards, Lukasz Majewski Samsung RD Institute Poland (SRPOL) | Linux Platform Group ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] How to integrate libtomcrypt into u-boot?
Hi there, for a research project I need to incorporate different crypto functions (PRNG, SHA1, symmetric encryption/decryption) into the MLO part of u-boot. My questions: 1.) Has someone achieved this before? 2.) Do you guys know it this is even possible regarding the limited size of the MLO and the size of libtomcrypt? 3.) Does someone know an elegant way of resolving missing *.h file-errors besides the straight forward way of copying them fomr /usr/include/ to {u-boot-src}/include/ ? Thanks a lot ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 1/2] mx6: Factor out common HDMI setup code
Hi Pardeep, On 07/24/2013 02:35 PM, Pardeep Kumar Singla wrote: Instead of duplicating HDMI setup code for every mx6 board, factor out the common code Signed-off-by: Pardeep Kumar Singla b45...@freescale.com --- Changes since v2: Added new function enable_ipu_clock() to separate the functinality of ipu clock from hdmi setup. Remove unnecessary include files. snip diff --git a/arch/arm/cpu/armv7/mx6/clock.c b/arch/arm/cpu/armv7/mx6/clock.c index 3c0d908..a724e66 100644 --- a/arch/arm/cpu/armv7/mx6/clock.c +++ b/arch/arm/cpu/armv7/mx6/clock.c @@ -468,6 +468,14 @@ int do_mx6_showclocks(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) return 0; } +void enable_ipu_clock() If this is public, it should be declared in arch/arm/include/asm/arch-mx6/clock.h +{ + struct mxc_ccm_reg *mxc_ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR; + int reg; + reg = readl(mxc_ccm-CCGR3); + reg |= MXC_CCM_CCGR3_IPU1_IPU_DI0_OFFSET; + writel(reg, mxc_ccm-CCGR3); +} /***/ U_BOOT_CMD( diff --git a/arch/arm/cpu/armv7/mx6/soc.c b/arch/arm/cpu/armv7/mx6/soc.c index fc436fb..8f78d7e 100644 --- a/arch/arm/cpu/armv7/mx6/soc.c +++ b/arch/arm/cpu/armv7/mx6/soc.c snip + +void imx_setup_hdmi(void) +{ + struct mxc_ccm_reg *mxc_ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR; + struct hdmi_regs *hdmi = (struct hdmi_regs *)HDMI_ARB_BASE_ADDR; + int reg; + + enable_ipu_clock(); I think this enabling belongs in the routines which call imx_setup_hdmi(), since folks will (and probably have) create custom boards based on those shells and this is also required to support for LDB and RGB displays. + + /* Turn on HDMI PHY clock */ + reg = readl(mxc_ccm-CCGR2); + reg |= MXC_CCM_CCGR2_HDMI_TX_IAHBCLK_MASK| +MXC_CCM_CCGR2_HDMI_TX_ISFRCLK_MASK; + writel(reg, mxc_ccm-CCGR2); snip diff --git a/arch/arm/include/asm/arch-mx6/mxc_hdmi.h b/arch/arm/include/asm/arch-mx6/mxc_hdmi.h index 9dccb3f..5cd6aa6 100644 --- a/arch/arm/include/asm/arch-mx6/mxc_hdmi.h +++ b/arch/arm/include/asm/arch-mx6/mxc_hdmi.h @@ -21,6 +21,11 @@ #ifndef __MXC_HDMI_H__ #define __MXC_HDMI_H__ +#ifdef CONFIG_IMX_HDMI +void imx_enable_hdmi_phy(void); +void imx_setup_hdmi(void); +#endif + /* * Hdmi controller registers */ diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c index 8f0f9b8..45a8f7a 100644 --- a/board/boundary/nitrogen6x/nitrogen6x.c +++ b/board/boundary/nitrogen6x/nitrogen6x.c snip @@ -653,25 +640,14 @@ static void setup_display(void) struct mxc_ccm_reg *mxc_ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR; struct anatop_regs *anatop = (struct anatop_regs *)ANATOP_BASE_ADDR; struct iomuxc *iomux = (struct iomuxc *)IOMUXC_BASE_ADDR; - struct hdmi_regs *hdmi = (struct hdmi_regs *)HDMI_ARB_BASE_ADDR; - int reg; This is probably where the enable_ipu_clock() call belongs. + imx_setup_hdmi(); /* Turn on LDB0,IPU,IPU DI0 clocks */ Regards, Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v4 1/2] mx6: Factor out common HDMI setup code
Instead of duplicating HDMI setup code for every mx6 board, factor out the common code Signed-off-by: Pardeep Kumar Singla b45...@freescale.com --- Changes since v3: Added declaration of enable_ipu_clock(). Made enable_ipu_clock() function public. arch/arm/cpu/armv7/mx6/clock.c|8 + arch/arm/cpu/armv7/mx6/soc.c | 43 +++ arch/arm/include/asm/arch-mx6/clock.h |2 +- arch/arm/include/asm/arch-mx6/mxc_hdmi.h |5 +++ board/boundary/nitrogen6x/nitrogen6x.c| 44 --- board/freescale/mx6qsabrelite/mx6qsabrelite.c | 46 + board/wandboard/wandboard.c | 44 +++ include/configs/mx6qsabrelite.h |1 + include/configs/nitrogen6x.h |1 + include/configs/wandboard.h |1 + 10 files changed, 79 insertions(+), 116 deletions(-) diff --git a/arch/arm/cpu/armv7/mx6/clock.c b/arch/arm/cpu/armv7/mx6/clock.c index 3c0d908..a724e66 100644 --- a/arch/arm/cpu/armv7/mx6/clock.c +++ b/arch/arm/cpu/armv7/mx6/clock.c @@ -468,6 +468,14 @@ int do_mx6_showclocks(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) return 0; } +void enable_ipu_clock() +{ + struct mxc_ccm_reg *mxc_ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR; + int reg; + reg = readl(mxc_ccm-CCGR3); + reg |= MXC_CCM_CCGR3_IPU1_IPU_DI0_OFFSET; + writel(reg, mxc_ccm-CCGR3); +} /***/ U_BOOT_CMD( diff --git a/arch/arm/cpu/armv7/mx6/soc.c b/arch/arm/cpu/armv7/mx6/soc.c index fc436fb..a79369f 100644 --- a/arch/arm/cpu/armv7/mx6/soc.c +++ b/arch/arm/cpu/armv7/mx6/soc.c @@ -32,6 +32,8 @@ #include asm/imx-common/boot_mode.h #include asm/imx-common/dma.h #include stdbool.h +#include asm/arch/mxc_hdmi.h +#include asm/arch/crm_regs.h struct scu_regs { u32 ctrl; @@ -228,3 +230,44 @@ const struct boot_mode soc_boot_modes[] = { void s_init(void) { } + +#ifdef CONFIG_IMX_HDMI +void imx_enable_hdmi_phy(void) +{ + struct hdmi_regs *hdmi = (struct hdmi_regs *)HDMI_ARB_BASE_ADDR; + u8 reg; + reg = readb(hdmi-phy_conf0); + reg |= HDMI_PHY_CONF0_PDZ_MASK; + writeb(reg, hdmi-phy_conf0); + udelay(3000); + reg |= HDMI_PHY_CONF0_ENTMDS_MASK; + writeb(reg, hdmi-phy_conf0); + udelay(3000); + reg |= HDMI_PHY_CONF0_GEN2_TXPWRON_MASK; + writeb(reg, hdmi-phy_conf0); + writeb(HDMI_MC_PHYRSTZ_ASSERT, hdmi-mc_phyrstz); +} + +void imx_setup_hdmi(void) +{ + struct mxc_ccm_reg *mxc_ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR; + struct hdmi_regs *hdmi = (struct hdmi_regs *)HDMI_ARB_BASE_ADDR; + int reg; + + /* Turn on HDMI PHY clock */ + reg = readl(mxc_ccm-CCGR2); + reg |= MXC_CCM_CCGR2_HDMI_TX_IAHBCLK_MASK| +MXC_CCM_CCGR2_HDMI_TX_ISFRCLK_MASK; + writel(reg, mxc_ccm-CCGR2); + writeb(HDMI_MC_PHYRSTZ_DEASSERT, hdmi-mc_phyrstz); + reg = readl(mxc_ccm-chsccdr); + reg = ~(MXC_CCM_CHSCCDR_IPU1_DI0_PRE_CLK_SEL_MASK| +MXC_CCM_CHSCCDR_IPU1_DI0_PODF_MASK| +MXC_CCM_CHSCCDR_IPU1_DI0_CLK_SEL_MASK); + reg |= (CHSCCDR_PODF_DIVIDE_BY_3 + MXC_CCM_CHSCCDR_IPU1_DI0_PODF_OFFSET) +|(CHSCCDR_IPU_PRE_CLK_540M_PFD + MXC_CCM_CHSCCDR_IPU1_DI0_PRE_CLK_SEL_OFFSET); + writel(reg, mxc_ccm-chsccdr); +} +#endif diff --git a/arch/arm/include/asm/arch-mx6/clock.h b/arch/arm/include/asm/arch-mx6/clock.h index cfd4edc..d9f7fc5 100644 --- a/arch/arm/include/asm/arch-mx6/clock.h +++ b/arch/arm/include/asm/arch-mx6/clock.h @@ -65,5 +65,5 @@ void enable_ocotp_clk(unsigned char enable); void enable_usboh3_clk(unsigned char enable); int enable_sata_clock(void); int enable_i2c_clk(unsigned char enable, unsigned i2c_num); - +void enable_ipu_clock(); #endif /* __ASM_ARCH_CLOCK_H */ diff --git a/arch/arm/include/asm/arch-mx6/mxc_hdmi.h b/arch/arm/include/asm/arch-mx6/mxc_hdmi.h index 9dccb3f..5cd6aa6 100644 --- a/arch/arm/include/asm/arch-mx6/mxc_hdmi.h +++ b/arch/arm/include/asm/arch-mx6/mxc_hdmi.h @@ -21,6 +21,11 @@ #ifndef __MXC_HDMI_H__ #define __MXC_HDMI_H__ +#ifdef CONFIG_IMX_HDMI +void imx_enable_hdmi_phy(void); +void imx_setup_hdmi(void); +#endif + /* * Hdmi controller registers */ diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c index 8f0f9b8..1b82633 100644 --- a/board/boundary/nitrogen6x/nitrogen6x.c +++ b/board/boundary/nitrogen6x/nitrogen6x.c @@ -480,22 +480,9 @@ static int detect_hdmi(struct display_info_t const *dev) return readb(hdmi-phy_stat0) HDMI_PHY_HPD; } -static void enable_hdmi(struct display_info_t const *dev) +static void do_enable_hdmi(struct display_info_t const *dev) { - struct hdmi_regs *hdmi = (struct hdmi_regs *)HDMI_ARB_BASE_ADDR; - u8 reg; -
Re: [U-Boot] [PATCH 2/6] drivers/power/pmic: Add tps65217 driver
On 07/25/2013 09:37 AM, Tom Rini wrote: On Tue, Jul 23, 2013 at 01:34:15PM -0500, Dan Murphy wrote: On 07/19/2013 02:00 PM, Tom Rini wrote: From: Greg Guyotte gguyo...@ti.com Add a driver for the TPS65217 PMIC that is found in the Beaglebone family of boards. Can we add the public reference to the technical manual in the commit message? I found http://www.ti.com/lit/ug/slvu580b/slvu580b.pdfhttp://www.ti.com/lit/ds/symlink/tps65217b.pdf Signed-off-by: Greg Guyotte gguyo...@ti.com [trini: Split and rework Greg's changes into new drivers/power framework] Signed-off-by: Tom Rini tr...@ti.com --- drivers/power/pmic/Makefile|1 + drivers/power/pmic/pmic_tps65217.c | 108 include/power/tps65217.h | 92 ++ 3 files changed, 201 insertions(+) create mode 100644 drivers/power/pmic/pmic_tps65217.c create mode 100644 include/power/tps65217.h diff --git a/drivers/power/pmic/Makefile b/drivers/power/pmic/Makefile index 14d426f..473cb80 100644 --- a/drivers/power/pmic/Makefile +++ b/drivers/power/pmic/Makefile @@ -29,6 +29,7 @@ COBJS-$(CONFIG_POWER_MAX8998) += pmic_max8998.o COBJS-$(CONFIG_POWER_MAX8997) += pmic_max8997.o COBJS-$(CONFIG_POWER_MUIC_MAX8997) += muic_max8997.o COBJS-$(CONFIG_POWER_MAX77686) += pmic_max77686.o +COBJS-$(CONFIG_POWER_TPS65217) += pmic_tps65217.o COBJS := $(COBJS-y) SRCS := $(COBJS:.o=.c) diff --git a/drivers/power/pmic/pmic_tps65217.c b/drivers/power/pmic/pmic_tps65217.c new file mode 100644 index 000..c84bbcd --- /dev/null +++ b/drivers/power/pmic/pmic_tps65217.c @@ -0,0 +1,108 @@ +/* + * (C) Copyright 2011-2013 Curious if this is the first time in why does it have a 2011 copyright? Because the code was written in 2011 (and has been whacked around a few times every year. Got it thanks for the clarification [snip] +/** + * tps65217_reg_read() - Generic function that can read a TPS65217 register + * @src_reg: Source register address + * @src_val: Address of destination variable No return defined here in the brief Fixed. + */ +uchar tps65217_reg_read(uchar src_reg, uchar *src_val) +{ + if (i2c_read(TPS65217_CHIP_PM, src_reg, 1, src_val, 1)) + return 1; This may be nit picky but generally in error cases we return negative. Also why not return an error from errno? Because we're following i2c which is 0 or not 0, updated to use ret = i2c_read(...); if (ret) return ret here and throughout. Also why an uchar when you are returning an int? Fixed. [snip] +int tps65217_reg_write(uchar prot_level, uchar dest_reg, uchar dest_val, is prot_level a uchar or int? It's 0/1/2. I don't have a strong preference on if we type this out as an int or uchar. Also would it not be better to have an interface that will check for mask and do the read and just have a dedicated write function? I don't see the benefit, especially given the usage we have of just updating certain bitfields at a time. [snip] +int tps65217_voltage_update(uchar dc_cntrl_reg, uchar volt_sel) No header for the interface Fixed. +{ + if ((dc_cntrl_reg != DEFDCDC1) (dc_cntrl_reg != DEFDCDC2) + (dc_cntrl_reg != DEFDCDC3)) What do these magic numbers mean? Are these HEX numbers or a string? OK, it took me a minute to understand your question here. These are defines to register names, matching the TRM for the part. The register names are however annoyingly and easily confused as hex values. Maybe we can rename the #defines so they are not so confusing. Maybe something like #define TPS65217_register name register offset So these will become #define TPS65217_DEFDCDC1 0xe #define TPS65217_DEFDCDC2 0xf #define TPS65217_DEFDCDC3 0x10 This will at least keep other defines like CHIPID and SEQ unique as well. +#define PROT_LEVEL_NONE0x00 Are these registers or a mask now? +#define PROT_LEVEL_1 0x01 +#define PROT_LEVEL_2 0x02 These are values as to what level of protection the chip has the register under. +uchar tps65217_reg_read(uchar src_reg, uchar *src_val); +int tps65217_reg_write(uchar prot_level, uchar dest_reg, uchar dest_val, + uchar mask); +int tps65217_voltage_update(uchar dc_cntrl_reg, uchar volt_sel); Are these interfaces supposed to be accessed by an outside object? Typically there should be no direct register access from other objects. We can evaluate if there's consolidation to be done here once other boards go and adapt MPU clock frequency scaling. What registers need to be whacked on what board are going to decide if we can hide more details, or not. -- -- Dan Murphy ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v4 2/2] mx6qsabresd: Add splash screen support via HDMI
Signed-off-by: Pardeep Kumar Singla b45...@freescale.com --- Changes since v3: Added enable_ipu_clock() function for ipu clock setting board/freescale/mx6sabresd/mx6sabresd.c | 64 ++- include/configs/mx6sabre_common.h |3 +- include/configs/mx6sabresd.h| 19 + 3 files changed, 84 insertions(+), 2 deletions(-) diff --git a/board/freescale/mx6sabresd/mx6sabresd.c b/board/freescale/mx6sabresd/mx6sabresd.c index 222ee98..4694b5c 100644 --- a/board/freescale/mx6sabresd/mx6sabresd.c +++ b/board/freescale/mx6sabresd/mx6sabresd.c @@ -29,7 +29,12 @@ #include fsl_esdhc.h #include miiphy.h #include netdev.h - +#include asm/arch/mxc_hdmi.h +#include asm/arch/crm_regs.h +#include linux/fb.h +#include ipu_pixfmt.h +#include asm/io.h +#include asm/arch/sys_proto.h DECLARE_GLOBAL_DATA_PTR; #define UART_PAD_CTRL (PAD_CTL_PUS_100K_UP | \ @@ -239,6 +244,60 @@ int board_phy_config(struct phy_device *phydev) return 0; } +#if defined(CONFIG_VIDEO_IPUV3) +static struct fb_videomode const hdmi = { + .name = HDMI, + .refresh= 60, + .xres = 1024, + .yres = 768, + .pixclock = 15385, + .left_margin= 220, + .right_margin = 40, + .upper_margin = 21, + .lower_margin = 7, + .hsync_len = 60, + .vsync_len = 10, + .sync = FB_SYNC_EXT, + .vmode = FB_VMODE_NONINTERLACED +}; + +int board_video_skip(void) +{ + int ret; + + ret = ipuv3_fb_init(hdmi, 0, IPU_PIX_FMT_RGB24); + + if (ret) + printf(HDMI cannot be configured: %d\n, ret); + + imx_enable_hdmi_phy(); + return ret; +} + +static void setup_display(void) +{ + struct mxc_ccm_reg *mxc_ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR; + int reg; + + enable_ipu_clock(); + imx_setup_hdmi(); + + reg = readl(mxc_ccm-chsccdr); + reg |= (CHSCCDR_CLK_SEL_LDB_DI0 +MXC_CCM_CHSCCDR_IPU1_DI0_CLK_SEL_OFFSET); + writel(reg, mxc_ccm-chsccdr); +} +#endif /* CONFIG_VIDEO_IPUV3 */ + +/* + * Do not overwrite the console + * Use always serial for U-Boot console + */ +int overwrite_console(void) +{ + return 1; +} + int board_eth_init(bd_t *bis) { int ret; @@ -255,6 +314,9 @@ int board_eth_init(bd_t *bis) int board_early_init_f(void) { setup_iomux_uart(); +#if defined(CONFIG_VIDEO_IPUV3) + setup_display(); +#endif return 0; } diff --git a/include/configs/mx6sabre_common.h b/include/configs/mx6sabre_common.h index 53cc559..dd93fff 100644 --- a/include/configs/mx6sabre_common.h +++ b/include/configs/mx6sabre_common.h @@ -20,6 +20,7 @@ #define CONFIG_MX6 #include mx6_common.h +#include asm/sizes.h #define CONFIG_DISPLAY_CPUINFO #define CONFIG_DISPLAY_BOARDINFO @@ -32,7 +33,7 @@ #define CONFIG_REVISION_TAG /* Size of malloc() pool */ -#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 2 * 1024 * 1024) +#define CONFIG_SYS_MALLOC_LEN (10 * SZ_1M) #define CONFIG_BOARD_EARLY_INIT_F #define CONFIG_BOARD_LATE_INIT diff --git a/include/configs/mx6sabresd.h b/include/configs/mx6sabresd.h index 76675f4..5637c19 100644 --- a/include/configs/mx6sabresd.h +++ b/include/configs/mx6sabresd.h @@ -17,6 +17,9 @@ #ifndef __MX6QSABRESD_CONFIG_H #define __MX6QSABRESD_CONFIG_H +#include asm/arch/imx-regs.h +#include asm/imx-common/gpio.h + #define CONFIG_MACH_TYPE 3980 #define CONFIG_MXC_UART_BASE UART1_BASE #define CONFIG_CONSOLE_DEV ttymxc0 @@ -31,4 +34,20 @@ #define CONFIG_SYS_MMC_ENV_DEV 1 /* SDHC3 */ #endif +/* Framebuffer */ +#define CONFIG_VIDEO +#define CONFIG_VIDEO_IPUV3 +#define CONFIG_CFB_CONSOLE +#define CONFIG_VGA_AS_SINGLE_DEVICE +#define CONFIG_SYS_CONSOLE_IS_IN_ENV +#define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE +#define CONFIG_VIDEO_BMP_RLE8 +#define CONFIG_SPLASH_SCREEN +#define CONFIG_SPLASH_SCREEN_ALIGN +#define CONFIG_BMP_16BPP +#define CONFIG_VIDEO_LOGO +#define CONFIG_VIDEO_BMP_LOGO +#define CONFIG_IPUV3_CLK 26000 +#define CONFIG_IMX_HDMI + #endif /* __MX6QSABRESD_CONFIG_H */ -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 1/2] mx6: Factor out common HDMI setup code
On 07/25/2013 10:12 AM, Pardeep Kumar Singla wrote: Instead of duplicating HDMI setup code for every mx6 board, factor out the common code Signed-off-by: Pardeep Kumar Singla b45...@freescale.com --- Changes since v3: Added declaration of enable_ipu_clock(). Made enable_ipu_clock() function public. arch/arm/cpu/armv7/mx6/clock.c|8 + arch/arm/cpu/armv7/mx6/soc.c | 43 +++ arch/arm/include/asm/arch-mx6/clock.h |2 +- arch/arm/include/asm/arch-mx6/mxc_hdmi.h |5 +++ board/boundary/nitrogen6x/nitrogen6x.c| 44 --- board/freescale/mx6qsabrelite/mx6qsabrelite.c | 46 + board/wandboard/wandboard.c | 44 +++ include/configs/mx6qsabrelite.h |1 + include/configs/nitrogen6x.h |1 + include/configs/wandboard.h |1 + 10 files changed, 79 insertions(+), 116 deletions(-) diff --git a/arch/arm/cpu/armv7/mx6/clock.c b/arch/arm/cpu/armv7/mx6/clock.c index 3c0d908..a724e66 100644 --- a/arch/arm/cpu/armv7/mx6/clock.c +++ b/arch/arm/cpu/armv7/mx6/clock.c @@ -468,6 +468,14 @@ int do_mx6_showclocks(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) return 0; } +void enable_ipu_clock() +{ + struct mxc_ccm_reg *mxc_ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR; + int reg; + reg = readl(mxc_ccm-CCGR3); + reg |= MXC_CCM_CCGR3_IPU1_IPU_DI0_OFFSET; + writel(reg, mxc_ccm-CCGR3); +} /***/ U_BOOT_CMD( diff --git a/arch/arm/cpu/armv7/mx6/soc.c b/arch/arm/cpu/armv7/mx6/soc.c index fc436fb..a79369f 100644 --- a/arch/arm/cpu/armv7/mx6/soc.c +++ b/arch/arm/cpu/armv7/mx6/soc.c @@ -32,6 +32,8 @@ #include asm/imx-common/boot_mode.h #include asm/imx-common/dma.h #include stdbool.h +#include asm/arch/mxc_hdmi.h +#include asm/arch/crm_regs.h struct scu_regs { u32 ctrl; @@ -228,3 +230,44 @@ const struct boot_mode soc_boot_modes[] = { void s_init(void) { } + +#ifdef CONFIG_IMX_HDMI +void imx_enable_hdmi_phy(void) +{ + struct hdmi_regs *hdmi = (struct hdmi_regs *)HDMI_ARB_BASE_ADDR; + u8 reg; + reg = readb(hdmi-phy_conf0); + reg |= HDMI_PHY_CONF0_PDZ_MASK; + writeb(reg, hdmi-phy_conf0); + udelay(3000); + reg |= HDMI_PHY_CONF0_ENTMDS_MASK; + writeb(reg, hdmi-phy_conf0); + udelay(3000); + reg |= HDMI_PHY_CONF0_GEN2_TXPWRON_MASK; + writeb(reg, hdmi-phy_conf0); + writeb(HDMI_MC_PHYRSTZ_ASSERT, hdmi-mc_phyrstz); +} + +void imx_setup_hdmi(void) +{ + struct mxc_ccm_reg *mxc_ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR; + struct hdmi_regs *hdmi = (struct hdmi_regs *)HDMI_ARB_BASE_ADDR; + int reg; + + /* Turn on HDMI PHY clock */ + reg = readl(mxc_ccm-CCGR2); + reg |= MXC_CCM_CCGR2_HDMI_TX_IAHBCLK_MASK| +MXC_CCM_CCGR2_HDMI_TX_ISFRCLK_MASK; + writel(reg, mxc_ccm-CCGR2); + writeb(HDMI_MC_PHYRSTZ_DEASSERT, hdmi-mc_phyrstz); + reg = readl(mxc_ccm-chsccdr); + reg = ~(MXC_CCM_CHSCCDR_IPU1_DI0_PRE_CLK_SEL_MASK| +MXC_CCM_CHSCCDR_IPU1_DI0_PODF_MASK| +MXC_CCM_CHSCCDR_IPU1_DI0_CLK_SEL_MASK); + reg |= (CHSCCDR_PODF_DIVIDE_BY_3 + MXC_CCM_CHSCCDR_IPU1_DI0_PODF_OFFSET) +|(CHSCCDR_IPU_PRE_CLK_540M_PFD + MXC_CCM_CHSCCDR_IPU1_DI0_PRE_CLK_SEL_OFFSET); + writel(reg, mxc_ccm-chsccdr); +} +#endif diff --git a/arch/arm/include/asm/arch-mx6/clock.h b/arch/arm/include/asm/arch-mx6/clock.h index cfd4edc..d9f7fc5 100644 --- a/arch/arm/include/asm/arch-mx6/clock.h +++ b/arch/arm/include/asm/arch-mx6/clock.h @@ -65,5 +65,5 @@ void enable_ocotp_clk(unsigned char enable); void enable_usboh3_clk(unsigned char enable); int enable_sata_clock(void); int enable_i2c_clk(unsigned char enable, unsigned i2c_num); - +void enable_ipu_clock(); #endif /* __ASM_ARCH_CLOCK_H */ diff --git a/arch/arm/include/asm/arch-mx6/mxc_hdmi.h b/arch/arm/include/asm/arch-mx6/mxc_hdmi.h index 9dccb3f..5cd6aa6 100644 --- a/arch/arm/include/asm/arch-mx6/mxc_hdmi.h +++ b/arch/arm/include/asm/arch-mx6/mxc_hdmi.h @@ -21,6 +21,11 @@ #ifndef __MXC_HDMI_H__ #define __MXC_HDMI_H__ +#ifdef CONFIG_IMX_HDMI +void imx_enable_hdmi_phy(void); +void imx_setup_hdmi(void); +#endif + /* * Hdmi controller registers */ diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c index 8f0f9b8..1b82633 100644 --- a/board/boundary/nitrogen6x/nitrogen6x.c +++ b/board/boundary/nitrogen6x/nitrogen6x.c @@ -480,22 +480,9 @@ static int detect_hdmi(struct display_info_t const *dev) return readb(hdmi-phy_stat0) HDMI_PHY_HPD; } -static void enable_hdmi(struct display_info_t const *dev) +static void do_enable_hdmi(struct display_info_t const *dev) { - struct
Re: [U-Boot] [Ac100] [PATCH 3/3] ARM: tegra: paz00: enable nveckeyboardsupport
On 07/24/2013 10:52 AM, Marc Dietrich wrote: On Tuesday 23 July 2013 08:40:42 Stephen Warren wrote: On 07/22/2013 01:09 AM, Marc Dietrich wrote: [ snip the stuff we agreed upon ] The nvec still needs to tell the slave driver which protocol to use, but that can be hard coded. I'm not sure what that means. At the controller/HW level, aren't I2C and SMBUS the same; it's just the data within the transactions that may be more defined by one or the other? at this level yes, but we need to handle the underlying protocol in the ISR, which means that depending on the protocol (smbus or I2C), we need a different interrupt service routine. Currently we are doing most of the smbus protocol in the ISR because of timing reasons and I'm not sure if we can change this. We are already suffering from nvec timeouts and I fear that splitting the protocol out of the ISR would make things even worse. I assume that the I2C slave driver's ISR would simply directly/immediately call a function in the protocol driver. That should allow sufficient separation of the layers while still maintaining minimal latency, assuming a good design of the callback's function prototype and/or the list of I2C slave controller functions that the callback is allowed to call into. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 3/6] drivers/power/pmic: Add tps65910 driver
On 07/19/2013 02:00 PM, Tom Rini wrote: From: Philip, Avinash avinashphi...@ti.com Add a driver for the TPS65910 PMIC that is found in the AM335x GP EVM, AM335x EVM SK and others. Can we add a link to the technical manual? http://www.ti.com/product/tps65910 Signed-off-by: Philip, Avinash avinashphi...@ti.com [trini: Split and rework Avinash's changes into new drivers/power framework] Signed-off-by: Tom Rini tr...@ti.com --- drivers/power/pmic/Makefile|1 + drivers/power/pmic/pmic_tps65910.c | 69 +++ include/power/tps65910.h | 79 3 files changed, 149 insertions(+) create mode 100644 drivers/power/pmic/pmic_tps65910.c create mode 100644 include/power/tps65910.h diff --git a/drivers/power/pmic/Makefile b/drivers/power/pmic/Makefile index 473cb80..1811080 100644 --- a/drivers/power/pmic/Makefile +++ b/drivers/power/pmic/Makefile @@ -30,6 +30,7 @@ COBJS-$(CONFIG_POWER_MAX8997) += pmic_max8997.o COBJS-$(CONFIG_POWER_MUIC_MAX8997) += muic_max8997.o COBJS-$(CONFIG_POWER_MAX77686) += pmic_max77686.o COBJS-$(CONFIG_POWER_TPS65217) += pmic_tps65217.o +COBJS-$(CONFIG_POWER_TPS65910) += pmic_tps65910.o COBJS:= $(COBJS-y) SRCS := $(COBJS:.o=.c) diff --git a/drivers/power/pmic/pmic_tps65910.c b/drivers/power/pmic/pmic_tps65910.c new file mode 100644 index 000..0303f71 --- /dev/null +++ b/drivers/power/pmic/pmic_tps65910.c @@ -0,0 +1,69 @@ +/* + * (C) Copyright 2011-2013 + * Texas Instruments, www.ti.com + * + * See file CREDITS for list of people who contributed to this + * project. + * + * 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 common.h +#include i2c.h +#include power/tps65910.h + +/* + * voltage switching for MPU frequency switching. + * @module = mpu - 0, core - 1 + * @vddx_op_vol_sel = vdd voltage to set No return identified here + */ +int tps65910_voltage_update(unsigned int module, unsigned char vddx_op_vol_sel) +{ + uchar buf[4]; If we only read and write one byte at a time why is this an array of 4? + unsigned int reg_offset; + + if (module == MPU) + reg_offset = TPS65910_VDD1_OP_REG; + else + reg_offset = TPS65910_VDD2_OP_REG; This seems very specific to the implementation. Can VDD2 ever be used for the MPU? Or are there constraints on the VDD2 SMPS that will not allow that? + + /* Select VDDx OP */ + if (i2c_read(TPS65910_CTRL_I2C_ADDR, reg_offset, 1, buf, 1)) + return 1; I am going to assume that you changed this as well like you did for the TPS65217? + + buf[0] = ~TPS65910_OP_REG_CMD_MASK; + + if (i2c_write(TPS65910_CTRL_I2C_ADDR, reg_offset, 1, buf, 1)) + return 1; + + /* Configure VDDx OP Voltage */ + if (i2c_read(TPS65910_CTRL_I2C_ADDR, reg_offset, 1, buf, 1)) + return 1; + + buf[0] = ~TPS65910_OP_REG_SEL_MASK; + buf[0] |= vddx_op_vol_sel; + + if (i2c_write(TPS65910_CTRL_I2C_ADDR, reg_offset, 1, buf, 1)) + return 1; + + if (i2c_read(TPS65910_CTRL_I2C_ADDR, reg_offset, 1, buf, 1)) + return 1; + + if ((buf[0] TPS65910_OP_REG_SEL_MASK) != vddx_op_vol_sel) + return 1; + + return 0; +} diff --git a/include/power/tps65910.h b/include/power/tps65910.h new file mode 100644 index 000..5942721 --- /dev/null +++ b/include/power/tps65910.h @@ -0,0 +1,79 @@ +/* + * (C) Copyright 2011-2013 + * Texas Instruments, 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 version 2. + * + * This program is distributed as is WITHOUT ANY WARRANTY of any + * kind, whether express or implied; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ +#ifndef __POWER_TPS65910_H__ +#define __POWER_TPS65910_H__ + +#define MPU 0 +#define CORE1 + +int tps65910_voltage_update(unsigned int module, unsigned char vddx_op_vol_sel); Nitpick - Don't the interface definitions go at the
Re: [U-Boot] [PATCH 2/6] drivers/power/pmic: Add tps65217 driver
On Thu, Jul 25, 2013 at 12:21:41PM -0500, Dan Murphy wrote: On 07/25/2013 09:37 AM, Tom Rini wrote: On Tue, Jul 23, 2013 at 01:34:15PM -0500, Dan Murphy wrote: On 07/19/2013 02:00 PM, Tom Rini wrote: From: Greg Guyotte gguyo...@ti.com Add a driver for the TPS65217 PMIC that is found in the Beaglebone family of boards. Can we add the public reference to the technical manual in the commit message? I found http://www.ti.com/lit/ug/slvu580b/slvu580b.pdfhttp://www.ti.com/lit/ds/symlink/tps65217b.pdf I've got the stable link in the header file, now (also for tps65910). [snip] +{ + if ((dc_cntrl_reg != DEFDCDC1) (dc_cntrl_reg != DEFDCDC2) + (dc_cntrl_reg != DEFDCDC3)) What do these magic numbers mean? Are these HEX numbers or a string? OK, it took me a minute to understand your question here. These are defines to register names, matching the TRM for the part. The register names are however annoyingly and easily confused as hex values. Maybe we can rename the #defines so they are not so confusing. Maybe something like #define TPS65217_register name register offset So these will become #define TPS65217_DEFDCDC1 0xe #define TPS65217_DEFDCDC2 0xf #define TPS65217_DEFDCDC3 0x10 This will at least keep other defines like CHIPID and SEQ unique as well. I can do that, yeah. -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RFC] Remove static display data
Hello all, We're trying to figure out how best to get rid of static code like this: http://git.denx.de/?p=u-boot.git;a=blob;f=board/boundary/nitrogen6x/nitrogen6x.c;h=8f0f9b8de2e8e77fcbf477728ea063a213941dd0;hb=HEAD#l526 and turn it into run time data. Our idea is to use an environment variable so adding support for new screens and iterating on minor settings is quick and easy and then we can remove the static arrays like the one above and in wandboard.c and other places. One way to do this is to create a data structure that can subsume the functionalities of of display_info_t and the various structures in lcd.h and elsewhere that can be used throughout U-Boot both with CONFIG_LCD and CONFIG_CFB_CONSOLE. Combined with the EDID functionality already in U-Boot this would allow code to easily select the best display supported by the monitor or closest to what the user wanted (given in the environment variable). This data structure would then be passed to Linux on boot up. I realize that there's already the FDT and CONFIG_OF_CONTROL functionality and device trees sort of cover the passing to Linux part so maybe before handing it off, converting the relevant data into a device tree that Linux can already use/parse would work. Is anyone working on something like this? Am I missing something that's already in place to accomplish this? Thanks, Robert Winkler ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Extract data file from U-Boot image
Hi list, I guess I'm not the first one who ever needed to retrieve data files from multifile images, those create by mkimage tool. However, I could just find scripts to do that (specially an old thread answered by Wolfgang about dd). I made a patch to allow mkimage to extract files from images, which just works for multi-file image. But, the fact that nobody has ever done this means that this feature is not desired in the tool? IMHO, it is very convenient to have a C code to do that, specially for embedded systems where scripting is noticeably slower than binary code. Besides it requires 'dd' to extract and another tool to parse file's offsets inside the image. Comments? -- Guilherme Maciel Ferreira Mobile Brazil: +55 48 9904 3728 e +55 48 9134 4651 Site: http://guilhermemacielferreira.com/ Skype: guilherme.maciel.ferreira ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Extract data file from U-Boot image
Hi Guilherme, On Thu, 25 Jul 2013 12:31:46 -0300, Guilherme Maciel Ferreira guilherme.maciel.ferre...@gmail.com wrote: Hi list, I guess I'm not the first one who ever needed to retrieve data files from multifile images, those create by mkimage tool. However, I could just find scripts to do that (specially an old thread answered by Wolfgang about dd). I made a patch to allow mkimage to extract files from images, which just works for multi-file image. But, the fact that nobody has ever done this means that this feature is not desired in the tool? IMHO, it is very convenient to have a C code to do that, specially for embedded systems where scripting is noticeably slower than binary code. Besides it requires 'dd' to extract and another tool to parse file's offsets inside the image. Comments? My comment would be that, while U-Boot images /run/ on embedded systems, people do not necessarily /work on/ these images /from within/ said systems; indeed, work on such images, and more generally, development around U-Boot, is performed on development systems, not on target systems. Besides, in many cases, the image was actually built from files available -- even from files themselves built just before putting them together within the image. Apart from very specific cases (tweaking the initrd in an existing image comes to mind), I don't see the point in taking images apart when you can simply build them the way you want. Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Extract data file from U-Boot image
Dear Guilherme Maciel Ferreira, In message CAF=5bWftE3UwPrOH+q+JPm-ag0igmAr_G4s=kLzhSObNhN=y...@mail.gmail.com you wrote: I made a patch to allow mkimage to extract files from images, which just works for multi-file image. But, the fact that nobody has ever done this means that this feature is not desired in the tool? Speaking just for myself: I needed such features only in very rare occasions, where it was way faster to use a one-liner on the command line than to write any actual code. YMMV... But I fear that mkimage explodes from creaping featurism, so if you go and implement something like this, please do not add it to kmimage, but rather create a separate, new tool, say dumpimage or so. IMHO, it is very convenient to have a C code to do that, specially for embedded systems where scripting is noticeably slower than binary code. Besides it requires 'dd' to extract and another tool to parse file's offsets inside the image. Well, when I was doing such things, I never did this on the embedded targets, nor did I ever have to care about performance because I always needed it just once or twice. Could you please be so kind and feed my curiousity a bit: what exactly are you doing that you need such a feature on the target? I can't think of useful applications at the moment... Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de : ... and it's got weird formatting - Notepad, Write, Works 3 can't : decipher it, and it's too big to go in DOS Edit. Help! Install an operating system. :-) -- Tom Christiansen ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [IMPORTANT NOTE] License handling
Hello all, this is to raise your attention to some small but important change in the way we're dealing with software licenses in U-Boot. Don't be afraid - the licensing itself does not change at all, we just change the way how we express the license terms in the source code. Please see commit eca3aeb 2013-07-24 09:44:16 -0400 Licenses: introduce SPDX Unique Lincense Identifiers What does that mean: - New files being added to U-Boot should no longer include a multi-line license header; instead, they shall contain a single line Unique Lincense Identifier, i. e. a line like this: SPDX-License-Identifier:GPL-2.0+ For details, please see http://www.denx.de/wiki/U-Boot/Licensing - Any help in cleaning up the remaining files (replacing existing license headers by Unique Lincense Identifiers) is welcome - but note that this is a task that needs to be done carefully - fully automatic editing is not really an option, as for example some files were found that included not one, but two (and incompatible!) license headers, so it really needs careful consideration how to resolve such issues. To all custodians: please have a special look at any new code being added, and help guiding users to this new policy of using Unique Lincense Identifiers. Thanks for all your help! Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de Let the programmers be many and the managers few -- then all will be productive. -- Geoffrey James, The Tao of Programming ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Extract data file from U-Boot image
Dear Heer Lorcan, In message CAHCtDORkcGdgTnTPyJfrxwdpmA=mrFDAJ5rHEzz94gy=wuq...@mail.gmail.com you wrote: want to extract files from my u-boot.bin. could you send me the script to do this? u-boot.bin is a raw binary which does not contain any sort of files. You cannot extract what's not there in the first place. And you cannot find tools to perform tasks that are impossible. why, when building a compiler, interpreter, debugger, do the builders always forget to include a file/script to decompile a given file made by tools from the same group... it's just plain stupid... Well, that's a prtty strong statement given that 1) you ignore the netiquette (you top-post / full-quote) and dropped the ML from Cc:, and 2) you appear to have only very limited understanding of what u-boot.bin actually is. There is sufficient tools for all kinds of file manipulation available, but only for possible manipulations. It's like mixing chemicals - for example, once you mixed UDMH and nitrogen tetroxide, it will be very difficult to find tools to separate (i. e. decompile) these again (for several reasons :-) Some operations are simply irreversible. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de The first rule of magic is simple. Don't waste your time waving your hands and hoping when a rock or a club will do. - McCloctnik the Lucid ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [U-Boot, v3, 6/7] USB: usb-hub: Add a weak function for resetting devices
Hi Dan, guys, Just would like to give my 5 cents: my humble experience with OMAP4 and OMAP5 tells me that this (that is, the need to reset devices after applying port power) seems to be a OMAP5 HSIC IP issue, and not a device problem. We at MMS have two custom designs, one with OMAP5430 and one with OMAP4460, both of which employ HSIC chips (LAN9730 and USB4640 on the OMAP5 board, and USB4640 on the OMAP4), along with a ULPI PHY (TUSB1210) on both boards. I had the pleasure of bringing up both boards with U-Boot a few months back, including USB EHCI, and can state the following: Device reset after port power is applied is needed for the OMAP5 HSIC devices only. The ULPI PHY on both boards doesn't even have a hardware reset connected, nevertheless the device attached to it gets enumerated (even without performing PHY software reset via the ULPI viewport). I performed the HSIC device reset by calling a board function from within the ehci_hcd.c driver, which is compiled only for the OMAP5, and only if we have HSIC devices. An obsolete patch for this, working on my board, can still be found at http://patchwork.ozlabs.org/patch/232742/, as well as a RFC for the 5432uevm (untested) at http://patchwork.ozlabs.org/patch/244124/ On the OMAP4 board this reset is not needed, the HSIC device gets enumerated straightforward. I don't know about other arches, but I'm not sure that having an unconditional common call, although weak, in usb_hub.c is the best solution. Best regards, Lubo ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Extract data file from U-Boot image
Dear Wolfgang, 2013/7/25 Wolfgang Denk w...@denx.de: Dear Guilherme Maciel Ferreira, In message CAF=5bWftE3UwPrOH+q+JPm-ag0igmAr_G4s=kLzhSObNhN=y...@mail.gmail.com you wrote: I made a patch to allow mkimage to extract files from images, which just works for multi-file image. But, the fact that nobody has ever done this means that this feature is not desired in the tool? Speaking just for myself: I needed such features only in very rare occasions, where it was way faster to use a one-liner on the command line than to write any actual code. YMMV... But I fear that mkimage explodes from creaping featurism, so if you go and implement something like this, please do not add it to kmimage, but rather create a separate, new tool, say dumpimage or so. How does 'unimage' sound to you? =) Following the example of unsquashfs and unubi? I mean, if people really consider this tool of some use. IMHO, it is very convenient to have a C code to do that, specially for embedded systems where scripting is noticeably slower than binary code. Besides it requires 'dd' to extract and another tool to parse file's offsets inside the image. Well, when I was doing such things, I never did this on the embedded targets, nor did I ever have to care about performance because I always needed it just once or twice. Could you please be so kind and feed my curiousity a bit: what exactly are you doing that you need such a feature on the target? I can't think of useful applications at the moment... Well, I'm not allowed to say much, but broadly speaking it's intended for a less intrusive firmware upgrade. Today, in order to upgrade the firmware, the device receives a Multifile image composed by a new kernel and a new root file system and overwrite both of them. Which requires the device to hang for a moment. However, now we want a selective upgrade, where we can pick a few directories from within the new root file system without the need to write the whole new file system and kernel. Best regards, -- Guilherme Maciel Ferreira Mobile Brazil: +55 48 9904 3728 e +55 48 9134 4651 Site: http://guilhermemacielferreira.com/ Skype: guilherme.maciel.ferreira ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] wandboard: add pxe support, set default boot command like highbank
From: Dennis Gilmore den...@ausil.us Signed-off-by: Dennis Gilmore den...@ausil.us --- include/configs/wandboard.h | 42 +++--- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/include/configs/wandboard.h b/include/configs/wandboard.h index ee6bf21..a5052c5 100644 --- a/include/configs/wandboard.h +++ b/include/configs/wandboard.h @@ -58,6 +58,8 @@ #define CONFIG_LOADADDR0x1200 #define CONFIG_SYS_TEXT_BASE 0x1780 +#define CONFIG_SUPPORT_RAW_INITRD + /* MMC Configuration */ #define CONFIG_FSL_ESDHC #define CONFIG_FSL_USDHC @@ -72,6 +74,14 @@ #define CONFIG_CMD_FAT #define CONFIG_DOS_PARTITION +/* PXE support */ +#define CONFIG_BOOTP_PXE +#define CONFIG_BOOTP_PXE_CLIENTARCH 0x100 +#define CONFIG_BOOTP_VCI_STRING U-boot.armv7.wandboard +#define CONFIG_CMD_PXE +#define CONFIG_MENU + + /* Ethernet Configuration */ #define CONFIG_CMD_PING #define CONFIG_CMD_DHCP @@ -117,7 +127,32 @@ initrd_high=0x\0 \ fdt_file= CONFIG_DEFAULT_FDT_FILE \0 \ fdt_addr=0x1100\0 \ + pxefile_addr_r=0x1200\0 \ + kernel_addr_r=0x1300\0 \ + ramdisk_addr_r=0x3200\0 \ + fdt_addr_r=0x1100\0 \ boot_fdt=try\0 \ + bootcmd_setup=mmc rescan\0 \ + bootcmd_pxe=setenv bootfile \\ ;dhcp; pxe get; pxe boot\0 \ + bootcmd_disk_scr=ext2load ${boot_ifc} ${bootdevice} ${scr_addr_r} boot.scr source ${scr_addr_r}\0 \ + bootcmd_disk_sysboot1=setenv bootfile /boot/extlinux/extlinux.conf; sysboot ${boot_ifc} ${bootdevice} ext2\0 \ + bootcmd_disk_sysboot2=setenv bootfile /extlinux/extlinux.conf; sysboot ${boot_ifc} ${bootdevice} ext2\0 \ + bootcmd_disk_uenv=ext2load ${boot_ifc} ${bootdevice} ${uenv_addr_r} uEnv.txt; env import -t ${uenv_addr_r} ${filesize}; run bootcmd_uenv\0 \ + bootcmd_disk_kernel=ext2load ${boot_ifc} ${bootdevice} ${kernel_addr_r} vmlinuz ext2load ${boot_ifc} ${bootdevice} ${ramdisk_addr_r} initrd.img bootz ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr}\0 \ + bootcmd_disk=run bootcmd_disk_sysboot1; run bootcmd_disk_sysboot2; run bootcmd_disk_uenv; run bootcmd_disk_scr; run bootcmd_disk_kernel\0 \ + bootcmd_sata=setenv boot_ifc scsi; scsi scan run bootcmd_disk\0 \ + bootcmd_mmc=setenv boot_ifc mmc; mmc rescan run bootcmd_disk\0 \ + bootcmd_default=run bootcmd_mmc; run bootcmd_sata; run bootcmd_pxe\0 \ + bootcmd0=run bootcmd_setup; run bootcmd_default\0 \ + bootcmd1=run bootcmd_setup; run bootcmd_pxe; run bootcmd_default\0 \ + bootcmd2=run bootcmd_setup; run bootcmd_sata; run bootcmd_default\0 \ + bootcmd15=run bootcmd_setup; run bootcmd_mmc; run bootcmd_default\0 \ + localcmd=run bootcmd_sata\0 \ + bootdevice=0\0 \ + bootargs=console=ttymxc0 root=LABEL=rootfs\0 \ + bootdelay=2\0 \ + bootretry=90\0 \ + netretry=once\0 \ ip_dyn=yes\0 \ mmcdev= __stringify(CONFIG_SYS_MMC_ENV_DEV) \0 \ mmcpart=1\0 \ @@ -139,11 +174,11 @@ mmcargs=setenv bootargs console=${console},${baudrate} \ root=${mmcroot}\0 \ loadbootscript= \ - fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0 \ + load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0 \ bootscript=echo Running bootscript from mmc ...; \ source\0 \ - loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0 \ - loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0 \ + loaduimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0 \ + loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0 \ mmcboot=echo Booting from mmc ...; \ run mmcargs; \ if test ${boot_fdt} = yes || test ${boot_fdt} = try; then \ @@ -186,6 +221,7 @@ #define CONFIG_BOOTCOMMAND \ mmc dev ${mmcdev}; if mmc rescan; then \ + run bootcmd_default; \ if run loadbootscript; then \ run bootscript; \ else \ -- 1.8.3.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2] arm:samsung:serial Extract common UART code
This commit brings removal of duplicated code for UART IP block embedded at Samsung SoCs. New include/asm/samsung-common directory has been created to store common code for existing and future Samsung targets. Moreover building of UART code now depends on more verbose CONFIG_S5P_SERIAL. Thereof all relevant boards configs have been adjusted. Signed-off-by: Lukasz Majewski l.majew...@majess.pl --- Changes for v2: - Remove S3C64XX define from the code --- arch/arm/include/asm/arch-exynos/uart.h| 58 - arch/arm/include/asm/arch-s5pc1xx/uart.h | 58 - arch/arm/include/asm/samsung-common/uart.h | 78 drivers/serial/Makefile|2 +- drivers/serial/serial_s5p.c| 13 + include/configs/exynos5250-dt.h|1 + include/configs/origen.h |1 + include/configs/s5p_goni.h |1 + include/configs/s5pc210_universal.h|1 + include/configs/smdkc100.h |1 + include/configs/smdkv310.h |1 + include/configs/trats.h|1 + 12 files changed, 88 insertions(+), 128 deletions(-) delete mode 100644 arch/arm/include/asm/arch-exynos/uart.h delete mode 100644 arch/arm/include/asm/arch-s5pc1xx/uart.h create mode 100644 arch/arm/include/asm/samsung-common/uart.h diff --git a/arch/arm/include/asm/arch-exynos/uart.h b/arch/arm/include/asm/arch-exynos/uart.h deleted file mode 100644 index 6cc68df..000 --- a/arch/arm/include/asm/arch-exynos/uart.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * (C) Copyright 2009 Samsung Electronics - * Minkyu Kang mk7.k...@samsung.com - * Heungjun Kim riverful@samsung.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 - * - */ - -#ifndef __ASM_ARCH_UART_H_ -#define __ASM_ARCH_UART_H_ - -#ifndef __ASSEMBLY__ -/* baudrate rest value */ -union br_rest { - unsigned short slot; /* udivslot */ - unsigned char value; /* ufracval */ -}; - -struct s5p_uart { - unsigned intulcon; - unsigned intucon; - unsigned intufcon; - unsigned intumcon; - unsigned intutrstat; - unsigned intuerstat; - unsigned intufstat; - unsigned intumstat; - unsigned char utxh; - unsigned char res1[3]; - unsigned char urxh; - unsigned char res2[3]; - unsigned intubrdiv; - union br_rest rest; - unsigned char res3[0xffd0]; -}; - -static inline int s5p_uart_divslot(void) -{ - return 0; -} - -#endif /* __ASSEMBLY__ */ - -#endif diff --git a/arch/arm/include/asm/arch-s5pc1xx/uart.h b/arch/arm/include/asm/arch-s5pc1xx/uart.h deleted file mode 100644 index 1c56739..000 --- a/arch/arm/include/asm/arch-s5pc1xx/uart.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * (C) Copyright 2009 Samsung Electronics - * Minkyu Kang mk7.k...@samsung.com - * Heungjun Kim riverful@samsung.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 - * - */ - -#ifndef __ASM_ARCH_UART_H_ -#define __ASM_ARCH_UART_H_ - -#ifndef __ASSEMBLY__ -/* baudrate rest value */ -union br_rest { - unsigned short slot; /* udivslot */ - unsigned char value; /* ufracval */ -}; - -struct s5p_uart { - unsigned intulcon; - unsigned intucon; - unsigned intufcon; - unsigned intumcon; - unsigned intutrstat; - unsigned intuerstat; - unsigned intufstat; - unsigned intumstat; - unsigned char utxh; - unsigned
[U-Boot] [PATCH v2] arm:samsung: Move common code from ./s5p-common to ./samsung-common/
Common Samsung code has been moved one level up - to ./samsung-common directory. This would allow other - non S5P based targets to reuse this code base Moreover duplicated header files were removed. Signed-off-by: Lukasz Majewski l.majew...@majess.pl --- Changes for v2: - Only compile in libsamsung-common for non arm9 boards - Exclude common sromc controller code - Adjust smdkc100 to work with common sromc.h header - Adjust boards #includes for asm/samsung-common/sromc.h --- Makefile|7 +- arch/arm/cpu/armv7/exynos/pinmux.c |2 +- arch/arm/cpu/armv7/s5p-common/Makefile | 50 --- arch/arm/cpu/armv7/s5p-common/cpu_info.c| 57 arch/arm/cpu/armv7/s5p-common/pwm.c | 187 -- arch/arm/cpu/armv7/s5p-common/sromc.c | 49 --- arch/arm/cpu/armv7/s5p-common/timer.c | 148 - arch/arm/cpu/samsung-common/Makefile| 46 +++ arch/arm/cpu/samsung-common/cpu_info.c | 56 arch/arm/cpu/samsung-common/pwm.c | 188 +++ arch/arm/cpu/samsung-common/sromc.c | 49 +++ arch/arm/cpu/samsung-common/timer.c | 147 + arch/arm/include/asm/arch-exynos/pwm.h | 68 -- arch/arm/include/asm/arch-exynos/sromc.h| 69 -- arch/arm/include/asm/arch-s5pc1xx/pwm.h | 68 -- arch/arm/include/asm/arch-s5pc1xx/sromc.h | 53 arch/arm/include/asm/samsung-common/pwm.h | 68 ++ arch/arm/include/asm/samsung-common/sromc.h | 74 +++ board/samsung/smdk5250/exynos5-dt.c |2 +- board/samsung/smdkc100/smdkc100.c | 11 +- board/samsung/smdkv310/smdkv310.c |2 +- spl/Makefile|2 +- 22 files changed, 641 insertions(+), 762 deletions(-) delete mode 100644 arch/arm/cpu/armv7/s5p-common/Makefile delete mode 100644 arch/arm/cpu/armv7/s5p-common/cpu_info.c delete mode 100644 arch/arm/cpu/armv7/s5p-common/pwm.c delete mode 100644 arch/arm/cpu/armv7/s5p-common/sromc.c delete mode 100644 arch/arm/cpu/armv7/s5p-common/timer.c create mode 100644 arch/arm/cpu/samsung-common/Makefile create mode 100644 arch/arm/cpu/samsung-common/cpu_info.c create mode 100644 arch/arm/cpu/samsung-common/pwm.c create mode 100644 arch/arm/cpu/samsung-common/sromc.c create mode 100644 arch/arm/cpu/samsung-common/timer.c delete mode 100644 arch/arm/include/asm/arch-exynos/pwm.h delete mode 100644 arch/arm/include/asm/arch-exynos/sromc.h delete mode 100644 arch/arm/include/asm/arch-s5pc1xx/pwm.h delete mode 100644 arch/arm/include/asm/arch-s5pc1xx/sromc.h create mode 100644 arch/arm/include/asm/samsung-common/pwm.h create mode 100644 arch/arm/include/asm/samsung-common/sromc.h diff --git a/Makefile b/Makefile index 4218226..ddc51dc 100644 --- a/Makefile +++ b/Makefile @@ -346,11 +346,10 @@ ifneq (,$(filter $(SOC), mx25 mx27 mx5 mx6 mx31 mx35 mxs vf610)) LIBS-y += arch/$(ARCH)/imx-common/libimx-common.o endif -ifeq ($(SOC),s5pc1xx) -LIBS-y += $(CPUDIR)/s5p-common/libs5p-common.o +ifeq ($(VENDOR),samsung) +ifneq ($(SOC), s3c24x0) +LIBS-y += arch/$(ARCH)/cpu/samsung-common/libsamsung-common.o endif -ifeq ($(SOC),exynos) -LIBS-y += $(CPUDIR)/s5p-common/libs5p-common.o endif ifneq ($(CONFIG_TEGRA),) LIBS-y += arch/$(ARCH)/cpu/$(SOC)-common/lib$(SOC)-common.o diff --git a/arch/arm/cpu/armv7/exynos/pinmux.c b/arch/arm/cpu/armv7/exynos/pinmux.c index 2042062..d5e047b 100644 --- a/arch/arm/cpu/armv7/exynos/pinmux.c +++ b/arch/arm/cpu/armv7/exynos/pinmux.c @@ -25,7 +25,7 @@ #include fdtdec.h #include asm/arch/gpio.h #include asm/arch/pinmux.h -#include asm/arch/sromc.h +#include asm/samsung-common/sromc.h static void exynos5_uart_config(int peripheral) { diff --git a/arch/arm/cpu/armv7/s5p-common/Makefile b/arch/arm/cpu/armv7/s5p-common/Makefile deleted file mode 100644 index 0c38bd0..000 --- a/arch/arm/cpu/armv7/s5p-common/Makefile +++ /dev/null @@ -1,50 +0,0 @@ -# -# Copyright (C) 2009 Samsung Electronics -# Minkyu Kang mk7.k...@samsung.com -# -# See file CREDITS for list of people who contributed to this -# project. -# -# 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 $(TOPDIR)/config.mk - -LIB
[U-Boot] [PATCH] arm:samsung:cpu_info: Rename s5p_* to samsung_*
Common CPU info code has been refactored to use more generic name - namely samsung_* instead of s5p_*. This change will prevent code duplication for non armv7a based SoCs (e.g. s3c64xx). Signed-off-by: Lukasz Majewski l.majew...@majess.pl --- This patch depends on: 1. arm:samsung:serial Extract common UART code http://patchwork.ozlabs.org/patch/260550/ 2. arm:samsung: Move common code from ./s5p-common to ./samsung-common/ http://patchwork.ozlabs.org/patch/260554/ --- arch/arm/cpu/samsung-common/cpu_info.c | 10 +- arch/arm/include/asm/arch-exynos/cpu.h | 24 arch/arm/include/asm/arch-s5pc1xx/cpu.h | 12 ++-- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/arch/arm/cpu/samsung-common/cpu_info.c b/arch/arm/cpu/samsung-common/cpu_info.c index 88743b9..1089829 100644 --- a/arch/arm/cpu/samsung-common/cpu_info.c +++ b/arch/arm/cpu/samsung-common/cpu_info.c @@ -25,14 +25,14 @@ #include asm/arch/clk.h /* Default is s5pc100 */ -unsigned int s5p_cpu_id = 0xC100; +unsigned int samsung_cpu_id = 0xC100; /* Default is EVT1 */ -unsigned int s5p_cpu_rev = 1; +unsigned int samsung_cpu_rev = 1; #ifdef CONFIG_ARCH_CPU_INIT int arch_cpu_init(void) { - s5p_set_cpu_id(); + samsung_set_cpu_id(); return 0; } @@ -40,7 +40,7 @@ int arch_cpu_init(void) u32 get_device_type(void) { - return s5p_cpu_id; + return samsung_cpu_id; } #ifdef CONFIG_DISPLAY_CPUINFO @@ -48,7 +48,7 @@ int print_cpuinfo(void) { char buf[32]; - printf(CPU:\t%s%X@%sMHz\n, s5p_get_cpu_name(), s5p_cpu_id, + printf(CPU:\t%s%X@%sMHz\n, samsung_get_cpu_name(), samsung_cpu_id, strmhz(buf, get_arm_clk())); return 0; diff --git a/arch/arm/include/asm/arch-exynos/cpu.h b/arch/arm/include/asm/arch-exynos/cpu.h index 1ff231b..b0be261 100644 --- a/arch/arm/include/asm/arch-exynos/cpu.h +++ b/arch/arm/include/asm/arch-exynos/cpu.h @@ -138,40 +138,40 @@ #ifndef __ASSEMBLY__ #include asm/io.h /* CPU detection macros */ -extern unsigned int s5p_cpu_id; -extern unsigned int s5p_cpu_rev; +extern unsigned int samsung_cpu_id; +extern unsigned int samsung_cpu_rev; static inline int s5p_get_cpu_rev(void) { - return s5p_cpu_rev; + return samsung_cpu_rev; } -static inline void s5p_set_cpu_id(void) +static inline void samsung_set_cpu_id(void) { unsigned int pro_id = (readl(EXYNOS4_PRO_ID) 0x00FFF000) 12; switch (pro_id) { case 0x200: /* Exynos4210 EVT0 */ - s5p_cpu_id = 0x4210; - s5p_cpu_rev = 0; + samsung_cpu_id = 0x4210; + samsung_cpu_rev = 0; break; case 0x210: /* Exynos4210 EVT1 */ - s5p_cpu_id = 0x4210; + samsung_cpu_id = 0x4210; break; case 0x412: /* Exynos4412 */ - s5p_cpu_id = 0x4412; + samsung_cpu_id = 0x4412; break; case 0x520: /* Exynos5250 */ - s5p_cpu_id = 0x5250; + samsung_cpu_id = 0x5250; break; } } -static inline char *s5p_get_cpu_name(void) +static inline char *samsung_get_cpu_name(void) { return EXYNOS_CPU_NAME; } @@ -179,7 +179,7 @@ static inline char *s5p_get_cpu_name(void) #define IS_SAMSUNG_TYPE(type, id) \ static inline int __attribute__((no_instrument_function)) cpu_is_##type(void) \ { \ - return (s5p_cpu_id 12) == id;\ + return (samsung_cpu_id 12) == id;\ } IS_SAMSUNG_TYPE(exynos4, 0x4) @@ -189,7 +189,7 @@ IS_SAMSUNG_TYPE(exynos5, 0x5) static inline int __attribute__((no_instrument_function)) \ proid_is_##type(void) \ { \ - return s5p_cpu_id == id;\ + return samsung_cpu_id == id;\ } IS_EXYNOS_TYPE(exynos4210, 0x4210) diff --git a/arch/arm/include/asm/arch-s5pc1xx/cpu.h b/arch/arm/include/asm/arch-s5pc1xx/cpu.h index 2362b99..8ab71ea 100644 --- a/arch/arm/include/asm/arch-s5pc1xx/cpu.h +++ b/arch/arm/include/asm/arch-s5pc1xx/cpu.h @@ -64,15 +64,15 @@ #ifndef __ASSEMBLY__ #include asm/io.h /* CPU detection macros */ -extern unsigned int s5p_cpu_id; +extern unsigned int samsung_cpu_id; -static inline void s5p_set_cpu_id(void) +static inline void samsung_set_cpu_id(void) { - s5p_cpu_id = readl(S5PC100_PRO_ID); - s5p_cpu_id = 0xC000 | ((s5p_cpu_id 0x00FFF000) 12); + samsung_cpu_id = readl(S5PC100_PRO_ID); + samsung_cpu_id = 0xC000 | ((samsung_cpu_id 0x00FFF000) 12); } -static inline char *s5p_get_cpu_name(void) +static inline char *samsung_get_cpu_name(void) { return S5P_CPU_NAME; } @@ -80,7 +80,7 @@ static
Re: [U-Boot] [U-Boot, v3, 6/7] USB: usb-hub: Add a weak function for resetting devices
Lubo Thanks for the reply On 07/25/2013 03:38 PM, Lubomir Popov wrote: Hi Dan, guys, Just would like to give my 5 cents: my humble experience with OMAP4 and OMAP5 tells me that this (that is, the need to reset devices after applying port power) seems to be a OMAP5 HSIC IP issue, and not a device problem. We at MMS have two custom designs, one with OMAP5430 and one with OMAP4460, both of which employ HSIC chips (LAN9730 and USB4640 on the OMAP5 board, and USB4640 on the OMAP4), along with a ULPI PHY (TUSB1210) on both boards. I had the pleasure of bringing up both boards with U-Boot a few months back, including USB EHCI, and can state the following: Device reset after port power is applied is needed for the OMAP5 HSIC devices only. The ULPI PHY on both boards doesn't even have a hardware reset connected, nevertheless the device attached to it gets enumerated (even without performing PHY software reset via the ULPI viewport). I performed the HSIC device reset by calling a board function from within the ehci_hcd.c driver, which is compiled only for the OMAP5, and only if we have HSIC devices. An obsolete patch for this, working on my board, can still be found at http://patchwork.ozlabs.org/patch/232742/, as well as a RFC for the 5432uevm (untested) at http://patchwork.ozlabs.org/patch/244124/ On the OMAP4 board this reset is not needed, the HSIC device gets enumerated straightforward. I don't know about other arches, but I'm not sure that having an unconditional common call, although weak, in usb_hub.c is the best solution. Best regards, Lubo I see your patches and see that you have added a omap5 specific call to reset the device in the ehci-hcd.c. I originally had a similar implementation in ehci-hcd but decided to move it up to the usb-hub. http://patchwork.ozlabs.org/patch/258229/ But I can move it back since the patch exists. This make it all board specific because as you point out it is only needed in HSIC connection Crazy question was there any support documentation for the OMAP5 HSIC issue? Dan -- -- Dan Murphy ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] video: mxc_ipuv3: fix memory alignment of framebuffer
The frame-buffer on i.MX boards needs to be aligned for DMA. Signed-off-by: Eric Nelson eric.nel...@boundarydevices.com --- drivers/video/mxc_ipuv3_fb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/video/mxc_ipuv3_fb.c b/drivers/video/mxc_ipuv3_fb.c index ace226c..ad95831 100644 --- a/drivers/video/mxc_ipuv3_fb.c +++ b/drivers/video/mxc_ipuv3_fb.c @@ -416,7 +416,8 @@ static int mxcfb_map_video_memory(struct fb_info *fbi) fbi-fix.line_length; } - fbi-screen_base = (char *)malloc(fbi-fix.smem_len); + fbi-screen_base = (char *)memalign(ARCH_DMA_MINALIGN, + fbi-fix.smem_len); fbi-fix.smem_start = (unsigned long)fbi-screen_base; if (fbi-screen_base == 0) { puts(Unable to allocate framebuffer memory\n); -- 1.8.1.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] arm: goni: remove config.mk file
Dear Lukasz, On 25/07/13 20:05, Lukasz Majewski wrote: On Thu, 25 Jul 2013 10:45:35 +0900 Minkyu Kang mk7.k...@samsung.com wrote, Hi Minkyu, Since config.mk is deprecated, remove this file, and move CONFIG_SYS_TEXT_BASE define to config file. Signed-off-by: Minkyu Kang mk7.k...@samsung.com --- board/samsung/goni/config.mk | 34 -- include/configs/s5p_goni.h | 3 +++ 2 files changed, 3 insertions(+), 34 deletions(-) delete mode 100644 board/samsung/goni/config.mk diff --git a/board/samsung/goni/config.mk b/board/samsung/goni/config.mk deleted file mode 100644 index e4581ca..000 --- a/board/samsung/goni/config.mk +++ /dev/null @@ -1,34 +0,0 @@ -# -# Copyright (C) 2010 Samsung Electronics -# Kyungmin Park kyungmin.p...@samsung.com -# -# See file CREDITS for list of people who contributed to this -# project. -# -# 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 -# - -# On S5PC100 we use the 128 MiB OneDRAM bank at -# -# 0x3000 to 0x3500 (80MiB) -# 0x3800 to 0x4000 (128MiB) -# -# On S5PC110 we use the 128 MiB OneDRAM bank at -# -# 0x3000 to 0x3500 (80MiB) -# 0x4000 to 0x5000 (256MiB) -# -CONFIG_SYS_TEXT_BASE = 0x3480 diff --git a/include/configs/s5p_goni.h b/include/configs/s5p_goni.h index 56e8347..02355a6 100644 --- a/include/configs/s5p_goni.h +++ b/include/configs/s5p_goni.h @@ -45,6 +45,9 @@ /* DRAM Base */ #define CONFIG_SYS_SDRAM_BASE 0x3000 Would it be possible to change the DMC0 (Memory controller) base address from 0x3000 to 0x2000? This is what the Linux kernel expects. (at /arch/arm/mach-s5pv210/include/mach/memory.h) Maybe it will be possible. but not this patch. This patch is for removing config.mk. btw, I don't have goni target any more. So, if possible.. could you send the patch for it? +/* Text Base */ +#define CONFIG_SYS_TEXT_BASE0x3480 + #define CONFIG_SETUP_MEMORY_TAGS #define CONFIG_CMDLINE_TAG #define CONFIG_INITRD_TAG Thanks, Minkyu Kang. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] video: mxc_ipuv3: fix memory alignment of framebuffer
Dear Eric Nelson, The frame-buffer on i.MX boards needs to be aligned for DMA. Signed-off-by: Eric Nelson eric.nel...@boundarydevices.com --- drivers/video/mxc_ipuv3_fb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/video/mxc_ipuv3_fb.c b/drivers/video/mxc_ipuv3_fb.c index ace226c..ad95831 100644 --- a/drivers/video/mxc_ipuv3_fb.c +++ b/drivers/video/mxc_ipuv3_fb.c @@ -416,7 +416,8 @@ static int mxcfb_map_video_memory(struct fb_info *fbi) fbi-fix.line_length; } - fbi-screen_base = (char *)malloc(fbi-fix.smem_len); + fbi-screen_base = (char *)memalign(ARCH_DMA_MINALIGN, + fbi-fix.smem_len); You might want to round-up the length too, like I did in the MXS driver. fbi-fix.smem_start = (unsigned long)fbi-screen_base; if (fbi-screen_base == 0) { puts(Unable to allocate framebuffer memory\n); Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [U-Boot, v3, 6/7] USB: usb-hub: Add a weak function for resetting devices
Dear Dan Murphy, Lubo Thanks for the reply On 07/25/2013 03:38 PM, Lubomir Popov wrote: Hi Dan, guys, Just would like to give my 5 cents: my humble experience with OMAP4 and OMAP5 tells me that this (that is, the need to reset devices after applying port power) seems to be a OMAP5 HSIC IP issue, and not a device problem. We at MMS have two custom designs, one with OMAP5430 and one with OMAP4460, both of which employ HSIC chips (LAN9730 and USB4640 on the OMAP5 board, and USB4640 on the OMAP4), along with a ULPI PHY (TUSB1210) on both boards. I had the pleasure of bringing up both boards with U-Boot a few months back, including USB EHCI, and can state the following: Device reset after port power is applied is needed for the OMAP5 HSIC devices only. The ULPI PHY on both boards doesn't even have a hardware reset connected, nevertheless the device attached to it gets enumerated (even without performing PHY software reset via the ULPI viewport). I performed the HSIC device reset by calling a board function from within the ehci_hcd.c driver, which is compiled only for the OMAP5, and only if we have HSIC devices. An obsolete patch for this, working on my board, can still be found at http://patchwork.ozlabs.org/patch/232742/, as well as a RFC for the 5432uevm (untested) at http://patchwork.ozlabs.org/patch/244124/ On the OMAP4 board this reset is not needed, the HSIC device gets enumerated straightforward. I don't know about other arches, but I'm not sure that having an unconditional common call, although weak, in usb_hub.c is the best solution. Best regards, Lubo I see your patches and see that you have added a omap5 specific call to reset the device in the ehci-hcd.c. I originally had a similar implementation in ehci-hcd but decided to move it up to the usb-hub. http://patchwork.ozlabs.org/patch/258229/ But I can move it back since the patch exists. This make it all board specific because as you point out it is only needed in HSIC connection Crazy question was there any support documentation for the OMAP5 HSIC issue? Nice to see this is moving in some well-defined direction. Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Extract data file from U-Boot image
Dear Guilherme Maciel Ferreira, In message CAF=5bWcMhBhvvWP1933Xyi9Cpv_t3Y306ceWr6pH+TqwoYpi=g...@mail.gmail.com you wrote: But I fear that mkimage explodes from creaping featurism, so if you go and implement something like this, please do not add it to kmimage, but rather create a separate, new tool, say dumpimage or so. How does 'unimage' sound to you? =) Following the example of unsquashfs and unubi? I dislike such names; they appear not natural to me. Make an image = mkimage or dump the image content = dumpimage kind of describe what the command does in a natural language. But unimage is a word that I cannot put anywhere. I mean, if people really consider this tool of some use. The simple rule is: if something is useful for someone, and does not hurt others, it can get added. Just make sure it's a separate make target so it does not get built automatically for each and every build, but only when you ask for it. However, now we want a selective upgrade, where we can pick a few directories from within the new root file system without the need to write the whole new file system and kernel. Hm... Repacking images on the target appears not really an efficient approach to me. Also I wonder how this works - are you talking about ramdisk based root file system images? Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de If today is the first day of the rest of your life, what the hell was yesterday? ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v5 0/6] Update gdsys ppc4xx-based boards
On 06/26/2013 04:04 PM, dirk.eib...@gdsys.cc wrote: From: Dirk Eibach dirk.eib...@gdsys.cc This series depends on i2c multibus support. It was rebased on the latest multibus branch at http://git.denx.de/?p=u-boot/u-boot-i2c.git;a=shortlog;h=refs/heads/20130620_multibus_v2 Patch powerpc/ppc4xx: Add bitbang i2c interface for gdsys boards was dropped in favor of using the new framework. Whole series applied to u-boot-ppc4xx. Thanks, Stefan ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/3] zynq: Add new ddrc driver for ECC support
On 07/25/2013 04:18 PM, Michal Simek wrote: The first 1MB is not initialized by first stage bootloader. Check if memory is setup to 16bit mode and ECC is enabled. If it is, clear the first 1MB. Also u-boot should report only the half size of memory. Signed-off-by: Michal Simek michal.si...@xilinx.com Acked-by: Jagannadha Sutradharudu Teki jaga...@xilinx.com --- arch/arm/cpu/armv7/zynq/Makefile | 1 + arch/arm/cpu/armv7/zynq/ddrc.c | 65 ++ arch/arm/include/asm/arch-zynq/hardware.h | 8 arch/arm/include/asm/arch-zynq/sys_proto.h | 1 + board/xilinx/zynq/board.c | 2 + 5 files changed, 77 insertions(+) create mode 100644 arch/arm/cpu/armv7/zynq/ddrc.c diff --git a/arch/arm/cpu/armv7/zynq/Makefile b/arch/arm/cpu/armv7/zynq/Makefile index 388085d..f38b3b7 100644 --- a/arch/arm/cpu/armv7/zynq/Makefile +++ b/arch/arm/cpu/armv7/zynq/Makefile @@ -30,6 +30,7 @@ LIB = $(obj)lib$(SOC).o COBJS-y := timer.o COBJS-y += cpu.o +COBJS-y += ddrc.o COBJS-y += slcr.o COBJS:= $(COBJS-y) diff --git a/arch/arm/cpu/armv7/zynq/ddrc.c b/arch/arm/cpu/armv7/zynq/ddrc.c new file mode 100644 index 000..e8f8c19 --- /dev/null +++ b/arch/arm/cpu/armv7/zynq/ddrc.c @@ -0,0 +1,65 @@ +/* + * Copyright (C) 2012 Michal Simek mon...@monstr.eu + * Copyright (C) 2012 Xilinx, Inc. All rights reserved. + * + * See file CREDITS for list of people who contributed to this + * project. + * + * 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 + */ Let me NACK this patch by myself. I will add SPDX License identifier. Thanks, Michal -- Michal Simek, Ing. (M.Eng), OpenPGP - KeyID: FE3D1F91 w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/ Maintainer of Linux kernel - Xilinx Zynq ARM architecture Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform signature.asc Description: OpenPGP digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Please pull u-boot-ppc4xx
Hi Tom, please pull the following patches: The following changes since commit aaf5e825606a70ddc8fca8e366d8c16a6fd3cc7c: Merge branch 'master' of git://git.denx.de/u-boot-nds32 (2013-07-25 08:51:51 -0400) are available in the git repository at: git://www.denx.de/git/u-boot-ppc4xx.git master for you to fetch changes up to 28437154649db9f4445b93f278199e34b0447a57: powerpc/ppc4xx: Remove CONFIG_SYS_FLASH_PROTECTION from gdsys boards (2013-07-25 19:35:42 +0200) Dirk Eibach (6): powerpc/ppc4xx: Use generic accessor functions for gdsys FPGA powerpc/ppc4xx: Add gdsys mclink interface powerpc/ppc4xx: Add fpgad command for dumping gdsys fpga registers powerpc/ppc4xx: Support gdsys multichannel iocon hardware powerpc/ppc4xx: Consider gdsys FPGA OSD size powerpc/ppc4xx: Remove CONFIG_SYS_FLASH_PROTECTION from gdsys boards board/gdsys/405ep/405ep.c| 22 +- board/gdsys/405ep/dlvision-10g.c | 18 +- board/gdsys/405ep/io.c | 16 +- board/gdsys/405ep/iocon.c| 486 +++ board/gdsys/405ep/neo.c | 13 +- board/gdsys/405ex/405ex.c| 22 +- board/gdsys/405ex/io64.c | 34 +-- board/gdsys/common/Makefile | 4 +- board/gdsys/common/fpga.c| 41 board/gdsys/common/mclink.c | 153 board/gdsys/common/mclink.h | 31 +++ board/gdsys/common/osd.c | 118 ++ common/Makefile | 1 + common/cmd_fpgad.c | 100 include/configs/dlvision-10g.h | 9 +- include/configs/dlvision.h | 3 +- include/configs/io.h | 8 +- include/configs/io64.h | 6 + include/configs/iocon.h | 60 - include/configs/neo.h| 8 +- include/gdsys_fpga.h | 58 - 21 files changed, 1040 insertions(+), 171 deletions(-) create mode 100644 board/gdsys/common/fpga.c create mode 100644 board/gdsys/common/mclink.c create mode 100644 board/gdsys/common/mclink.h create mode 100644 common/cmd_fpgad.c ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot