Re: [U-Boot] [PATCH v4 0/8] am335x: NOR support
On 30/07/13 14:28, Tom Rini wrote: On Thu, Jul 18, 2013 at 03:12:57PM -0400, Tom Rini wrote: Hey all, This series adds NOR support to am335x_evm, along with a few generic changes to make gpmc clearer (for per-board things like different NOR chips, etc). This series depends on the last go-round of the am335x falcon mode docs as that adds the README that I add more content to. And while I say this in 3/8, to be clear, I expect to drop 3/8 in favor of Justin Waters' way of doing this instead, I just include this here for completeness and will get it all happy together when I assemble things in u-boot-ti. The big changes in v4 are: - Apply again to master which includes a few non-trivial updates, so the linker script got re-synced. - After checking what's going on, and testing with NAND again, we can be common with gpmc_cfg-irqstatus/enable, and only set documented bits in gpmc_cfg-config Applied to u-boot-ti/master, thanks! I'm now rebasing our NanoBone code onto the TI uboot code, but I'm coming up with the original issue [1] of having to not check for the R_ARM_RELATIVE relocations again. If I patch config.mk again, the code all compiles. I've tested make am335x_evm_norboot and that works. I've attached my custom patchset ... can you tell me what I'm doing wrong ? [1] http://lists.denx.de/pipermail/u-boot/2013-July/158592.html Cheers Mark J. --- board/newflow/nanobone/Makefile | 38 + board/newflow/nanobone/board.c| 295 +++ board/newflow/nanobone/mux.c | 195 +++ board/newflow/nanobone/u-boot.lds | 110 + boards.cfg|2 + include/configs/nanobone.h| 308 + 6 files changed, 948 insertions(+) create mode 100644 board/newflow/nanobone/Makefile create mode 100644 board/newflow/nanobone/board.c create mode 100644 board/newflow/nanobone/mux.c create mode 100644 board/newflow/nanobone/u-boot.lds create mode 100644 include/configs/nanobone.h diff --git a/board/newflow/nanobone/Makefile b/board/newflow/nanobone/Makefile new file mode 100644 index 000..3dbeeda --- /dev/null +++ b/board/newflow/nanobone/Makefile @@ -0,0 +1,38 @@ +# +# Makefile +# +# Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ +# +# SPDX-License-Identifier: GPL-2.0+ +# + +include $(TOPDIR)/config.mk + +LIB= $(obj)lib$(BOARD).o + +ifeq ($(CONFIG_SPL_BUILD)$(CONFIG_NOR_BOOT),y) +COBJS := mux.o +endif + +COBJS += board.o +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS := $(addprefix $(obj),$(SOBJS)) + +$(LIB):$(obj).depend $(OBJS) $(SOBJS) + $(call cmd_link_o_target, $(OBJS) $(SOBJS)) + +clean: + rm -f $(SOBJS) $(OBJS) + +distclean: clean + rm -f $(LIB) core *.bak $(obj).depend + +# + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +# diff --git a/board/newflow/nanobone/board.c b/board/newflow/nanobone/board.c new file mode 100644 index 000..6ccda1b --- /dev/null +++ b/board/newflow/nanobone/board.c @@ -0,0 +1,295 @@ +/* + * board.c + * + * Board functions for Newflow NanoBone board + * + * Copyright (C) 2013, Newflow Ltd - http://www.newflow.co.uk/ + * + * SPDX-License-Identifier:GPL-2.0+ + */ + +#include common.h +#include errno.h +#include spl.h +#include asm/arch/cpu.h +#include asm/arch/hardware.h +#include asm/arch/omap.h +#include asm/arch/ddr_defs.h +#include asm/arch/clock.h +#include asm/arch/gpio.h +#include asm/arch/mmc_host_def.h +#include asm/arch/sys_proto.h +#include asm/arch/mem.h +#include asm/io.h +#include asm/emif.h +#include asm/gpio.h +#include i2c.h +#include miiphy.h +#include cpsw.h +#include board.h + +DECLARE_GLOBAL_DATA_PTR; + +/* NOR Flash config */ +#define NOR_CS 0 +#define NOR_BASE 0x0800 +#define NOR_SIZE GPMC_SIZE_128M +static u32 gpmc_nor_config[GPMC_MAX_REG] = { + 0x1200, + 0x00101000, + 0x00030301, + 0x10041004, + 0x010f1010, + 0x08070280, + 0 +}; + +/* FRAM config */ +#define FRAM_CS1 +#define FRAM_BASE 0x1c00 +#define FRAM_SIZE GPMC_SIZE_16M +static u32 gpmc_fram_config[GPMC_MAX_REG] = { + 0x1200, + 0x00101000, + 0x00020201, + 0x0f030f03, + 0x010d1010, + 0x000301c0, + 0 +}; + +static struct wd_timer *wdtimer = (struct wd_timer *)WDT_BASE; +#if defined(CONFIG_SPL_BUILD) || (CONFIG_NOR_BOOT) +//static struct uart_sys *uart_base = (struct uart_sys *)DEFAULT_UART_BASE; +#endif + +/* MII mode defines */ +#define PORT1_MII_MODE_ENABLE 0x0 +#define PORT2_MII_MODE_ENABLE 0x0 + +static struct ctrl_dev *cdev = (struct ctrl_dev *)CTRL_DEVICE_BASE; + +#if defined(CONFIG_SPL_BUILD) ||
Re: [U-Boot] [PATCH v4 0/8] am335x: NOR support
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/13/2013 10:57 AM, Mark Jackson wrote: On 30/07/13 14:28, Tom Rini wrote: On Thu, Jul 18, 2013 at 03:12:57PM -0400, Tom Rini wrote: Hey all, This series adds NOR support to am335x_evm, along with a few generic changes to make gpmc clearer (for per-board things like different NOR chips, etc). This series depends on the last go-round of the am335x falcon mode docs as that adds the README that I add more content to. And while I say this in 3/8, to be clear, I expect to drop 3/8 in favor of Justin Waters' way of doing this instead, I just include this here for completeness and will get it all happy together when I assemble things in u-boot-ti. The big changes in v4 are: - Apply again to master which includes a few non-trivial updates, so the linker script got re-synced. - After checking what's going on, and testing with NAND again, we can be common with gpmc_cfg-irqstatus/enable, and only set documented bits in gpmc_cfg-config Applied to u-boot-ti/master, thanks! I'm now rebasing our NanoBone code onto the TI uboot code, but I'm coming up with the original issue [1] of having to not check for the R_ARM_RELATIVE relocations again. Your linker script is out of sync with arch/arm/cpu/u-boot.lds - -- Tom -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJSCkoKAAoJENk4IS6UOR1WS5IP/0is6vnCBc3NtLRkOxCbIwjK oFsx7qzJ/xg+D+56ygI14JVH7zikGk2b70bh05wLog96D/oIk8lFgLj3h3YJSG99 cGlAB3ZxI7VupgILfN0lnJ0Ht6NNqou6p3qfC2lJl6/kl40mVXsPBV93X8b/N2vx eDvP6bE8cjhvtQLlOb6HnDcp5OAkbXqiexM3vfwsVALisCksK67DpFgnrm37w9T6 LVAIMRBAOmf6UHDAEbK0I2FjUb/zG/bO3dsTVl+04H5jeOeVerscQPPYtSLY2vua KaJDOXutw2CnUX4xNh3OWj/bSFz39qt5GnGJ8roNfwClbTjEtt0/7zGuGSPh7qXd CCIGHktpYtvAj2HmQ7U4aSqnF4o/gZDJlZZmNArrvDVn2/5XmdxrUO9tSdiRYMBR ljPLK+VBD7vz96mbfx3QWbL0dBnjzg0jxaOpvEX/N7SomZnb7seu9lTetaDVRJhD xj96lSaZ2BL7SGAW/1h1mt93Bh/emQDhpLI1wNIr0UCRWmdx34enQnBN51A8Al0j E132z4n1zQfj7fAG9nLdAVuuBJsDX5iyHFz3NUuxvREls+yLK5bweXUOwfhUirMd eJqlPaKiAuuoUwsPJHWCr/PS0+pU0AdxZ9dP9s9sGU1Lr+lJNUkqP0KVnb4aZqtA nmrkfKCX6p+R1C/RluK0 =LnpG -END PGP SIGNATURE- ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 0/8] am335x: NOR support
On 13/08/13 16:00, Tom Rini wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/13/2013 10:57 AM, Mark Jackson wrote: On 30/07/13 14:28, Tom Rini wrote: On Thu, Jul 18, 2013 at 03:12:57PM -0400, Tom Rini wrote: Hey all, This series adds NOR support to am335x_evm, along with a few generic changes to make gpmc clearer (for per-board things like different NOR chips, etc). This series depends on the last go-round of the am335x falcon mode docs as that adds the README that I add more content to. And while I say this in 3/8, to be clear, I expect to drop 3/8 in favor of Justin Waters' way of doing this instead, I just include this here for completeness and will get it all happy together when I assemble things in u-boot-ti. The big changes in v4 are: - Apply again to master which includes a few non-trivial updates, so the linker script got re-synced. - After checking what's going on, and testing with NAND again, we can be common with gpmc_cfg-irqstatus/enable, and only set documented bits in gpmc_cfg-config Applied to u-boot-ti/master, thanks! I'm now rebasing our NanoBone code onto the TI uboot code, but I'm coming up with the original issue [1] of having to not check for the R_ARM_RELATIVE relocations again. Your linker script is out of sync with arch/arm/cpu/u-boot.lds Strange ... since the am335x nor_boot compile appeared to work fine, I just copied the script from board/ti/am335x, and assumed it would work fine for me (with a library path change). So does this TI file also need updating ? Either way, my code now compiles. Cheers. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 0/8] am335x: NOR support
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/13/2013 11:06 AM, Mark Jackson wrote: On 13/08/13 16:00, Tom Rini wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/13/2013 10:57 AM, Mark Jackson wrote: On 30/07/13 14:28, Tom Rini wrote: On Thu, Jul 18, 2013 at 03:12:57PM -0400, Tom Rini wrote: Hey all, This series adds NOR support to am335x_evm, along with a few generic changes to make gpmc clearer (for per-board things like different NOR chips, etc). This series depends on the last go-round of the am335x falcon mode docs as that adds the README that I add more content to. And while I say this in 3/8, to be clear, I expect to drop 3/8 in favor of Justin Waters' way of doing this instead, I just include this here for completeness and will get it all happy together when I assemble things in u-boot-ti. The big changes in v4 are: - Apply again to master which includes a few non-trivial updates, so the linker script got re-synced. - After checking what's going on, and testing with NAND again, we can be common with gpmc_cfg-irqstatus/enable, and only set documented bits in gpmc_cfg-config Applied to u-boot-ti/master, thanks! I'm now rebasing our NanoBone code onto the TI uboot code, but I'm coming up with the original issue [1] of having to not check for the R_ARM_RELATIVE relocations again. Your linker script is out of sync with arch/arm/cpu/u-boot.lds Strange ... since the am335x nor_boot compile appeared to work fine, I just copied the script from board/ti/am335x, and assumed it would work fine for me (with a library path change). So does this TI file also need updating ? Either way, my code now compiles. I had to re-sync the TI one in this series as well. Double check between what you have working now vs before, there's a few small changes there... - -- Tom -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJSCkyQAAoJENk4IS6UOR1WmrUP+wXcDGmf/sWOqB99kvxrMrYz 25rbCBYj1I65ataC9gIqXmPnKOeXLwjWOOIK5Z8fYol6Xzf7gz9E4EiuRQPxs3SO NfgEPueEBZVl52/BjzgicO7X6HPlbizuL7sp+yQbMmfsEAklnVmyGR2vOoG2A8CN 07rHmhej9QwYpVyYpAOfU/u3ZGn55PI9GxJiqVXMTRqb/WSEyv7ie0dRivSSHW4y g3WSemNBNYpvHYbYPDjJ68cDSBXiNlXX6uftQdlXD2wxhP5jP3MXUOcvhlFxXbvZ YFBjN7xAI0XeoK3OQk65z+oq/0JGq8FNk5wIKSWKjP06y4ncp1Xb5adGfoiVJ2HI FGqXRLRjHrQoON8f+90EV+a2YXiQ14/G387tJXSLWVSOzdRuaWbPMyzrOw6CT8qS BhOAsxhLCYyu+So+z9+tO1ZB+Wt8XWI1PS3DsRhw7mx9pGUjtLCjN6Ys10r71DyW 5M6rBaDu5eG3Th6X7ifoUwVJUEygh9YUHnWzAEcMtd1aYcFHsngwM7K3vtaAYv/Y PUlbay0Ars8B2JC2rJPKh5PS+BHpEsItHehdkmptKJCwC2NqR987Mv+IT19PFxJz 6Uf8Jc3tQCmfA5DG0HDVBsWon69EbRTTykpgUqCeKPohp2Ms65nKFnYSV/iDCU7U fuVnxnKZSkkuAtX1CkEl =hthS -END PGP SIGNATURE- ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 0/8] am335x: NOR support
On 13/08/13 16:11, Tom Rini wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/13/2013 11:06 AM, Mark Jackson wrote: On 13/08/13 16:00, Tom Rini wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/13/2013 10:57 AM, Mark Jackson wrote: On 30/07/13 14:28, Tom Rini wrote: On Thu, Jul 18, 2013 at 03:12:57PM -0400, Tom Rini wrote: Hey all, This series adds NOR support to am335x_evm, along with a few generic changes to make gpmc clearer (for per-board things like different NOR chips, etc). This series depends on the last go-round of the am335x falcon mode docs as that adds the README that I add more content to. And while I say this in 3/8, to be clear, I expect to drop 3/8 in favor of Justin Waters' way of doing this instead, I just include this here for completeness and will get it all happy together when I assemble things in u-boot-ti. The big changes in v4 are: - Apply again to master which includes a few non-trivial updates, so the linker script got re-synced. - After checking what's going on, and testing with NAND again, we can be common with gpmc_cfg-irqstatus/enable, and only set documented bits in gpmc_cfg-config Applied to u-boot-ti/master, thanks! I'm now rebasing our NanoBone code onto the TI uboot code, but I'm coming up with the original issue [1] of having to not check for the R_ARM_RELATIVE relocations again. Your linker script is out of sync with arch/arm/cpu/u-boot.lds Strange ... since the am335x nor_boot compile appeared to work fine, I just copied the script from board/ti/am335x, and assumed it would work fine for me (with a library path change). So does this TI file also need updating ? Either way, my code now compiles. I had to re-sync the TI one in this series as well. Double check between what you have working now vs before, there's a few small changes there... Doh ... I was copying the script from the non-TI branch of uboot !! :-( ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 0/8] am335x: NOR support
On 13/08/13 16:20, Mark Jackson wrote: On 13/08/13 16:11, Tom Rini wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/13/2013 11:06 AM, Mark Jackson wrote: On 13/08/13 16:00, Tom Rini wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/13/2013 10:57 AM, Mark Jackson wrote: On 30/07/13 14:28, Tom Rini wrote: On Thu, Jul 18, 2013 at 03:12:57PM -0400, Tom Rini wrote: Hey all, This series adds NOR support to am335x_evm, along with a few generic changes to make gpmc clearer (for per-board things like different NOR chips, etc). This series depends on the last go-round of the am335x falcon mode docs as that adds the README that I add more content to. And while I say this in 3/8, to be clear, I expect to drop 3/8 in favor of Justin Waters' way of doing this instead, I just include this here for completeness and will get it all happy together when I assemble things in u-boot-ti. The big changes in v4 are: - Apply again to master which includes a few non-trivial updates, so the linker script got re-synced. - After checking what's going on, and testing with NAND again, we can be common with gpmc_cfg-irqstatus/enable, and only set documented bits in gpmc_cfg-config Applied to u-boot-ti/master, thanks! I'm now rebasing our NanoBone code onto the TI uboot code, but I'm coming up with the original issue [1] of having to not check for the R_ARM_RELATIVE relocations again. Your linker script is out of sync with arch/arm/cpu/u-boot.lds Strange ... since the am335x nor_boot compile appeared to work fine, I just copied the script from board/ti/am335x, and assumed it would work fine for me (with a library path change). So does this TI file also need updating ? Either way, my code now compiles. I had to re-sync the TI one in this series as well. Double check between what you have working now vs before, there's a few small changes there... Doh ... I was copying the script from the non-TI branch of uboot !! :-( Well the code seems to work apart from I get no networking. We have dual ethernet, so I'll have to do some digging. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 0/8] am335x: NOR support
On Thu, Jul 18, 2013 at 03:12:57PM -0400, Tom Rini wrote: Hey all, This series adds NOR support to am335x_evm, along with a few generic changes to make gpmc clearer (for per-board things like different NOR chips, etc). This series depends on the last go-round of the am335x falcon mode docs as that adds the README that I add more content to. And while I say this in 3/8, to be clear, I expect to drop 3/8 in favor of Justin Waters' way of doing this instead, I just include this here for completeness and will get it all happy together when I assemble things in u-boot-ti. The big changes in v4 are: - Apply again to master which includes a few non-trivial updates, so the linker script got re-synced. - After checking what's going on, and testing with NAND again, we can be common with gpmc_cfg-irqstatus/enable, and only set documented bits in gpmc_cfg-config Applied to u-boot-ti/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
[U-Boot] [PATCH v4 0/8] am335x: NOR support
Hey all, This series adds NOR support to am335x_evm, along with a few generic changes to make gpmc clearer (for per-board things like different NOR chips, etc). This series depends on the last go-round of the am335x falcon mode docs as that adds the README that I add more content to. And while I say this in 3/8, to be clear, I expect to drop 3/8 in favor of Justin Waters' way of doing this instead, I just include this here for completeness and will get it all happy together when I assemble things in u-boot-ti. The big changes in v4 are: - Apply again to master which includes a few non-trivial updates, so the linker script got re-synced. - After checking what's going on, and testing with NAND again, we can be common with gpmc_cfg-irqstatus/enable, and only set documented bits in gpmc_cfg-config -- Tom ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot