Re: [U-Boot] Pull request: u-boot-sh/rmolbile
On Fri, Feb 13, 2015 at 01:19:05PM +0900, Nobuhiro Iwamatsu wrote: Dear Tom Rini. Please pull u-boot-sh rmobile branch. The following changes since commit a4fb5df214c7e8d5bc949c1068d92252f105427a: Merge branch 'microblaze' of git://git.denx.de/u-boot-microblaze (2015-02-09 11:44:46 -0500) are available in the git repository at: git://git.denx.de/u-boot-sh.git rmobile for you to fetch changes up to 79bf043e371cfb7bed276e3ce795f066a364f5ff: ARM: rmobile: silk: Remove initialization of ACTLR.SMP (2015-02-13 13:14:56 +0900) 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] u-boot sunxi fel plan for v2015.04
On Sun, Feb 15, 2015 at 05:38:48PM +0100, Hans de Goede wrote: Hi, On 15-02-15 15:43, Siarhei Siamashka wrote: On Fri, 13 Feb 2015 16:50:49 -0500 Tom Rini tr...@ti.com wrote: On Fri, Feb 13, 2015 at 09:19:08AM +0100, Hans de Goede wrote: Hi Siarhei and Simon, I'm wondering what the plan is wrt sunxi FEL booting for u-boot v2015.04 I know that you both have been working on this, and I think that for v2015.04 Simon's latest set probably is the best way forward for now, we're going to need parts of that set anyways for the more complete solution Siarhei has. we could replace the patch adding all the #ifdef's to start.S with code saving / restoring PCR15 and friends, that would be more cleaner. So I see 2 ways forwards for v2014.05 1) Go with Simon's latest set as is. 2) Take the first patches from Simon's set and replace the on adding he #ifdef's to start.S with one saving / restoring the necessary regs I've a slight preference for 2. Siarhei, can you perhaps prepare a patch-set for 2 for merging for v2014.05 ? And when everyone is happy I'll take it via the sunxi tree (And try and see about giving it a spin on my Lime2). Thanks! Thanks for clarifying this. Simon, could you please confirm that you are not going to do anything anymore with the third patch from your sunxi FEL fixes set? Hans, could you please queue Simon's patches in the sunxi next branch just like Tom suggested (and after the status of the third patch becomes more clear)? I'm fine with taking Simon's patch-set as is, and upstreaming it through the sunxi tree, but the start.S changes are not really sunxi specific, so I think they need Alberts ack? Tom are you ok with taking these without Albert's ack? [ Oops, looks like Albert wasn't on the To list at one point and thus part of the delay? ] And/or Albert can we have your ack for: http://patchwork.ozlabs.org/patch/437580/ http://patchwork.ozlabs.org/patch/437581/ http://patchwork.ozlabs.org/patch/437582/ (the 2nd one is not really ARM specific, but still) I've looked them over and I think we're somewhere between safe enough and correct and there's still time to re-work things more if Albert wants a different approach. So if there's still time today lets get that part moving along, 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] [PATCH V2 3/3] rpi: add support for Raspberry Pi 2 model B
On Thu, Feb 12, 2015 at 09:14:23PM -0700, Stephen Warren wrote: USB doesn't seem to work yet; the controller detects the on-board Hub/ Ethernet device but can't read the descriptors from it. I haven't investigated yet. Signed-off-by: Stephen Warren swar...@wwwdotorg.org --- V2: Implement new board_rev decoding scheme, to avoid hard-coding the board revision onthe RPi 2. This doesn't apply cleanly now after I believe taking in Simon's DM pull request. Can you please re-spin? 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] [PATCH 2/2] arm:aspenite: Convert to generic board
On Monday, February 16, 2015 at 04:17:20 PM, Luka Perkov wrote: On Mon, Feb 16, 2015 at 05:30:07AM -0800, Prafulla Wadaskar wrote: Subject: [PATCH 2/2] arm:aspenite: Convert to generic board Enable CONFIG_SYS_GENERIC_BOARD for Marvell aspenite. Signed-off-by: Ajay Bhargav ajay.bhar...@einfochips.com --- include/configs/aspenite.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/configs/aspenite.h b/include/configs/aspenite.h index 727b14a..5258486 100644 --- a/include/configs/aspenite.h +++ b/include/configs/aspenite.h @@ -11,6 +11,11 @@ #define __CONFIG_ASPENITE_H /* + * Generic Board support + */ +#define CONFIG_SYS_GENERIC_BOARD + +/* * Version number information */ #define CONFIG_IDENT_STRING\nMarvell-Aspenite DB -- 2.3.0 Acked-by: Prafulla Wadaskar prafu...@marvell.com Added Luka on this thread. Thank you. I've had issues applying this patch so I've merged it manually and pushed to Marvell's for-next branch. Hi! are you the marvell custodian now, Luka ? If so, please update http://www.denx.de/wiki/U-Boot/Custodians this here, so it lists your contact :) Thanks! Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] gunzip: add gzwrite routine for extracting compresed images to block device
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Tom and Marek, On 02/16/2015 10:03 AM, Tom Rini wrote: On Mon, Feb 16, 2015 at 05:27:59PM +0100, Marek Vasut wrote: On Monday, February 16, 2015 at 12:16:06 AM, Eric Nelson wrote: Initial filesystem images are generally highly compressible. Add a routine gzwrite that allows gzip-compressed images to be written to block devices. Signed-off-by: Eric Nelson eric.nel...@boundarydevices.com Hi! Stupid question -- can't you compress the thing in DRAM and then use fatwrite or ext4write to write it to FS? Or are you really after writing the data to a raw block device (in which case, you can use similar commands for raw block devices) ? I _think_ (and I really hope so otherwise yes, this series needs more expanation) that was this adds is the ability to {de,}compress on the (or explanation ;)) Sometimes words fail. I thought that was clear from the commit message but apparently not. fly rather than need to duplicate in DDR which could be hard-to-impossible depending on the size of the data in question. That's exactly right. The purpose of this is to aid in loading images onto storage devices like eMMC where the storage size usually exceeds the size of RAM, but the compressed image size doesn't. Even if the compressed image size does exceed RAM, the gzwrite routine and command give you the ability to do things piecewise, and save lots of read transfer time. To give a quick concrete example, we were looking at programming a relatively small (100's) batch of boards that use a very light O/S, but have 4GiB of eMMC. Using ums takes over 25 minutes per board, but loading board.img.gz and using gzwrite takes 5-6, which is pretty close to optimal given the speed of the eMMC chip. My hope is that this is useful as is, and also that the gzwrite routine can be worked into the fastboot protocol. Transferring gigabytes of data is slow over USB 2.0 and storage sizes keep getting bigger. Regards, Eric -BEGIN PGP SIGNATURE- Version: GnuPG v1 iQEcBAEBAgAGBQJU4invAAoJEFUqXmm9AiVrdAIH/0oP9xvgOOcSM3cI1i6TabDX YDoQRrDjCwmJ7gSBJ6PDpaA8rR/bstdaaEHnbkldNr+r+1KK35zQ20sKT2LfaKtK qoYbFDsflKuBng91m4qdIhrYRRNv6GgP/PtBFOSF9LOdHYTK18E11UD7cmXWKQga j0oEoMXLg67Ye1FHKqmyPqmpcIq66k6slIVla4p+BJnkBfzb0Cw5GnuqVk1l212a vrZIP/xBhCoxRcumzrI8Hh3WpND6CVfepe0EF6s9LNBbhYfFVZYH3lwMoZNM9v/S EMi5bPqcQphmrM7aJ4/M3QXBr52Ffz5LWM85OwENqH2P9SH8L0nNhagNW/tSIQE= =Tu5S -END PGP SIGNATURE- ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] please pull u-boot-samsung master
On Fri, Feb 13, 2015 at 05:31:54PM +0900, Minkyu Kang wrote: Dear Tom, The following changes since commit bd2a4888b123713adec271d6c8040ca9f609aa2f: sunxi: configs/sunxi-common.h: Enable CONFIG_CMD_PART (2015-02-11 19:43:45 -0500) are available in the git repository at: http://git.denx.de/u-boot-samsung for you to fetch changes up to 2e82e9252695a612ab0cbf40fa0c7368515f6506: Exynos: Clock: Cleanup soc_get_periph_rate (2015-02-13 17:23:06 +0900) 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] [PATCH 1/2] gunzip: add gzwrite routine for extracting compresed images to block device
On Mon, Feb 16, 2015 at 05:27:59PM +0100, Marek Vasut wrote: On Monday, February 16, 2015 at 12:16:06 AM, Eric Nelson wrote: Initial filesystem images are generally highly compressible. Add a routine gzwrite that allows gzip-compressed images to be written to block devices. Signed-off-by: Eric Nelson eric.nel...@boundarydevices.com Hi! Stupid question -- can't you compress the thing in DRAM and then use fatwrite or ext4write to write it to FS? Or are you really after writing the data to a raw block device (in which case, you can use similar commands for raw block devices) ? I _think_ (and I really hope so otherwise yes, this series needs more expanation) that was this adds is the ability to {de,}compress on the fly rather than need to duplicate in DDR which could be hard-to-impossible depending on the size of the data in question. -- 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] tools: imagetool: Remove INSERT BEFORE from linker script
On Mon, Feb 16, 2015 at 11:55:09AM -0500, Tom Rini wrote: On Mon, Feb 16, 2015 at 03:05:45PM +0100, Lukasz Majewski wrote: Not all linkers are able to parse INSERT BEFORE part of the linker script. For example following (rather new) gold one: GNU gold (GNU Binutils for Debian 2.22) 1.11 produces following error: HOSTLD tools/mkenvimage /usr/bin/ld: error: ./tools/imagetool.lds:23:8: syntax error, unexpected STRING /usr/bin/ld: fatal error: unable to parse script file ./tools/imagetool.lds collect2: error: ld returned 1 exit status make[1]: *** [tools/mkenvimage] Error 1 make: *** [tools] Error 2 The problem has already been reported, but no evident solution has been proposed: https://bugzilla.redhat.com/show_bug.cgi?id=927573#c5 Signed-off-by: Lukasz Majewski l.majew...@samsung.com Guilherme, can you please confirm that things still work as expected for you with this patch applied? Thanks! On second thought I'm going to go with the patch that just drops the linker script and I see you tested that one as well, 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] Please pull u-boot-dm
On Fri, Feb 13, 2015 at 08:07:56AM -0700, Simon Glass wrote: Hi Tom, This is mostly the PowerPC driver model support and the conversion to Kconfig. I have a few stragglers on the Kconfig side but will look at that next week. The following changes since commit bd2a4888b123713adec271d6c8040ca9f609aa2f: sunxi: configs/sunxi-common.h: Enable CONFIG_CMD_PART (2015-02-11 19:43:45 -0500) are available in the git repository at: http://git.denx.de/u-boot-dm.git for you to fetch changes up to b1f6659c420dae9cd06514fbd8342f39b3f326b9: dm: mx6: sabre: Move driver model CONFIGs to Kconfig (2015-02-13 07:20:00 -0700) 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] Please pull u-boot-x86.git branch sandbox
On Sun, Feb 15, 2015 at 02:46:05PM -0700, Simon Glass wrote: Hi Tom, There are the only pending sandbox/patman/buildman patches that I am aware of (for this release). If I have missed any, please assign them to me in patchwork. Note these are in branch 'sandbox'. The following changes since commit bd2a4888b123713adec271d6c8040ca9f609aa2f: sunxi: configs/sunxi-common.h: Enable CONFIG_CMD_PART (2015-02-11 19:43:45 -0500) are available in the git repository at: git://git.denx.de/u-boot-x86.git x86/sandbox for you to fetch changes up to e50ab22984ce90ffcc47bc620ed2caac0bcc02f7: sandbox: Adjust the order of the NO_SDL check (2015-02-15 14:34:06 -0700) 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] Please pull u-boot-marvell master
On Mon, Feb 16, 2015 at 12:50:30PM +, Luka Perkov wrote: Hi Tom, this series contains kirkwood patches from Michael. Please pull them when you find the time. The following changes since commit bd2a4888b123713adec271d6c8040ca9f609aa2f: sunxi: configs/sunxi-common.h: Enable CONFIG_CMD_PART (2015-02-11 19:43:45 -0500) are available in the git repository at: git://git.denx.de/u-boot-marvell.git for you to fetch changes up to 43730ba72c176ffc4d9858249475f458203d9757: lsxl: add a README file (2015-02-16 11:44:59 +0100) 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] [u-boot 03/40] usb: gadget: udc: add udc-core from linux kernel to u-boot
On Monday, February 16, 2015 at 10:58:46 AM, Lukasz Majewski wrote: Hi Marek, On Friday, February 06, 2015 at 09:47:40 AM, Kishon Vijay Abraham I wrote: Added udc-core.c from linux kernel 3.19-rc1 (97bf6af1f9) to u-boot. This will be adapted to work with u-boot in the following patches. Adding support for udc will help to seamlessly port dwc3 driver from linux kernel to u-boot (since dwc3 uses udc-core) and it'll also help to add support for multiple gadget controllers to be functional at the same time. All other gadget drivers can also be adapted to use udc-core. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com Lukasz, do you have any comments on this ? I'd like to pick this whole thing via u-boot-usb for this MW if possible. I wasn't in the office for the last week. I will review this code ASAP. No worries, thanks :) Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] tools: imagetool: Remove INSERT BEFORE from linker script
On Mon, Feb 16, 2015 at 03:05:45PM +0100, Lukasz Majewski wrote: Not all linkers are able to parse INSERT BEFORE part of the linker script. For example following (rather new) gold one: GNU gold (GNU Binutils for Debian 2.22) 1.11 produces following error: HOSTLD tools/mkenvimage /usr/bin/ld: error: ./tools/imagetool.lds:23:8: syntax error, unexpected STRING /usr/bin/ld: fatal error: unable to parse script file ./tools/imagetool.lds collect2: error: ld returned 1 exit status make[1]: *** [tools/mkenvimage] Error 1 make: *** [tools] Error 2 The problem has already been reported, but no evident solution has been proposed: https://bugzilla.redhat.com/show_bug.cgi?id=927573#c5 Signed-off-by: Lukasz Majewski l.majew...@samsung.com Guilherme, can you please confirm that things still work as expected for you with this patch applied? 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] [PATCH 1/2] gunzip: add gzwrite routine for extracting compresed images to block device
On Monday, February 16, 2015 at 12:16:06 AM, Eric Nelson wrote: Initial filesystem images are generally highly compressible. Add a routine gzwrite that allows gzip-compressed images to be written to block devices. Signed-off-by: Eric Nelson eric.nel...@boundarydevices.com Hi! Stupid question -- can't you compress the thing in DRAM and then use fatwrite or ext4write to write it to FS? Or are you really after writing the data to a raw block device (in which case, you can use similar commands for raw block devices) ? 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 02/40] ARM: AM43xx: Enable clocks for USB OTGSS and USB PHY
On Monday, February 16, 2015 at 11:07:39 AM, Lukasz Majewski wrote: Hi Kishon, Enabled clocks for dwc3 controller and USB PHY present in AM43xx. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- arch/arm/cpu/armv7/am33xx/clock_am43xx.c | 12 +++ arch/arm/include/asm/arch-am33xx/cpu.h | 22 ++-- arch/arm/include/asm/arch-am33xx/hardware_am43xx.h |4 3 files changed, 32 insertions(+), 6 deletions(-) diff --git a/arch/arm/cpu/armv7/am33xx/clock_am43xx.c b/arch/arm/cpu/armv7/am33xx/clock_am43xx.c index 31188c8..252135d 100644 --- a/arch/arm/cpu/armv7/am33xx/clock_am43xx.c +++ b/arch/arm/cpu/armv7/am33xx/clock_am43xx.c @@ -111,9 +111,21 @@ void enable_basic_clocks(void) cmper-emifclkctrl, cmper-otfaemifclkctrl, cmper-qspiclkctrl, + cmper-usb0clkctrl, + cmper-usbphyocp2scp0clkctrl, + cmper-usb1clkctrl, + cmper-usbphyocp2scp1clkctrl, 0 }; + setbits_le32(cmper-usb0clkctrl, +USBOTGSSX_CLKCTRL_OPTFCLKEN_REFCLK960); + setbits_le32(cmwkup-usbphy0clkctrl, +USBPHY0_CLKCTRL_OPTFCLKEN_CLK32K); + setbits_le32(cmper-usb1clkctrl, +USBOTGSSX_CLKCTRL_OPTFCLKEN_REFCLK960); + setbits_le32(cmwkup-usbphy1clkctrl, +USBPHY0_CLKCTRL_OPTFCLKEN_CLK32K); do_enable_clocks(clk_domains, clk_modules_explicit_en, 1); /* Select the Master osc clk as Timer2 clock source */ diff --git a/arch/arm/include/asm/arch-am33xx/cpu.h b/arch/arm/include/asm/arch-am33xx/cpu.h index 8dd69b3..1caa24e 100644 --- a/arch/arm/include/asm/arch-am33xx/cpu.h +++ b/arch/arm/include/asm/arch-am33xx/cpu.h @@ -224,7 +224,11 @@ struct cm_dpll { struct cm_wkuppll { unsigned int resv0[136]; unsigned int wkl4wkclkctrl; /* offset 0x220 */ - unsigned int resv1[55]; + unsigned int resv1[7]; + unsigned int usbphy0clkctrl;/* offset 0x240 */ + unsigned int resv112; + unsigned int usbphy1clkctrl;/* offset 0x248 */ + unsigned int resv113[45]; unsigned int wkclkstctrl; /* offset 0x300 */ unsigned int resv2[15]; unsigned int wkup_i2c0ctrl; /* offset 0x340 */ @@ -275,7 +279,7 @@ struct cm_wkuppll { unsigned int divm2dplldisp; /* offset 0x630 */ }; -/* +/*get_sys_clk_freq This comment doesn't comply with coding style. It should be /* * get_sys_clk_freq * En ... */ * Encapsulating peripheral functional clocks * pll registers */ @@ -283,7 +287,7 @@ struct cm_perpll { unsigned int l3clkstctrl; /* offset 0x00 */ unsigned int resv0[7]; unsigned int l3clkctrl; /* Offset 0x20 */ - unsigned int resv1[7]; + unsigned int resv112[7]; unsigned int l3instrclkctrl;/* offset 0x40 */ unsigned int resv2[3]; unsigned int ocmcramclkctrl;/* offset 0x50 */ @@ -310,7 +314,9 @@ struct cm_perpll { unsigned int qspiclkctrl; /* offset 0x258 */ unsigned int resv121; unsigned int usb0clkctrl; /* offset 0x260 */ - unsigned int resv13[103]; + unsigned int resv122; + unsigned int usb1clkctrl; /* offset 0x268 */ + unsigned int resv13[101]; unsigned int l4lsclkstctrl; /* offset 0x400 */ unsigned int resv14[7]; unsigned int l4lsclkctrl; /* offset 0x420 */ @@ -364,10 +370,14 @@ struct cm_perpll { unsigned int uart4clkctrl; /* offset 0x598 */ unsigned int resv35; unsigned int uart5clkctrl; /* offset 0x5A0 */ - unsigned int resv36[87]; + unsigned int resv36[5]; + unsigned int usbphyocp2scp0clkctrl; /* offset 0x5B8 */ + unsigned int resv361; + unsigned int usbphyocp2scp1clkctrl; /* offset 0x5C0 */ + unsigned int resv3611[79]; unsigned int emifclkstctrl; /* offset 0x700 */ - unsigned int resv361[7]; + unsigned int resv362[7]; unsigned int emifclkctrl; /* offset 0x720 */ unsigned int resv37[3]; unsigned int emiffwclkctrl; /* offset 0x730 */ diff --git a/arch/arm/include/asm/arch-am33xx/hardware_am43xx.h b/arch/arm/include/asm/arch-am33xx/hardware_am43xx.h index efdecf4..5f259da 100644 --- a/arch/arm/include/asm/arch-am33xx/hardware_am43xx.h +++ b/arch/arm/include/asm/arch-am33xx/hardware_am43xx.h @@ -72,6 +72,10 @@ #define USBPHYOCPSCP_MODULE_EN (1 1) #define CM_DEVICE_INST 0x44df4100 +#defineUSBOTGSSX_CLKCTRL_OPTFCLKEN_REFCLK960 (1 8) +#defineUSBPHY0_CLKCTRL_OPTFCLKEN_CLK32K(1 8) + + Two blank lines. /* Control status register */ #define CTRL_CRYSTAL_FREQ_SRC_MASK (1 31) #define
[U-Boot] [PATCH V3 3/3] rpi: add support for Raspberry Pi 2 model B
USB doesn't seem to work yet; the controller detects the on-board Hub/ Ethernet device but can't read the descriptors from it. I haven't investigated yet. Signed-off-by: Stephen Warren swar...@wwwdotorg.org --- v3: Rebased on top of u-boot-dm merge. v2: Implement new board_rev decoding scheme, to avoid hard-coding the board revision onthe RPi 2. --- arch/arm/Kconfig | 5 + arch/arm/cpu/arm1176/bcm2835/Kconfig | 2 +- arch/arm/include/asm/arch-bcm2835/mbox.h | 4 + board/raspberrypi/rpi/rpi.c | 28 - board/raspberrypi/rpi_2/Kconfig | 15 +++ board/raspberrypi/rpi_2/MAINTAINERS | 6 + board/raspberrypi/rpi_2/Makefile | 7 ++ configs/rpi_2_defconfig | 4 + include/configs/rpi-common.h | 186 +++ include/configs/rpi.h| 168 +--- include/configs/rpi_2.h | 15 +++ 11 files changed, 271 insertions(+), 169 deletions(-) create mode 100644 board/raspberrypi/rpi_2/Kconfig create mode 100644 board/raspberrypi/rpi_2/MAINTAINERS create mode 100644 board/raspberrypi/rpi_2/Makefile create mode 100644 configs/rpi_2_defconfig create mode 100644 include/configs/rpi-common.h create mode 100644 include/configs/rpi_2.h diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 41f322058038..f62b38912daa 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -413,6 +413,10 @@ config TARGET_RPI bool Support rpi select CPU_ARM1176 +config TARGET_RPI_2 + bool Support rpi_2 + select CPU_V7 + config TARGET_TNETV107X_EVM bool Support tnetv107x_evm select CPU_ARM1176 @@ -975,6 +979,7 @@ source board/phytec/pcm051/Kconfig source board/ppcag/bg0900/Kconfig source board/pxa255_idp/Kconfig source board/raspberrypi/rpi/Kconfig +source board/raspberrypi/rpi_2/Kconfig source board/ronetix/pm9261/Kconfig source board/ronetix/pm9263/Kconfig source board/ronetix/pm9g45/Kconfig diff --git a/arch/arm/cpu/arm1176/bcm2835/Kconfig b/arch/arm/cpu/arm1176/bcm2835/Kconfig index 94f57d732fe3..162f973f6cce 100644 --- a/arch/arm/cpu/arm1176/bcm2835/Kconfig +++ b/arch/arm/cpu/arm1176/bcm2835/Kconfig @@ -1,4 +1,4 @@ -if TARGET_RPI +if TARGET_RPI || TARGET_RPI_2 config DM default y if !SPL_BUILD diff --git a/arch/arm/include/asm/arch-bcm2835/mbox.h b/arch/arm/include/asm/arch-bcm2835/mbox.h index c4bbacaf3c3f..04bf480a5493 100644 --- a/arch/arm/include/asm/arch-bcm2835/mbox.h +++ b/arch/arm/include/asm/arch-bcm2835/mbox.h @@ -125,6 +125,9 @@ struct bcm2835_mbox_tag_hdr { #define BCM2835_MBOX_TAG_GET_BOARD_REV 0x00010002 +#ifdef CONFIG_BCM2836 +#define BCM2836_BOARD_REV_2_B 0x4 +#else /* * 0x2..0xf from: * http://raspberryalphaomega.org.uk/2013/02/06/automatic-raspberry-pi-board-revision-detection-model-a-b1-and-b2/ @@ -145,6 +148,7 @@ struct bcm2835_mbox_tag_hdr { #define BCM2835_BOARD_REV_B_PLUS 0x10 #define BCM2835_BOARD_REV_CM 0x11 #define BCM2835_BOARD_REV_A_PLUS 0x12 +#endif struct bcm2835_mbox_tag_get_board_rev { struct bcm2835_mbox_tag_hdr tag_hdr; diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c index fdbf87d6fa79..50a699bb9e0c 100644 --- a/board/raspberrypi/rpi/rpi.c +++ b/board/raspberrypi/rpi/rpi.c @@ -1,5 +1,5 @@ /* - * (C) Copyright 2012-2013 Stephen Warren + * (C) Copyright 2012-2013,2015 Stephen Warren * * SPDX-License-Identifier:GPL-2.0 */ @@ -29,7 +29,11 @@ U_BOOT_DEVICE(bcm2835_gpios) = { }; static const struct pl01x_serial_platdata serial_platdata = { +#ifdef CONFIG_BCM2836 + .base = 0x3f201000, +#else .base = 0x20201000, +#endif .type = TYPE_PL011, .clock = 300, }; @@ -77,9 +81,20 @@ static const struct { } models[] = { [0] = { Unknown model, +#ifdef CONFIG_BCM2836 + bcm2836-rpi-other.dtb, +#else bcm2835-rpi-other.dtb, +#endif false, }, +#ifdef CONFIG_BCM2836 + [BCM2836_BOARD_REV_2_B] = { + 2 Model B, + bcm2836-rpi-2-b.dtb, + true, + }, +#else [BCM2835_BOARD_REV_B_I2C0_2] = { Model B (no P5), bcm2835-rpi-b-i2c0.dtb, @@ -150,6 +165,7 @@ static const struct { bcm2835-rpi-a-plus.dtb, false, }, +#endif }; u32 rpi_board_rev = 0; @@ -257,7 +273,15 @@ static void get_board_rev(void) return; } + /* +* For details of old-vs-new scheme, see: +* https://github.com/pimoroni/RPi.version/blob/master/RPi/version.py +* http://www.raspberrypi.org/forums/viewtopic.php?f=63t=99293p=690282 +* (a few posts down) +*/ rpi_board_rev = msg-get_board_rev.body.resp.rev; + if (rpi_board_rev 0x80) + rpi_board_rev = (rpi_board_rev 4) 0xff; if
Re: [U-Boot] [PATCH] tools: imagetool: Remove INSERT BEFORE from linker script
On 16.02.15 17:55, Tom Rini wrote: On Mon, Feb 16, 2015 at 03:05:45PM +0100, Lukasz Majewski wrote: Not all linkers are able to parse INSERT BEFORE part of the linker script. For example following (rather new) gold one: GNU gold (GNU Binutils for Debian 2.22) 1.11 produces following error: HOSTLD tools/mkenvimage /usr/bin/ld: error: ./tools/imagetool.lds:23:8: syntax error, unexpected STRING /usr/bin/ld: fatal error: unable to parse script file ./tools/imagetool.lds collect2: error: ld returned 1 exit status make[1]: *** [tools/mkenvimage] Error 1 make: *** [tools] Error 2 The problem has already been reported, but no evident solution has been proposed: https://bugzilla.redhat.com/show_bug.cgi?id=927573#c5 Signed-off-by: Lukasz Majewski l.majew...@samsung.com Guilherme, can you please confirm that things still work as expected for you with this patch applied? Thanks! I vote for 437762 [1] as replacement for this patch. It is not only the linker script which is not understood by the Darwin linker. The linker generated lists work just differently on Darwin, therefore a93648d197df48fa46dd55f925ff70468bd81c71 broke mkimage for me. Guilherme told the RFC would work [2]. Best regards Andreas Bießmann [1] http://patchwork.ozlabs.org/patch/437762/ [2] http://article.gmane.org/gmane.comp.boot-loaders.u-boot/211224 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [U-Boot,v3,01/12] avr32: use dlmalloc for DMA buffers
Dear Andreas Devel, Andreas Devel andreas.de...@googlemail.com writes: Signed-off-by: Andreas Bießmann andreas.de...@googlemail.com --- Changes in v3: None Changes in v2: None Changes in v1: None arch/avr32/include/asm/dma-mapping.h |7 - arch/avr32/lib/board.c | 51 -- include/configs/atngw100.h |1 - include/configs/atngw100mkii.h |1 - include/configs/atstk1002.h |1 - include/configs/atstk1006.h |1 - include/configs/favr-32-ezkit.h |1 - include/configs/grasshopper.h|1 - include/configs/hammerhead.h |1 - include/configs/mimc200.h|1 - 10 files changed, 6 insertions(+), 60 deletions(-) applied to u-boot-avr32/master, thanks! Best regards, Andreas Bießmann ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3 1/3] fastboot: OUT transaction length must be aligned to wMaxPacketSize
OUT transactions must be aligned to wMaxPacketSize for each transfer, or else transfer will not complete successfully. This patch modifies rx_bytes_expected to return a transfer length that is aligned to wMaxPacketSize. Note that the value of wMaxPacketSize and ep-maxpacket may not be the same value, and it is the value of wMaxPacketSize that should be used for alignment. wMaxPacketSize is passed depending on the speed of connection. Signed-off-by: Dileep Katta dileep.ka...@linaro.org --- Changes in v2: - Corrected source of wMaxPacketSize Changes in v3: - Corrected the logic to accomodate both HS and FS speeds drivers/usb/gadget/f_fastboot.c | 27 ++- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c index a8d8205..2793590 100644 --- a/drivers/usb/gadget/f_fastboot.c +++ b/drivers/usb/gadget/f_fastboot.c @@ -55,6 +55,7 @@ static inline struct f_fastboot *func_to_fastboot(struct usb_function *f) static struct f_fastboot *fastboot_func; static unsigned int download_size; static unsigned int download_bytes; +static bool is_high_speed; static struct usb_endpoint_descriptor fs_ep_in = { .bLength= USB_DT_ENDPOINT_SIZE, @@ -219,10 +220,13 @@ static int fastboot_set_alt(struct usb_function *f, __func__, f-name, interface, alt); /* make sure we don't enable the ep twice */ - if (gadget-speed == USB_SPEED_HIGH) + if (gadget-speed == USB_SPEED_HIGH) { ret = usb_ep_enable(f_fb-out_ep, hs_ep_out); - else + is_high_speed = true; + } else { ret = usb_ep_enable(f_fb-out_ep, fs_ep_out); + is_high_speed = false; + } if (ret) { puts(failed to enable out ep\n); return ret; @@ -370,13 +374,20 @@ static void cb_getvar(struct usb_ep *ep, struct usb_request *req) fastboot_tx_write_str(response); } -static unsigned int rx_bytes_expected(void) +static unsigned int rx_bytes_expected(unsigned int maxpacket) { int rx_remain = download_size - download_bytes; + int rem = 0; if (rx_remain 0) return 0; if (rx_remain EP_BUFFER_SIZE) return EP_BUFFER_SIZE; + if (rx_remain maxpacket) { + rx_remain = maxpacket; + } else if (rx_remain % maxpacket != 0) { + rem = rx_remain % maxpacket; + rx_remain = rx_remain + (maxpacket - rem); + } return rx_remain; } @@ -388,6 +399,7 @@ static void rx_handler_dl_image(struct usb_ep *ep, struct usb_request *req) const unsigned char *buffer = req-buf; unsigned int buffer_size = req-actual; unsigned int pre_dot_num, now_dot_num; + unsigned int max; if (req-status != 0) { printf(Bad status: %d\n, req-status); @@ -425,7 +437,9 @@ static void rx_handler_dl_image(struct usb_ep *ep, struct usb_request *req) printf(\ndownloading of %d bytes finished\n, download_bytes); } else { - req-length = rx_bytes_expected(); + max = is_high_speed ? hs_ep_out.wMaxPacketSize : + fs_ep_out.wMaxPacketSize; + req-length = rx_bytes_expected(max); if (req-length ep-maxpacket) req-length = ep-maxpacket; } @@ -438,6 +452,7 @@ static void cb_download(struct usb_ep *ep, struct usb_request *req) { char *cmd = req-buf; char response[RESPONSE_LEN]; + unsigned int max; strsep(cmd, :); download_size = simple_strtoul(cmd, NULL, 16); @@ -453,7 +468,9 @@ static void cb_download(struct usb_ep *ep, struct usb_request *req) } else { sprintf(response, DATA%08x, download_size); req-complete = rx_handler_dl_image; - req-length = rx_bytes_expected(); + max = is_high_speed ? hs_ep_out.wMaxPacketSize : + fs_ep_out.wMaxPacketSize; + req-length = rx_bytes_expected(max); if (req-length ep-maxpacket) req-length = ep-maxpacket; } -- 1.8.3.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Please pull u-boot-sunxi master
Hi Tom, As discussed here is a pull-req to fix the FEL booting issue. We had already build up a queue of some misc. fixes in u-boot-sunxi/next, so those are included too. The following changes since commit bd2a4888b123713adec271d6c8040ca9f609aa2f: sunxi: configs/sunxi-common.h: Enable CONFIG_CMD_PART (2015-02-11 19:43:45 -0500) are available in the git repository at: http://git.denx.de/u-boot-sunxi.git master for you to fetch changes up to 840fe95c3bcff7692c51b90ebc0d350792597ff0: sunxi: Support the FEL boot mode in the regular u-boot build (2015-02-16 20:23:52 +0100) Hans de Goede (5): sunxi: MAINTAINERS: drop no longer existing felconfig-s from MAINTAINERS sunxi: video: Do not use CONFIG_SYS_MEM_TOP_HIDE for the framebuffer sunxi: video: Dynamically reserve framebuffer memory sunxi: dram: Un-inline dram helper functions sunxi: otg: Fix peripheral mode Paul Kocialkowski (1): sunxi: Ampe A76 support Siarhei Siamashka (2): tools: mksunxiboot: Fix problems on big endian systems sunxi: Support the FEL boot mode in the regular u-boot build Simon Glass (3): arm: Allow lr to be saved by board code arm: spl: Provide for a board-specific loader sunxi: Normalise FEL support arch/arm/cpu/armv7/exynos/spl_boot.c | 1 - arch/arm/cpu/armv7/omap-common/lowlevel_init.S | 2 +- arch/arm/cpu/armv7/omap3/lowlevel_init.S | 2 +- arch/arm/cpu/armv7/start.S | 7 ++- arch/arm/cpu/armv7/sunxi/Makefile | 5 +- arch/arm/cpu/armv7/sunxi/board.c | 46 ++- arch/arm/cpu/armv7/sunxi/config.mk | 2 - arch/arm/cpu/armv7/sunxi/dram_helpers.c| 37 arch/arm/cpu/armv7/sunxi/fel_utils.S | 42 + arch/arm/cpu/armv7/sunxi/u-boot-spl-fel.lds| 82 -- arch/arm/include/asm/arch-sunxi/dram.h | 28 + arch/arm/include/asm/arch-sunxi/sys_proto.h| 10 arch/arm/include/asm/spl.h | 4 ++ arch/arm/include/asm/system.h | 15 + board/nokia/rx51/lowlevel_init.S | 3 +- board/sunxi/Kconfig| 10 board/sunxi/MAINTAINERS| 7 ++- common/spl/spl.c | 5 ++ configs/Ampe_A76_defconfig | 15 + drivers/usb/musb-new/sunxi.c | 13 +--- drivers/video/sunxi_display.c | 36 +-- include/configs/sunxi-common.h | 14 ++--- scripts/Makefile.spl | 2 - tools/mksunxiboot.c| 14 +++-- 24 files changed, 247 insertions(+), 155 deletions(-) create mode 100644 arch/arm/cpu/armv7/sunxi/dram_helpers.c create mode 100644 arch/arm/cpu/armv7/sunxi/fel_utils.S delete mode 100644 arch/arm/cpu/armv7/sunxi/u-boot-spl-fel.lds create mode 100644 configs/Ampe_A76_defconfig Thanks Regards, Hans ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] tools: imagetool: Remove INSERT BEFORE from linker script
On Mon, Feb 16, 2015 at 08:50:46PM +0100, Andreas Bießmann wrote: On 16.02.15 17:55, Tom Rini wrote: On Mon, Feb 16, 2015 at 03:05:45PM +0100, Lukasz Majewski wrote: Not all linkers are able to parse INSERT BEFORE part of the linker script. For example following (rather new) gold one: GNU gold (GNU Binutils for Debian 2.22) 1.11 produces following error: HOSTLD tools/mkenvimage /usr/bin/ld: error: ./tools/imagetool.lds:23:8: syntax error, unexpected STRING /usr/bin/ld: fatal error: unable to parse script file ./tools/imagetool.lds collect2: error: ld returned 1 exit status make[1]: *** [tools/mkenvimage] Error 1 make: *** [tools] Error 2 The problem has already been reported, but no evident solution has been proposed: https://bugzilla.redhat.com/show_bug.cgi?id=927573#c5 Signed-off-by: Lukasz Majewski l.majew...@samsung.com Guilherme, can you please confirm that things still work as expected for you with this patch applied? Thanks! I vote for 437762 [1] as replacement for this patch. It is not only the linker script which is not understood by the Darwin linker. The linker generated lists work just differently on Darwin, therefore a93648d197df48fa46dd55f925ff70468bd81c71 broke mkimage for me. Guilherme told the RFC would work [2]. I concur and am build testing that locally now. -- 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] [U-Boot,v3,09/12] common/board_r: allocate bootparams
Dear Andreas Devel, Andreas Devel andreas.de...@googlemail.com writes: Signed-off-by: Andreas Bießmann andreas.de...@googlemail.com Reviewed-by: Simon Glass s...@chromium.org --- Changes in v3: None Changes in v2: - provide as extra patch, remove from avr32 generic board support Changes in v1: None common/board_r.c | 15 +++ 1 file changed, 15 insertions(+) applied to u-boot-avr32/master, thanks! Best regards, Andreas Bießmann ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [U-Boot,v3,05/12] avr32: convert to dram_init()
Dear Andreas Devel, Andreas Devel andreas.de...@googlemail.com writes: Signed-off-by: Andreas Bießmann andreas.de...@googlemail.com Reviewed-by: Simon Glass s...@chromium.org --- Changes in v3: None Changes in v2: - new since v1 Changes in v1: None arch/avr32/include/asm/u-boot.h |1 + arch/avr32/lib/Makefile |1 + arch/avr32/lib/board.c | 20 ++-- arch/avr32/lib/dram_init.c | 17 + board/atmel/atngw100/atngw100.c | 20 ++-- board/atmel/atngw100mkii/atngw100mkii.c | 21 +++-- board/atmel/atstk1000/atstk1000.c| 21 +++-- board/earthlcd/favr-32-ezkit/favr-32-ezkit.c | 21 +++-- board/in-circuit/grasshopper/grasshopper.c | 20 ++-- board/mimc/mimc200/mimc200.c | 20 ++-- board/miromico/hammerhead/hammerhead.c | 20 ++-- 11 files changed, 46 insertions(+), 136 deletions(-) create mode 100644 arch/avr32/lib/dram_init.c applied to u-boot-avr32/master, thanks! Best regards, Andreas Bießmann ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [U-Boot,v3,11/12] grasshopper: enable generic board
Dear Andreas Devel, Andreas Devel andreas.de...@googlemail.com writes: Signed-off-by: Andreas Bießmann andreas.de...@googlemail.com --- Changes in v3: None Changes in v2: None Changes in v1: None include/configs/grasshopper.h |4 1 file changed, 4 insertions(+) applied to u-boot-avr32/master, thanks! Best regards, Andreas Bießmann ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v1 1/1] usb: gadget: fastboot: Add fastboot erase
Hi Steve, On 14 February 2015 at 02:15, Steve Rae s...@broadcom.com wrote: On 15-02-12 12:29 AM, Dileep Katta wrote: Hi Steve, On 11 February 2015 at 05:25, Steve Rae s...@broadcom.com wrote: Hi, Dileep On 15-02-10 12:49 AM, Dileep Katta wrote: Adds the fastboot erase functionality, to erase a partition specified by name. The erase is performed based on erase group size, to avoid erasing other partitions. The start address and the size is aligned to the erase group size for this. Currently only supports erasing from eMMC. Signed-off-by: Dileep Katta dileep.ka...@linaro.org --- Note: The changes are on top of oem command support added by r...@kernel.org common/fb_mmc.c | 58 ++ +++ drivers/usb/gadget/f_fastboot.c | 23 include/fb_mmc.h| 1 + 3 files changed, 82 insertions(+) diff --git a/common/fb_mmc.c b/common/fb_mmc.c index 6ea3938..3911989 100644 --- a/common/fb_mmc.c +++ b/common/fb_mmc.c @@ -10,6 +10,7 @@ #include part.h #include aboot.h #include sparse_format.h +#include mmc.h #ifndef CONFIG_FASTBOOT_GPT_NAME #define CONFIG_FASTBOOT_GPT_NAME GPT_ENTRY_NAME @@ -110,3 +111,60 @@ void fb_mmc_flash_write(const char *cmd, void *download_buffer, write_raw_image(dev_desc, info, cmd, download_buffer, download_bytes); } + +void fb_mmc_erase(const char *cmd, char *response) +{ + int ret; + block_dev_desc_t *dev_desc; + disk_partition_t info; + lbaint_t blks, blks_start, blks_size, grp_size; + struct mmc *mmc = find_mmc_device(CONFIG_ FASTBOOT_FLASH_MMC_DEV); + + if (mmc == NULL) { + error(invalid mmc device\n); no newline with error() Will remove + fastboot_fail(invalid mmc device); + return; + } + + /* initialize the response buffer */ + response_str = response; + + dev_desc = get_dev(mmc, CONFIG_FASTBOOT_FLASH_MMC_DEV); + if (!dev_desc || dev_desc-type == DEV_TYPE_UNKNOWN) { + error(invalid mmc device\n); no newline with error() Will remove + fastboot_fail(invalid mmc device); + return; + } + + ret = get_partition_info_efi_by_name(dev_desc, cmd, info); + if (ret) { + error(cannot find partition: '%s'\n, cmd); no newline with error() Will remove + fastboot_fail(cannot find partition); + return; + } + + puts(Erasing partition\n); + + /* Align blocks to erase group size to avoid erasing other partitions */ + grp_size = mmc-erase_grp_size; + blks_start = (info.start + grp_size - 1) ~(grp_size - 1); + if (info.size = grp_size) + blks_size = (info.size - (blks_start - info.start)) + (~(grp_size - 1)); + else + blks_size = 0; Is this logic correct??? Isn't the erase_grp_size in bytes? and the info.start info.size in LBA's? Yes, the math will take care of it. Ref: mmc_berase() So, I have a partition: 2 0x0300 0x03ff test attrs: 0x type: 9e312af1-18fe-fa41-45f3-37b3bb1d1061 guid: 18a5d0db-d23a-aac1-0d4c-692c7ba9ab1c and 'fastboot erase test' produces: Erasing blocks 1024 to 1024 due to alignment erased 0 bytes from 'test' which is not correct! Furthermore, doesn't the mmc_berase() already handle the erase_grp_size It does handle it, in a way, but the way it handles it is to erase more blocks than requested if the request isn't aligned. In your example, you requested the test partition to be erased (0x300 to 0x3ff), but what was actually erased (as printed in the Caution message from mmc_berase) was 0x0 to 0x7ff. If I remove your alignment logic, then it produces: Erasing blocks 768 to 1024 due to alignment Caution! Your devices Erase group is 0x400 The erase range would be change to 0x0~0x7ff erased 131072 bytes from 'test' which looks correct (except for the Caution message) Thanks, Steve Except that this one has now erased 0x0 to 0x300 and 0x400 to 0x7ff also, which you did not want to erase, right? Aligning the start address is meant to protect this data from being erased unintentionally. The trade-off is that some small partitions won't get erased at all, if they are too small and not aligned. Regards, Dileep + + printf(Erasing blocks LBAFU to LBAFU due to alignment\n, + blks_start, blks_start + blks_size); + + blks = dev_desc-block_erase(dev_desc-dev, blks_start, blks_size); + if (blks != blks_size) { + error(failed erasing from device %d\n, dev_desc-dev); no newline with error() Will remove +
[U-Boot] [PATCH V3 1/3] bcm2835/rpi: add SPDX license tags for some files
Signed-off-by: Stephen Warren swar...@wwwdotorg.org --- arch/arm/cpu/arm1176/bcm2835/Makefile | 12 ++-- arch/arm/include/asm/arch-bcm2835/sdhci.h | 12 +--- arch/arm/include/asm/arch-bcm2835/timer.h | 12 +--- arch/arm/include/asm/arch-bcm2835/wdog.h | 12 +--- board/raspberrypi/rpi/Makefile| 12 ++-- board/raspberrypi/rpi/rpi.c | 12 +--- include/configs/rpi.h | 12 +--- 7 files changed, 9 insertions(+), 75 deletions(-) diff --git a/arch/arm/cpu/arm1176/bcm2835/Makefile b/arch/arm/cpu/arm1176/bcm2835/Makefile index 0ad36906dfc5..7e5dbe1fdeaf 100644 --- a/arch/arm/cpu/arm1176/bcm2835/Makefile +++ b/arch/arm/cpu/arm1176/bcm2835/Makefile @@ -1,15 +1,7 @@ # -# See file CREDITS for list of people who contributed to this -# project. +# (C) Copyright 2012 Stephen Warren # -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# version 2 as published by the Free Software Foundation. -# -# 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. +# SPDX-License-Identifier: GPL-2.0 # obj-y := lowlevel_init.o diff --git a/arch/arm/include/asm/arch-bcm2835/sdhci.h b/arch/arm/include/asm/arch-bcm2835/sdhci.h index a4f867b2e9a4..da4d5cd5a88f 100644 --- a/arch/arm/include/asm/arch-bcm2835/sdhci.h +++ b/arch/arm/include/asm/arch-bcm2835/sdhci.h @@ -1,17 +1,7 @@ /* * (C) Copyright 2012 Stephen Warren * - * 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 - * version 2 as published by the Free Software Foundation. - * - * 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. + * SPDX-License-Identifier:GPL-2.0 */ #ifndef _BCM2835_SDHCI_H_ diff --git a/arch/arm/include/asm/arch-bcm2835/timer.h b/arch/arm/include/asm/arch-bcm2835/timer.h index c2001b6f932a..2d7cfe5c56f8 100644 --- a/arch/arm/include/asm/arch-bcm2835/timer.h +++ b/arch/arm/include/asm/arch-bcm2835/timer.h @@ -1,17 +1,7 @@ /* * (C) Copyright 2012 Stephen Warren * - * 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 - * version 2 as published by the Free Software Foundation. - * - * 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. + * SPDX-License-Identifier:GPL-2.0 */ #ifndef _BCM2835_TIMER_H diff --git a/arch/arm/include/asm/arch-bcm2835/wdog.h b/arch/arm/include/asm/arch-bcm2835/wdog.h index 303a65f32e08..f369ab589c9a 100644 --- a/arch/arm/include/asm/arch-bcm2835/wdog.h +++ b/arch/arm/include/asm/arch-bcm2835/wdog.h @@ -1,17 +1,7 @@ /* * (C) Copyright 2012 Stephen Warren * - * 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 - * version 2 as published by the Free Software Foundation. - * - * 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. + * SPDX-License-Identifier:GPL-2.0 */ #ifndef _BCM2835_TIMER_H diff --git a/board/raspberrypi/rpi/Makefile b/board/raspberrypi/rpi/Makefile index c53c92b1ddb7..4ce2c983b382 100644 --- a/board/raspberrypi/rpi/Makefile +++ b/board/raspberrypi/rpi/Makefile @@ -1,15 +1,7 @@ # -# See file CREDITS for list of people who contributed to this -# project. +# (C) Copyright 2012 Stephen Warren # -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# version 2 as published by the Free Software Foundation. -# -# 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. +# SPDX-License-Identifier: GPL-2.0 # obj-y := rpi.o diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c index
[U-Boot] [PATCH V3 2/3] bcm2836 SoC support (used in Raspberry Pi 2 model B)
The bcm2835 and bcm2836 are essentially identical, except: - The CPU is an ARM1176 v.s. a quad-core Cortex-A7. - The physical address of many IO controllers has moved. Rather than introducing a whole new bcm2836 value for $(SOC) or $(ARCH), update the existing bcm2835 code to handle the minor differences, and plumb it into the ARMv7 CPU architecture. Signed-off-by: Stephen Warren swar...@wwwdotorg.org --- arch/arm/cpu/armv7/Makefile | 1 + arch/arm/cpu/armv7/bcm2835/Makefile | 13 + arch/arm/include/asm/arch-bcm2835/gpio.h | 5 + arch/arm/include/asm/arch-bcm2835/mbox.h | 6 +- arch/arm/include/asm/arch-bcm2835/sdhci.h | 6 +- arch/arm/include/asm/arch-bcm2835/timer.h | 6 +- arch/arm/include/asm/arch-bcm2835/wdog.h | 6 +- 7 files changed, 39 insertions(+), 4 deletions(-) create mode 100644 arch/arm/cpu/armv7/bcm2835/Makefile diff --git a/arch/arm/cpu/armv7/Makefile b/arch/arm/cpu/armv7/Makefile index 409e6f5651b6..7f77c729a191 100644 --- a/arch/arm/cpu/armv7/Makefile +++ b/arch/arm/cpu/armv7/Makefile @@ -41,6 +41,7 @@ endif obj-$(if $(filter am33xx,$(SOC)),y) += am33xx/ obj-$(if $(filter armada-xp,$(SOC)),y) += armada-xp/ obj-$(CONFIG_AT91FAMILY) += at91/ +obj-$(CONFIG_BCM2835) += bcm2835/ obj-$(if $(filter bcm281xx,$(SOC)),y) += bcm281xx/ obj-$(if $(filter bcmcygnus,$(SOC)),y) += bcmcygnus/ obj-$(if $(filter bcmnsp,$(SOC)),y) += bcmnsp/ diff --git a/arch/arm/cpu/armv7/bcm2835/Makefile b/arch/arm/cpu/armv7/bcm2835/Makefile new file mode 100644 index ..ed1ee4753d49 --- /dev/null +++ b/arch/arm/cpu/armv7/bcm2835/Makefile @@ -0,0 +1,13 @@ +# +# (C) Copyright 2012 Stephen Warren +# +# SPDX-License-Identifier: GPL-2.0+ +# + +src_dir := ../../arm1176/bcm2835/ + +obj-y := +obj-y += $(src_dir)/init.o +obj-y += $(src_dir)/reset.o +obj-y += $(src_dir)/timer.o +obj-y += $(src_dir)/mbox.o diff --git a/arch/arm/include/asm/arch-bcm2835/gpio.h b/arch/arm/include/asm/arch-bcm2835/gpio.h index db42896201b3..c8ef8f528a21 100644 --- a/arch/arm/include/asm/arch-bcm2835/gpio.h +++ b/arch/arm/include/asm/arch-bcm2835/gpio.h @@ -1,6 +1,7 @@ /* * Copyright (C) 2012 Vikram Narayananan * vikram...@gmail.com + * (C) Copyright 2012,2015 Stephen Warren * * SPDX-License-Identifier:GPL-2.0+ */ @@ -8,7 +9,11 @@ #ifndef _BCM2835_GPIO_H_ #define _BCM2835_GPIO_H_ +#ifdef CONFIG_BCM2836 +#define BCM2835_GPIO_BASE 0x3f20 +#else #define BCM2835_GPIO_BASE 0x2020 +#endif #define BCM2835_GPIO_COUNT 54 #define BCM2835_GPIO_FSEL_MASK 0x7 diff --git a/arch/arm/include/asm/arch-bcm2835/mbox.h b/arch/arm/include/asm/arch-bcm2835/mbox.h index 88d2ec11a7c2..c4bbacaf3c3f 100644 --- a/arch/arm/include/asm/arch-bcm2835/mbox.h +++ b/arch/arm/include/asm/arch-bcm2835/mbox.h @@ -1,5 +1,5 @@ /* - * (C) Copyright 2012 Stephen Warren + * (C) Copyright 2012,2015 Stephen Warren * * SPDX-License-Identifier:GPL-2.0+ */ @@ -38,7 +38,11 @@ /* Raw mailbox HW */ +#ifdef CONFIG_BCM2836 +#define BCM2835_MBOX_PHYSADDR 0x3f00b880 +#else #define BCM2835_MBOX_PHYSADDR 0x2000b880 +#endif struct bcm2835_mbox_regs { u32 read; diff --git a/arch/arm/include/asm/arch-bcm2835/sdhci.h b/arch/arm/include/asm/arch-bcm2835/sdhci.h index da4d5cd5a88f..2a21ccbf66ba 100644 --- a/arch/arm/include/asm/arch-bcm2835/sdhci.h +++ b/arch/arm/include/asm/arch-bcm2835/sdhci.h @@ -1,5 +1,5 @@ /* - * (C) Copyright 2012 Stephen Warren + * (C) Copyright 2012,2015 Stephen Warren * * SPDX-License-Identifier:GPL-2.0 */ @@ -7,7 +7,11 @@ #ifndef _BCM2835_SDHCI_H_ #define _BCM2835_SDHCI_H_ +#ifdef CONFIG_BCM2836 +#define BCM2835_SDHCI_BASE 0x3f30 +#else #define BCM2835_SDHCI_BASE 0x2030 +#endif int bcm2835_sdhci_init(u32 regbase, u32 emmc_freq); diff --git a/arch/arm/include/asm/arch-bcm2835/timer.h b/arch/arm/include/asm/arch-bcm2835/timer.h index 2d7cfe5c56f8..fc7aec7b7c59 100644 --- a/arch/arm/include/asm/arch-bcm2835/timer.h +++ b/arch/arm/include/asm/arch-bcm2835/timer.h @@ -1,5 +1,5 @@ /* - * (C) Copyright 2012 Stephen Warren + * (C) Copyright 2012,2015 Stephen Warren * * SPDX-License-Identifier:GPL-2.0 */ @@ -7,7 +7,11 @@ #ifndef _BCM2835_TIMER_H #define _BCM2835_TIMER_H +#ifdef CONFIG_BCM2836 +#define BCM2835_TIMER_PHYSADDR 0x3f003000 +#else #define BCM2835_TIMER_PHYSADDR 0x20003000 +#endif struct bcm2835_timer_regs { u32 cs; diff --git a/arch/arm/include/asm/arch-bcm2835/wdog.h b/arch/arm/include/asm/arch-bcm2835/wdog.h index f369ab589c9a..beb6a0820601 100644 --- a/arch/arm/include/asm/arch-bcm2835/wdog.h +++ b/arch/arm/include/asm/arch-bcm2835/wdog.h @@ -1,5 +1,5 @@ /* - * (C) Copyright 2012 Stephen Warren + * (C) Copyright 2012,2015 Stephen Warren * * SPDX-License-Identifier:GPL-2.0 */ @@ -7,7 +7,11 @@ #ifndef _BCM2835_TIMER_H #define _BCM2835_TIMER_H +#ifdef CONFIG_BCM2836 +#define BCM2835_WDOG_PHYSADDR
Re: [U-Boot] [PATCH] tools: mksunxiboot: Fix problems on big endian systems
Hi, On 08-02-15 06:05, Siarhei Siamashka wrote: Now my PS3 can be also used to build u-boot for sunxi devices. Signed-off-by: Siarhei Siamashka siarhei.siamas...@gmail.com Thanks, applied to u-boot-sunxi/next and included in the pull-req which I've just send out. Regards, Hans --- tools/mksunxiboot.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tools/mksunxiboot.c b/tools/mksunxiboot.c index 1f0fbae..0035f6e 100644 --- a/tools/mksunxiboot.c +++ b/tools/mksunxiboot.c @@ -43,19 +43,19 @@ int gen_check_sum(struct boot_file_head *head_p) uint32_t i; uint32_t sum; - length = head_p-length; + length = le32_to_cpu(head_p-length); if ((length 0x3) != 0)/* must 4-byte-aligned */ return -1; buf = (uint32_t *)head_p; - head_p-check_sum = STAMP_VALUE; /* fill stamp */ + head_p-check_sum = cpu_to_le32(STAMP_VALUE);/* fill stamp */ loop = length 2; /* calculate the sum */ for (i = 0, sum = 0; i loop; i++) - sum += buf[i]; + sum += le32_to_cpu(buf[i]); /* write back check sum */ - head_p-check_sum = sum; + head_p-check_sum = cpu_to_le32(sum); return 0; } @@ -125,10 +125,12 @@ int main(int argc, char *argv[]) memcpy(img.header.magic, BOOT0_MAGIC, 8); /* no '0' termination */ img.header.length = ALIGN(file_size + sizeof(struct boot_file_head), BLOCK_SIZE); + img.header.b_instruction = cpu_to_le32(img.header.b_instruction); + img.header.length = cpu_to_le32(img.header.length); gen_check_sum(img.header); - count = write(fd_out, img, img.header.length); - if (count != img.header.length) { + count = write(fd_out, img, le32_to_cpu(img.header.length)); + if (count != le32_to_cpu(img.header.length)) { perror(Writing output); return EXIT_FAILURE; } ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] DWC2 driver issues
Marek, Following on from my Google+ post about DWC2/RPi USB host controller issues in U-Boot. There are 3 issues I've identified so far: 1) On an RPi with the DWC2 controller connected directly to a single external USB connector (i.e model A, A+), a LS (and perhaps FS) device pluged directly into the board doesn't work due to the small max packet size limit. Your patch 9b1161af8c51 usb: dwc2: Add support for multi-packet control xfers in u-boot-usb.git topic/dwc2 addresses this issue for control transfers at least. With your patch, I can now enumerate a USB kbd on a model A+. That's a great improvement; thanks for the quick response with a patch. However, when I enable CONFIG_USB_KEYBOARD, I see errors when the USB keyboard input driver initializes: starting USB... USB0: Core Release: 2.80a scanning bus 0 for devices... 3 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found scanning usb for ethernet devices... 0 Ethernet Device(s) found dev = 0df92ac0 pipe = 0x40408380 buf = 0db4a780 size = 8 int = 10 Failed to get keyboard state from device 413c:2010 I haven't investigated this further yet. 2) On any RPi with a HS USB hub connected between the DWC2 controller and an LS/FS device (e.g. model A/A+ with external hub, model B/B+ with on-board hub), LS/FS devices don't work since the driver needs to issue USB split transactions. This involves communicating with the Transaction Translator in the USB hub nearest to the LS/FS device. Namely, performing each transaction first with DWC2_HCSPLT_SPLTENA, then repeating (perhaps polling until we get the final response?) it with DWC2_HCSPLT_COMPSPLT to pick up the response. Reference: http://www.usbmadesimple.co.uk/ums_7.htm#split_trans http://am.renesas.com/applications/key_technology/connectivity/usb/about_usb/usb2_0/usb2_8/index.jsp To fully cover both (1) and (2) for all types of transfer, I think we should create a couple functions to do the low-level handling of USB transfers: a) Perform a large transfer by splitting it up into smaller transactions, each as large as the max packet size. This is what your patch does, but perhaps it'd be better as a separate function so the logic can be shared with transfer types other than control; I assume this size-based splitting is relevant everywhere? b) Perform an individual transfer on the wire. This will optionally perform split transactions when necessary. I'm sure this will be needed by all transaction types. Existing code that invokes USB transfers will call (a) once. (a) will call (b) as many times as needed to break up the packet into small chunks. (b) will either send the transaction to the HW (HS devices or directly attached LS/FS devices), or perform the split transaction handling (remotely attached LS/FS devices). Does that sound like a reasonable approach? I can start looking into getting split transactions going; I just couldn't motivate myself last Friday night. 3) On the RPI 2, even directly attached HS devices (i.e. the on-board USB hub, Ethernet) don't work correctly. I haven't tracked down the cause yet, since I got side-tracked on the two issues above, initially thinking they might have the same/similar root-cause. However, I don't think this issue is related, since the RPi2 on-board devices don't fall into either of the categories above. In theory, the HW should work the same since both the BCM2835/2836 have the same rev of the DWC2 controller. The only difference is the CPUs and perhaps some bus logic. I vaguely wonder about memory barrier or timing issues, but who knows yet. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [U-boot][PATCH] keystone2: add support for UART download
On 02/16/2015 12:22 PM, Vitaly Andrianov wrote: Currently to flash u-boot image onto NAND or SPI NOR flash, very first time user need to use Code Composer Studio (CCS). This is cumbersome for an user not familiar with CCS. This patch add simpler procedure using uart boot mode for K2 EVMs. When UART bootmode is set and board is rebooted, the ROM boot loader transfers the image at the beginning of the MSMC. After the transfer please explain MSMC. is complete the boot-loader sets the PC to the first MSMC address 0x0c00. The u-boot.bin is linked to the address 0x0c001000. why not just shift u-boot.bin to start of MSMC address? In order to use the u-boot.bin as an image for UART download, we need to add 4K zeros prefix that act as 1K NOP instructions before reaching 0xc001000. OR, add a relocation logic which saves the 1k NOP and resultant load time? Signed-off-by: Vitaly Andrianov vita...@ti.com Acked-by: Murali Karicheri m-kariche...@ti.com Tested-by: Murali Karicheri m-kariche...@ti.com --- Makefile| 6 ++ board/ti/ks2_evm/README | 17 + 2 files changed, 23 insertions(+) diff --git a/Makefile b/Makefile index 36a9a28..7a86cac 100644 --- a/Makefile +++ b/Makefile @@ -940,6 +940,12 @@ u-boot-nand.gph: u-boot.bin FORCE $(call if_changed,mkimage) @dd if=/dev/zero bs=8 count=1 2/dev/null $@ +u-boot.uart.pad: + @dd if=/dev/zero bs=4 count=1024 2/dev/null $@ How about the cleaning up? is it not better to do this algorithmically? + +u-boot.uart: u-boot.uart.pad u-boot.bin FORCE + $(call if_changed,cat) + # x86 uses a large ROM. We fill it with 0xff, put the 16-bit stuff (including # reset vector) at the top, Intel ME descriptor at the bottom, and U-Boot in # the middle. diff --git a/board/ti/ks2_evm/README b/board/ti/ks2_evm/README index 9ee90a4..a1fc943 100644 --- a/board/ti/ks2_evm/README +++ b/board/ti/ks2_evm/README @@ -81,6 +81,23 @@ To build u-boot-nand.gph make k2hk_evm_defconfig make u-boot-nand.gph +To build u-boot.uart + make k2hk_evm_defconfig + make u-boot.uart + + extra EOL? +Load and Run U-Boot on keystone EVMs using UART download + + +Open BMC and regular UART terminals. + +1. On the regular UART port start xmodem transfer of the u-boot.uart +2. Using BMC terminal set the ARM-UART bootmode and reboot the EVM + BMC bootmode #4 + MBC reboot +3. When xmodem is complete you should see the u-boot starts on the UART port This is hard to do in practice. At times when one has regular OS running already in uart port, it tends to mess up xmodem before we switch terminal and issue bootmode #4 and reboot to BMC. instead, the only failsafe sequence I could come up with is as follows: In this method, we use xmodem to download and start the modified version of uart binary to the target over serial port. Open the BCM and regular UART port at 115200n8 configuration. Steps are rather trivial: 1. At the BCM terminal, select the following to configure DSP noboot: bootmode #15 reboot This should prevent any existing bootloader OR OS from starting up on UART 2. Start Xmodem transfer of the file u-boot-uart.gph on the regular UART port using minicom OR appropriate terminal emulator. 3. At the BCM terminal, Switch over to UART mode and restart. bootmode #4 reboot 4. At the UART terminal, the transfer completes and u-boot startsup. This may be used to download and flash u-boot to nand/spi etc. + + extra EOL? Load and Run U-Boot on keystone EVMs using CCS = -- Regards, Nishanth Menon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [U-Boot,v3,04/12] avr32: rename mmu.h definitions
Dear Andreas Devel, Andreas Devel andreas.de...@googlemail.com writes: Prefix mmu.h PAGE_xxx definitions with MMU_ in order to prevent a naming conflict with other definitions. Signed-off-by: Andreas Bießmann andreas.de...@googlemail.com --- Changes in v3: None Changes in v2: None Changes in v1: - new since RFC arch/avr32/cpu/at32ap700x/mmu.c |8 arch/avr32/include/asm/arch-at32ap700x/mmu.h |6 +++--- board/atmel/atngw100/atngw100.c | 12 ++-- board/atmel/atngw100mkii/atngw100mkii.c | 18 +- board/atmel/atstk1000/atstk1000.c| 12 ++-- board/earthlcd/favr-32-ezkit/favr-32-ezkit.c | 12 ++-- board/in-circuit/grasshopper/grasshopper.c | 12 ++-- board/mimc/mimc200/mimc200.c | 18 +- board/miromico/hammerhead/hammerhead.c | 12 ++-- 9 files changed, 55 insertions(+), 55 deletions(-) applied to u-boot-avr32/master, thanks! Best regards, Andreas Bießmann ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [U-Boot,v3,02/12] avr32: rename cpu_init() - arch_cpu_init()
Dear Andreas Devel, Andreas Devel andreas.de...@googlemail.com writes: Signed-off-by: Andreas Bießmann andreas.de...@googlemail.com Reviewed-by: Simon Glass s...@chromium.org --- Changes in v3: None Changes in v2: None Changes in v1: None arch/avr32/cpu/cpu.c|2 +- arch/avr32/include/asm/u-boot.h |2 ++ arch/avr32/lib/board.c |2 +- 3 files changed, 4 insertions(+), 2 deletions(-) applied to u-boot-avr32/master, thanks! Best regards, Andreas Bießmann ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [U-Boot,v3,06/12] avr32: use generic gd-start_addr_sp
Dear Andreas Devel, Andreas Devel andreas.de...@googlemail.com writes: Before avr32 had an extra storage for stack end to have a nice stack printout on exception. Remove this extra storage and use generic gd-start_addr_sp instead. Signed-off-by: Andreas Bießmann andreas.de...@googlemail.com --- Changes in v3: - new in v3 Changes in v2: None Changes in v1: None arch/avr32/cpu/exception.c |6 +++--- arch/avr32/include/asm/global_data.h |1 - arch/avr32/lib/board.c |2 +- 3 files changed, 4 insertions(+), 5 deletions(-) applied to u-boot-avr32/master, thanks! Best regards, Andreas Bießmann ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [U-Boot,v3,03/12] avr32: factor out cpu_mmc_init()
Dear Andreas Devel, Andreas Devel andreas.de...@googlemail.com writes: cpu_mmc_init() is required by the init sequence to have a working MMC interface on avr32. This will not be included in the binary if we omit the avr32 board.c when building the generic board. Signed-off-by: Andreas Bießmann andreas.de...@googlemail.com --- Changes in v3: None Changes in v2: None Changes in v1: - new since RFC arch/avr32/cpu/Makefile |1 + arch/avr32/cpu/mmc.c| 16 arch/avr32/lib/board.c |8 3 files changed, 17 insertions(+), 8 deletions(-) create mode 100644 arch/avr32/cpu/mmc.c applied to u-boot-avr32/master, thanks! Best regards, Andreas Bießmann ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [U-Boot,v3,12/12] atstk1002: enable generic board
Dear Andreas Devel, Andreas Devel andreas.de...@googlemail.com writes: Signed-off-by: Andreas Bießmann andreas.de...@googlemail.com --- Changes in v3: None Changes in v2: None Changes in v1: - new since RFC include/configs/atstk1002.h |4 1 file changed, 4 insertions(+) applied to u-boot-avr32/master, thanks! Best regards, Andreas Bießmann ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [U-boot][PATCH] keystone2: add support for UART download
Currently to flash u-boot image onto NAND or SPI NOR flash, very first time user need to use Code Composer Studio (CCS). This is cumbersome for an user not familiar with CCS. This patch add simpler procedure using uart boot mode for K2 EVMs. When UART bootmode is set and board is rebooted, the ROM boot loader transfers the image at the beginning of the MSMC. After the transfer is complete the boot-loader sets the PC to the first MSMC address 0x0c00. The u-boot.bin is linked to the address 0x0c001000. In order to use the u-boot.bin as an image for UART download, we need to add 4K zeros prefix that act as 1K NOP instructions before reaching 0xc001000. Signed-off-by: Vitaly Andrianov vita...@ti.com Acked-by: Murali Karicheri m-kariche...@ti.com Tested-by: Murali Karicheri m-kariche...@ti.com --- Makefile| 6 ++ board/ti/ks2_evm/README | 17 + 2 files changed, 23 insertions(+) diff --git a/Makefile b/Makefile index 36a9a28..7a86cac 100644 --- a/Makefile +++ b/Makefile @@ -940,6 +940,12 @@ u-boot-nand.gph: u-boot.bin FORCE $(call if_changed,mkimage) @dd if=/dev/zero bs=8 count=1 2/dev/null $@ +u-boot.uart.pad: + @dd if=/dev/zero bs=4 count=1024 2/dev/null $@ + +u-boot.uart: u-boot.uart.pad u-boot.bin FORCE + $(call if_changed,cat) + # x86 uses a large ROM. We fill it with 0xff, put the 16-bit stuff (including # reset vector) at the top, Intel ME descriptor at the bottom, and U-Boot in # the middle. diff --git a/board/ti/ks2_evm/README b/board/ti/ks2_evm/README index 9ee90a4..a1fc943 100644 --- a/board/ti/ks2_evm/README +++ b/board/ti/ks2_evm/README @@ -81,6 +81,23 @@ To build u-boot-nand.gph make k2hk_evm_defconfig make u-boot-nand.gph +To build u-boot.uart + make k2hk_evm_defconfig + make u-boot.uart + + +Load and Run U-Boot on keystone EVMs using UART download + + +Open BMC and regular UART terminals. + +1. On the regular UART port start xmodem transfer of the u-boot.uart +2. Using BMC terminal set the ARM-UART bootmode and reboot the EVM + BMC bootmode #4 + MBC reboot +3. When xmodem is complete you should see the u-boot starts on the UART port + + Load and Run U-Boot on keystone EVMs using CCS = -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V2 3/3] rpi: add support for Raspberry Pi 2 model B
On 02/16/2015 10:42 AM, Tom Rini wrote: On Thu, Feb 12, 2015 at 09:14:23PM -0700, Stephen Warren wrote: USB doesn't seem to work yet; the controller detects the on-board Hub/ Ethernet device but can't read the descriptors from it. I haven't investigated yet. Signed-off-by: Stephen Warren swar...@wwwdotorg.org --- V2: Implement new board_rev decoding scheme, to avoid hard-coding the board revision onthe RPi 2. This doesn't apply cleanly now after I believe taking in Simon's DM pull request. Can you please re-spin? Thanks! Sure. Have you pushed out that merge? That latest I see in u-boot.git master branch is bd2a4888b123 sunxi: configs/sunxi-common.h: Enable CONFIG_CMD_PART, applied Feb 11. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V2 3/3] rpi: add support for Raspberry Pi 2 model B
On 02/16/2015 11:49 AM, Stephen Warren wrote: On 02/16/2015 10:42 AM, Tom Rini wrote: On Thu, Feb 12, 2015 at 09:14:23PM -0700, Stephen Warren wrote: USB doesn't seem to work yet; the controller detects the on-board Hub/ Ethernet device but can't read the descriptors from it. I haven't investigated yet. Signed-off-by: Stephen Warren swar...@wwwdotorg.org --- V2: Implement new board_rev decoding scheme, to avoid hard-coding the board revision onthe RPi 2. This doesn't apply cleanly now after I believe taking in Simon's DM pull request. Can you please re-spin? Thanks! Sure. Have you pushed out that merge? That latest I see in u-boot.git master branch is bd2a4888b123 sunxi: configs/sunxi-common.h: Enable CONFIG_CMD_PART, applied Feb 11. Never mind; I can rebase on top of a local merge of u-boot/master and u-boot-dm/master. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] sunxi: Support the FEL boot mode in the regular u-boot build
Hi, On 16-02-15 09:23, Siarhei Siamashka wrote: So that the CONFIG_SPL_FEL option is not needed anymore. And the regular SPL binary, generated by the default u-boot build, is now also bootable over USB in the FEL mode. The SPL still can boot from the SD card too. A bunch of system registers need to be saved/restored in order to ensure that the IRQ handler still works in the BROM FEL code after getting control back from the SPL. This is done in the sunxi code instead of abusing ifdefs in 'start.S'. The decision whether to load the main u-boot binary from the SD card or return to the FEL code in the BROM is done at runtime. Signed-off-by: Siarhei Siamashka siarhei.siamas...@gmail.com Thanks, applied to u-boot-sunxi/next and included in the pull-req which I've just send out. Note I've might a slight change, instead of adding the #ifndef CONFIG_SPL_FEL to not restore the extra regs in fel_utils.S, I've removed the #ifdef-s CONFIG_SPL_FEL from start.S (effectively reverting a small part of Simon's patch) as it is cleaner to not have sunxi specific #ifdef-s in start.S . Regards, Hans --- This patch needs to be applied after Simon's FEL patches: http://patchwork.ozlabs.org/patch/437580/ http://patchwork.ozlabs.org/patch/437581/ http://patchwork.ozlabs.org/patch/437582/ The CONFIG_SPL_FEL option can be still kept during the transition period. But we really need to get rid of this special CONFIG_SPL_FEL option as soon as possible. Because it is an extra maintenance burden and also introduces restrictions, such as the SPL size limit. Which hinders the addition of useful features to the SPL. arch/arm/cpu/armv7/sunxi/board.c | 35 +-- arch/arm/cpu/armv7/sunxi/fel_utils.S | 23 +++ 2 files changed, 52 insertions(+), 6 deletions(-) diff --git a/arch/arm/cpu/armv7/sunxi/board.c b/arch/arm/cpu/armv7/sunxi/board.c index b7492ac..c02c015 100644 --- a/arch/arm/cpu/armv7/sunxi/board.c +++ b/arch/arm/cpu/armv7/sunxi/board.c @@ -30,6 +30,10 @@ struct fel_stash { uint32_t sp; uint32_t lr; + uint32_t cpsr; + uint32_t sctlr; + uint32_t vbar; + uint32_t cr; }; struct fel_stash fel_stash __attribute__((section(.data))); @@ -108,15 +112,34 @@ void s_init(void) */ u32 spl_boot_device(void) { +#ifdef CONFIG_SPL_FEL /* -* Have we been asked to return to the FEL portion of the boot ROM? -* TODO: We need a more robust test here, or bracket this with -* #ifdef CONFIG_SPL_FEL. +* This is the legacy compile time configuration for a special FEL +* enabled build. It has many restrictions and can only boot over USB. */ - if (fel_stash.lr = 0x fel_stash.lr 0x4000) + return BOOT_DEVICE_BOARD; +#else + /* +* When booting from the SD card, the eGON.BT0 signature is expected +* to be found in memory at the address 0x0004 (see the mksunxiboot +* tool, which generates this header). +* +* When booting in the FEL mode over USB, this signature is patched in +* memory and replaced with something else by the 'fel' tool. This other +* signature is selected in such a way, that it can't be present in a +* valid bootable SD card image (because the BROM would refuse to +* execute the SPL in this case). +* +* This branch is just making a decision at runtime whether to load +* the main u-boot binary from the SD card (if the eGON.BT0 signature +* is found) or return to the FEL code in the BROM to wait and receive +* the main u-boot binary over USB. +*/ + if (readl(4) == 0x4E4F4765 readl(8) == 0x3054422E) /* eGON.BT0 */ + return BOOT_DEVICE_MMC1; + else return BOOT_DEVICE_BOARD; - - return BOOT_DEVICE_MMC1; +#endif } /* No confirmation data available in SPL yet. Hardcode bootmode */ diff --git a/arch/arm/cpu/armv7/sunxi/fel_utils.S b/arch/arm/cpu/armv7/sunxi/fel_utils.S index 0c1de52..e1b28a3 100644 --- a/arch/arm/cpu/armv7/sunxi/fel_utils.S +++ b/arch/arm/cpu/armv7/sunxi/fel_utils.S @@ -15,11 +15,34 @@ ENTRY(save_boot_params) ldr r0, =fel_stash str sp, [r0, #0] str lr, [r0, #4] + mrs lr, cpsr@ Read CPSR + str lr, [r0, #8] + mrc p15, 0, lr, c1, c0, 0 @ Read CP15 SCTLR Register + str lr, [r0, #12] + mrc p15, 0, lr, c12, c0, 0 @ Read VBAR + str lr, [r0, #16] + mrc p15, 0, lr, c1, c0, 0 @ Read CP15 Control Register + str lr, [r0, #20] b save_boot_params_ret ENDPROC(save_boot_params) ENTRY(return_to_fel) mov sp, r0 mov lr, r1 +#ifndef CONFIG_SPL_FEL + /* +* The CONFIG_SPL_FEL build skips setting these registers, +* so there is no need to restore them here. +*/
[U-Boot] [PULL] u-boot-avr32/master - u-boot/master
Hi Tom, finally generic board support for avr32! The following changes since commit bd2a4888b123713adec271d6c8040ca9f609aa2f: sunxi: configs/sunxi-common.h: Enable CONFIG_CMD_PART (2015-02-11 19:43:45 -0500) are available in the git repository at: git://git.denx.de/u-boot-avr32.git master for you to fetch changes up to 4d3dada78ec402dc51e4198dda316301e0d99f35: atstk1002: enable generic board (2015-02-16 21:21:26 +0100) Andreas Bießmann (11): avr32: use dlmalloc for DMA buffers avr32: rename cpu_init() - arch_cpu_init() avr32: factor out cpu_mmc_init() avr32: rename mmu.h definitions avr32: convert to dram_init() avr32: use generic gd-start_addr_sp common/board_f: factor out reserve_stacks common/board_r: allocate bootparams avr32: add generic board support grasshopper: enable generic board atstk1002: enable generic board arch/arm/lib/Makefile|1 + arch/arm/lib/stack.c | 42 + arch/avr32/config.mk |3 + arch/avr32/cpu/Makefile |1 + arch/avr32/cpu/at32ap700x/mmu.c |8 +-- arch/avr32/cpu/cpu.c |2 +- arch/avr32/cpu/exception.c |6 +- arch/avr32/cpu/mmc.c | 16 + arch/avr32/cpu/u-boot.lds|2 + arch/avr32/include/asm/arch-at32ap700x/mmu.h |6 +- arch/avr32/include/asm/config.h |1 + arch/avr32/include/asm/dma-mapping.h |7 ++- arch/avr32/include/asm/global_data.h |1 - arch/avr32/include/asm/u-boot.h | 10 arch/avr32/lib/Makefile |3 + arch/avr32/lib/board.c | 83 -- arch/avr32/lib/dram_init.c | 17 ++ arch/avr32/lib/interrupts.c |5 ++ arch/powerpc/lib/Makefile|1 + arch/powerpc/lib/stack.c | 31 ++ board/atmel/atngw100/atngw100.c | 32 +++--- board/atmel/atngw100mkii/atngw100mkii.c | 39 board/atmel/atstk1000/atstk1000.c| 33 +++--- board/earthlcd/favr-32-ezkit/favr-32-ezkit.c | 33 +++--- board/in-circuit/grasshopper/grasshopper.c | 32 +++--- board/mimc/mimc200/mimc200.c | 38 board/miromico/hammerhead/hammerhead.c | 32 +++--- common/board_f.c | 46 -- common/board_r.c | 28 - common/cmd_bdinfo.c |4 +- include/asm-generic/u-boot.h |4 ++ include/common.h | 18 ++ include/configs/atngw100.h |1 - include/configs/atngw100mkii.h |1 - include/configs/atstk1002.h |5 +- include/configs/atstk1006.h |1 - include/configs/favr-32-ezkit.h |1 - include/configs/grasshopper.h|5 +- include/configs/hammerhead.h |1 - include/configs/mimc200.h|1 - 40 files changed, 294 insertions(+), 307 deletions(-) create mode 100644 arch/arm/lib/stack.c create mode 100644 arch/avr32/cpu/mmc.c create mode 100644 arch/avr32/lib/dram_init.c create mode 100644 arch/powerpc/lib/stack.c ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] am43xx_evm: Add netboot and related to environment
From: Tom Rini tr...@ti.com Signed-off-by: Tom Rini tr...@ti.com --- include/configs/am43xx_evm.h | 16 1 file changed, 16 insertions(+) diff --git a/include/configs/am43xx_evm.h b/include/configs/am43xx_evm.h index 7ccbf36..44b6f93 100644 --- a/include/configs/am43xx_evm.h +++ b/include/configs/am43xx_evm.h @@ -168,6 +168,10 @@ usbroot=/dev/sda2 rw\0 \ usbrootfstype=ext4 rootwait\0 \ usbdev=0\0 \ + rootpath=/export/rootfs\0 \ + nfsopts=nolock\0 \ + static_ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname} \ + ::off\0 \ ramroot=/dev/ram0 rw\0 \ ramrootfstype=ext2\0 \ mmcargs=setenv bootargs console=${console} \ @@ -178,6 +182,11 @@ ${optargs} \ root=${usbroot} \ rootfstype=${usbrootfstype}\0 \ + netargs=setenv bootargs console=${console} \ + ${optargs} \ + root=/dev/nfs \ + nfsroot=${serverip}:${rootpath},${nfsopts} rw \ + ip=dhcp\0 \ bootenv=uEnv.txt\0 \ loadbootenv=load ${devtype} ${devnum} ${loadaddr} ${bootenv}\0 \ importbootenv=echo Importing environment from mmc ...; \ @@ -229,6 +238,13 @@ bootz ${loadaddr} - ${fdtaddr}; \ fi; \ fi\0 \ + netboot=echo Booting from network ...; \ + setenv autoload no; \ + dhcp; \ + tftp ${loadaddr} ${bootfile}; \ + tftp ${fdtaddr} ${fdtfile}; \ + run netargs; \ + bootz ${loadaddr} - ${fdtaddr}\0 \ findfdt=\ if test $board_name = AM43EPOS; then \ setenv fdtfile am43x-epos-evm.dtb; fi; \ -- 2.2.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/4] sunxi: video: Add support for LCD reset pin
On some boards there is a gpio to reset the LCD panel, add support for this. Signed-off-by: Hans de Goede hdego...@redhat.com --- board/sunxi/Kconfig | 8 drivers/video/sunxi_display.c | 11 ++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig index 0226d28..70e6f4d 100644 --- a/board/sunxi/Kconfig +++ b/board/sunxi/Kconfig @@ -317,6 +317,14 @@ config VIDEO_LCD_POWER Set the power enable pin for the LCD panel. This takes a string in the format understood by sunxi_name_to_gpio, e.g. PH1 for pin 1 of port H. +config VIDEO_LCD_RESET + string LCD panel reset pin + depends on VIDEO + default + ---help--- + Set the reset pin for the LCD panel. This takes a string in the format + understood by sunxi_name_to_gpio, e.g. PH1 for pin 1 of port H. + config VIDEO_LCD_BL_EN string LCD panel backlight enable pin depends on VIDEO diff --git a/drivers/video/sunxi_display.c b/drivers/video/sunxi_display.c index dbda97e..7f01401 100644 --- a/drivers/video/sunxi_display.c +++ b/drivers/video/sunxi_display.c @@ -592,7 +592,7 @@ static void sunxi_lcdc_enable(void) static void sunxi_lcdc_panel_enable(void) { - int pin; + int pin, reset_pin; /* * Start with backlight disabled to avoid the screen flashing to @@ -610,6 +610,12 @@ static void sunxi_lcdc_panel_enable(void) gpio_direction_output(pin, PWM_OFF); } + reset_pin = sunxi_name_to_gpio(CONFIG_VIDEO_LCD_RESET); + if (reset_pin != -1) { + gpio_request(reset_pin, lcd_reset); + gpio_direction_output(reset_pin, 0); /* Assert reset */ + } + /* Give the backlight some time to turn off and power up the panel. */ mdelay(40); pin = sunxi_name_to_gpio(CONFIG_VIDEO_LCD_POWER); @@ -617,6 +623,9 @@ static void sunxi_lcdc_panel_enable(void) gpio_request(pin, lcd_power); gpio_direction_output(pin, 1); } + + if (reset_pin != -1) + gpio_direction_output(reset_pin, 1); /* De-assert reset */ } static void sunxi_lcdc_backlight_enable(void) -- 2.1.0 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 3/4] sunxi: video: Add support for tl059wv5c0 lcd panels
Add support for the 6 480x800 tl059wv5c0 panel used on e.g. Utoo P66 and Aigo M60/M608/M606 tablets. Signed-off-by: Hans de Goede hdego...@redhat.com --- board/sunxi/Kconfig | 8 drivers/video/sunxi_display.c | 7 +++ 2 files changed, 15 insertions(+) diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig index ef59e21..19e7286 100644 --- a/board/sunxi/Kconfig +++ b/board/sunxi/Kconfig @@ -411,6 +411,14 @@ config VIDEO_LCD_PANEL_HITACHI_TX18D42VM ---help--- 7.85 1024x768 Hitachi tx18d42vm LCD panel support +config VIDEO_LCD_TL059WV5C0 + bool tl059wv5c0 LCD panel + select VIDEO_LCD_PANEL_I2C + select VIDEO_LCD_IF_PARALLEL + ---help--- + Say Y here to add support for the 6 480x800 tl059wv5c0 panel used + on e.g. Utoo P66 and Aigo M60/M608/M606 tablets. + endchoice diff --git a/drivers/video/sunxi_display.c b/drivers/video/sunxi_display.c index 7f01401..4e12150 100644 --- a/drivers/video/sunxi_display.c +++ b/drivers/video/sunxi_display.c @@ -18,6 +18,7 @@ #include errno.h #include fdtdec.h #include fdt_support.h +#include i2c.h #include video_fb.h #include videomodes.h #include hitachi_tx18d42vm_lcd.h @@ -1030,6 +1031,12 @@ static void sunxi_mode_set(const struct ctfb_res_modes *mode, mdelay(50); /* Wait for lcd controller power on */ hitachi_tx18d42vm_init(); } + if (IS_ENABLED(CONFIG_VIDEO_LCD_TL059WV5C0)) { + unsigned int orig_i2c_bus = i2c_get_bus_num(); + i2c_set_bus_num(CONFIG_VIDEO_LCD_I2C_BUS); + i2c_reg_write(0x5c, 0x04, 0x42); /* Turn on the LCD */ + i2c_set_bus_num(orig_i2c_bus); + } sunxi_composer_mode_set(mode, address); sunxi_lcdc_tcon0_mode_set(mode, false); sunxi_composer_enable(); -- 2.1.0 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/4] sunxi: video: Add support for LCD panels which need to be configured via i2c
This commits adds support for configuring a a bitbang i2c controller, which is used on some boards to configure the LCD panel (via i2c). Signed-off-by: Hans de Goede hdego...@redhat.com --- board/sunxi/Kconfig| 24 board/sunxi/board.c| 10 ++ include/configs/sunxi-common.h | 16 3 files changed, 50 insertions(+) diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig index 70e6f4d..ef59e21 100644 --- a/board/sunxi/Kconfig +++ b/board/sunxi/Kconfig @@ -349,6 +349,30 @@ config VIDEO_LCD_BL_PWM_ACTIVE_LOW ---help--- Set this if the backlight pwm output is active low. +config VIDEO_LCD_PANEL_I2C + bool LCD panel needs to be configured via i2c + depends on VIDEO + default m + ---help--- + Say y here if the LCD panel needs to be configured via i2c. This + will add a bitbang i2c controller using gpios to talk to the LCD. + +config VIDEO_LCD_PANEL_I2C_SDA + string LCD panel i2c interface SDA pin + depends on VIDEO_LCD_PANEL_I2C + default PG12 + ---help--- + Set the SDA pin for the LCD i2c interface. This takes a string in the + format understood by sunxi_name_to_gpio, e.g. PH1 for pin 1 of port H. + +config VIDEO_LCD_PANEL_I2C_SCL + string LCD panel i2c interface SCL pin + depends on VIDEO_LCD_PANEL_I2C + default PG10 + ---help--- + Set the SCL pin for the LCD i2c interface. This takes a string in the + format understood by sunxi_name_to_gpio, e.g. PH1 for pin 1 of port H. + # Note only one of these may be selected at a time! But hidden choices are # not supported by Kconfig diff --git a/board/sunxi/board.c b/board/sunxi/board.c index b70e00c..e1891d1 100644 --- a/board/sunxi/board.c +++ b/board/sunxi/board.c @@ -33,6 +33,12 @@ #include linux/usb/musb.h #include net.h +#if defined CONFIG_VIDEO_LCD_PANEL_I2C !(defined CONFIG_SPL_BUILD) +/* So that we can use pin names in Kconfig and sunxi_name_to_gpio() */ +int soft_i2c_gpio_sda; +int soft_i2c_gpio_scl; +#endif + DECLARE_GLOBAL_DATA_PTR; /* add board specific code here */ @@ -152,6 +158,10 @@ void i2c_init_board(void) sunxi_gpio_set_cfgpin(SUNXI_GPB(0), SUNXI_GPB0_TWI0); sunxi_gpio_set_cfgpin(SUNXI_GPB(1), SUNXI_GPB0_TWI0); clock_twi_onoff(0, 1); +#if defined CONFIG_VIDEO_LCD_PANEL_I2C !(defined CONFIG_SPL_BUILD) + soft_i2c_gpio_sda = sunxi_name_to_gpio(CONFIG_VIDEO_LCD_PANEL_I2C_SDA); + soft_i2c_gpio_scl = sunxi_name_to_gpio(CONFIG_VIDEO_LCD_PANEL_I2C_SCL); +#endif } #ifdef CONFIG_SPL_BUILD diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h index fa9ac29..dc9a8a8 100644 --- a/include/configs/sunxi-common.h +++ b/include/configs/sunxi-common.h @@ -243,6 +243,22 @@ #define CONFIG_SYS_I2C_MVTWSI #define CONFIG_SYS_I2C_SPEED 40 #define CONFIG_SYS_I2C_SLAVE 0x7f + +#if defined CONFIG_VIDEO_LCD_PANEL_I2C !(defined CONFIG_SPL_BUILD) +#define CONFIG_SYS_I2C_SOFT +#define CONFIG_SYS_I2C_SOFT_SPEED 5 +#define CONFIG_SYS_I2C_SOFT_SLAVE 0x00 +#define CONFIG_VIDEO_LCD_I2C_BUS 0 /* The lcd panel soft i2c is bus 0 */ +#define CONFIG_SYS_SPD_BUS_NUM 1 /* And the axp209 i2c bus is bus 1 */ +/* We use pin names in Kconfig and sunxi_name_to_gpio() */ +#define CONFIG_SOFT_I2C_GPIO_SDA soft_i2c_gpio_sda +#define CONFIG_SOFT_I2C_GPIO_SCL soft_i2c_gpio_scl +#ifndef __ASSEMBLY__ +extern int soft_i2c_gpio_sda; +extern int soft_i2c_gpio_scl; +#endif +#endif + #define CONFIG_CMD_I2C /* PMU */ -- 2.1.0 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 4/4] sunxi: musb: Check Vbus-det before enabling otg port power
Sending out 5V when there is a charger connected to the otg port is not a good idea, so check for this and error out. Note this commit currently breaks otg support on the q8h tablets, as we need to do some magic with the pmic there to get vbus info, this is deliberate (better safe then sorry), fixing this is on my TODO list. Signed-off-by: Hans de Goede hdego...@redhat.com --- board/sunxi/Kconfig | 8 configs/Ampe_A76_defconfig| 1 + configs/Chuwi_V7_CW0825_defconfig | 1 + configs/Hyundai_A7HD_defconfig| 1 + configs/Inet_86VS_defconfig | 1 + configs/TZX-Q8-713B7_defconfig| 1 + drivers/usb/musb-new/sunxi.c | 25 + 7 files changed, 38 insertions(+) diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig index 19e7286..febcc8e 100644 --- a/board/sunxi/Kconfig +++ b/board/sunxi/Kconfig @@ -228,6 +228,14 @@ config USB0_VBUS_PIN Set the Vbus enable pin for usb0 (otg). This takes a string in the format understood by sunxi_name_to_gpio, e.g. PH1 for pin 1 of port H. +config USB0_VBUS_DET + string Vbus detect pin for usb0 (otg) + depends on USB_MUSB_SUNXI + default + ---help--- + Set the Vbus detect pin for usb0 (otg). This takes a string in the + format understood by sunxi_name_to_gpio, e.g. PH1 for pin 1 of port H. + config USB1_VBUS_PIN string Vbus enable pin for usb1 (ehci0) default PH6 if MACH_SUN4I || MACH_SUN7I diff --git a/configs/Ampe_A76_defconfig b/configs/Ampe_A76_defconfig index 2054fc3..f8ceb6c 100644 --- a/configs/Ampe_A76_defconfig +++ b/configs/Ampe_A76_defconfig @@ -3,6 +3,7 @@ CONFIG_SYS_EXTRA_OPTIONS=CONS_INDEX=2,AXP209_POWER CONFIG_FDTFILE=sun5i-a13-ampe-a76.dtb CONFIG_USB_MUSB_SUNXI=y CONFIG_USB0_VBUS_PIN=PG12 +CONFIG_USB0_VBUS_DET=PG01 CONFIG_VIDEO_LCD_MODE=x:800,y:480,depth:18,pclk_khz:33000,le:45,ri:82,up:22,lo:22,hs:1,vs:1,sync:3,vmode:0 CONFIG_VIDEO_LCD_POWER=AXP0-0 CONFIG_VIDEO_LCD_BL_EN=AXP0-1 diff --git a/configs/Chuwi_V7_CW0825_defconfig b/configs/Chuwi_V7_CW0825_defconfig index 680b631..1ef23e4 100644 --- a/configs/Chuwi_V7_CW0825_defconfig +++ b/configs/Chuwi_V7_CW0825_defconfig @@ -3,6 +3,7 @@ CONFIG_SYS_EXTRA_OPTIONS=AXP209_POWER CONFIG_FDTFILE=sun4i-a10-chuwi-v7-cw0825.dtb CONFIG_USB_MUSB_SUNXI=y CONFIG_USB0_VBUS_PIN=PB9 +CONFIG_USB0_VBUS_DET=PH5 CONFIG_VIDEO_LCD_MODE=x:1024,y:768,depth:24,pclk_khz:51000,le:19,ri:300,up:6,lo:31,hs:1,vs:1,sync:3,vmode:0 CONFIG_VIDEO_LCD_POWER=PH8 CONFIG_VIDEO_LCD_BL_EN=PH7 diff --git a/configs/Hyundai_A7HD_defconfig b/configs/Hyundai_A7HD_defconfig index 204640e..6b784e2 100644 --- a/configs/Hyundai_A7HD_defconfig +++ b/configs/Hyundai_A7HD_defconfig @@ -6,6 +6,7 @@ CONFIG_SYS_EXTRA_OPTIONS=AXP209_POWER CONFIG_FDTFILE=sun4i-a10-hyundai-a7hd.dtb CONFIG_USB_MUSB_SUNXI=y CONFIG_USB0_VBUS_PIN=PB09 +CONFIG_USB0_VBUS_DET=PH5 CONFIG_USB1_VBUS_PIN= CONFIG_USB2_VBUS_PIN=PH6 CONFIG_VIDEO_LCD_MODE=x:1024,y:600,depth:18,pclk_khz:51000,le:45,ri:274,up:22,lo:12,hs:1,vs:1,sync:3,vmode:0 diff --git a/configs/Inet_86VS_defconfig b/configs/Inet_86VS_defconfig index ce9985a..50c073a 100644 --- a/configs/Inet_86VS_defconfig +++ b/configs/Inet_86VS_defconfig @@ -3,6 +3,7 @@ CONFIG_SYS_EXTRA_OPTIONS=AXP209_POWER CONFIG_FDTFILE=sun5i-a13-inet-86vs.dtb CONFIG_USB_MUSB_SUNXI=y CONFIG_USB0_VBUS_PIN=PG12 +CONFIG_USB0_VBUS_DET=PG1 CONFIG_VIDEO_LCD_MODE=x:800,y:480,depth:18,pclk_khz:33000,le:45,ri:209,up:22,lo:22,hs:1,vs:1,sync:3,vmode:0 CONFIG_VIDEO_LCD_POWER=AXP0-0 CONFIG_VIDEO_LCD_BL_EN=AXP0-1 diff --git a/configs/TZX-Q8-713B7_defconfig b/configs/TZX-Q8-713B7_defconfig index 7b7b9dd..c22286a 100644 --- a/configs/TZX-Q8-713B7_defconfig +++ b/configs/TZX-Q8-713B7_defconfig @@ -3,6 +3,7 @@ CONFIG_SYS_EXTRA_OPTIONS=CONS_INDEX=2,AXP209_POWER CONFIG_FDTFILE=sun5i-a13-tzx-q8-713b7.dtb CONFIG_USB_MUSB_SUNXI=y CONFIG_USB0_VBUS_PIN=PG12 +CONFIG_USB0_VBUS_DET=PG1 CONFIG_VIDEO_LCD_MODE=x:800,y:480,depth:18,pclk_khz:33000,le:87,ri:40,up:31,lo:13,hs:1,vs:1,sync:3,vmode:0 CONFIG_VIDEO_LCD_POWER=AXP0-0 CONFIG_VIDEO_LCD_BL_EN=AXP0-1 diff --git a/drivers/usb/musb-new/sunxi.c b/drivers/usb/musb-new/sunxi.c index 4646a3d..b77e938 100644 --- a/drivers/usb/musb-new/sunxi.c +++ b/drivers/usb/musb-new/sunxi.c @@ -22,7 +22,9 @@ */ #include common.h #include asm/arch/cpu.h +#include asm/arch/gpio.h #include asm/arch/usbc.h +#include asm-generic/gpio.h #include linux-compat.h #include musb_core.h @@ -224,6 +226,29 @@ static int sunxi_musb_init(struct musb *musb) pr_debug(%s():\n, __func__); + if (is_host_enabled(musb)) { + int vbus_det = sunxi_name_to_gpio(CONFIG_USB0_VBUS_DET); + if (vbus_det == -1) { + eprintf(Error invalid Vusb-det pin\n); + return -EINVAL; + } + + err = gpio_request(vbus_det, vbus0_det); + if (err) + return err; +
Re: [U-Boot] [U-boot][PATCH] keystone2: add support for UART download
On 02/16/2015 03:15 PM, Nishanth Menon wrote: On 02/16/2015 12:22 PM, Vitaly Andrianov wrote: Currently to flash u-boot image onto NAND or SPI NOR flash, very first time user need to use Code Composer Studio (CCS). This is cumbersome for an user not familiar with CCS. This patch add simpler procedure using uart boot mode for K2 EVMs. When UART bootmode is set and board is rebooted, the ROM boot loader transfers the image at the beginning of the MSMC. After the transfer please explain MSMC. is complete the boot-loader sets the PC to the first MSMC address 0x0c00. The u-boot.bin is linked to the address 0x0c001000. why not just shift u-boot.bin to start of MSMC address? We already have u-boot linked to the 0x0c001000 address. Why do we need to build another version for one time process. In order to use the u-boot.bin as an image for UART download, we need to add 4K zeros prefix that act as 1K NOP instructions before reaching 0xc001000. OR, add a relocation logic which saves the 1k NOP and resultant load time? Relocation logic to where? ROM bootloader? I can put a branch instruction at the beginning, but we still need 4k of pad, which will be loaded anyways. So, adding the branch will reduce several microseconds out of ~40 seconds. Signed-off-by: Vitaly Andrianov vita...@ti.com Acked-by: Murali Karicheri m-kariche...@ti.com Tested-by: Murali Karicheri m-kariche...@ti.com --- Makefile| 6 ++ board/ti/ks2_evm/README | 17 + 2 files changed, 23 insertions(+) diff --git a/Makefile b/Makefile index 36a9a28..7a86cac 100644 --- a/Makefile +++ b/Makefile @@ -940,6 +940,12 @@ u-boot-nand.gph: u-boot.bin FORCE $(call if_changed,mkimage) @dd if=/dev/zero bs=8 count=1 2/dev/null $@ +u-boot.uart.pad: + @dd if=/dev/zero bs=4 count=1024 2/dev/null $@ How about the cleaning up? is it not better to do this algorithmically? Cleaning up what? The u-boot.uart.pad is cleaned by the clean target. + +u-boot.uart: u-boot.uart.pad u-boot.bin FORCE + $(call if_changed,cat) + # x86 uses a large ROM. We fill it with 0xff, put the 16-bit stuff (including # reset vector) at the top, Intel ME descriptor at the bottom, and U-Boot in # the middle. diff --git a/board/ti/ks2_evm/README b/board/ti/ks2_evm/README index 9ee90a4..a1fc943 100644 --- a/board/ti/ks2_evm/README +++ b/board/ti/ks2_evm/README @@ -81,6 +81,23 @@ To build u-boot-nand.gph make k2hk_evm_defconfig make u-boot-nand.gph +To build u-boot.uart + make k2hk_evm_defconfig + make u-boot.uart + + extra EOL? Will remove +Load and Run U-Boot on keystone EVMs using UART download + + +Open BMC and regular UART terminals. + +1. On the regular UART port start xmodem transfer of the u-boot.uart +2. Using BMC terminal set the ARM-UART bootmode and reboot the EVM + BMC bootmode #4 + MBC reboot +3. When xmodem is complete you should see the u-boot starts on the UART port This is hard to do in practice. At times when one has regular OS running already in uart port, it tends to mess up xmodem before we switch terminal and issue bootmode #4 and reboot to BMC. instead, the only failsafe sequence I could come up with is as follows: All point to have uart download is when the flashed u-boot is broken and board doesn't boot up at all. In that case it cannot run regular OS you are talking about. If u-boot can run regular OS, it can also upgrade the u-boot by itself. In this method, we use xmodem to download and start the modified version of uart binary to the target over serial port. Open the BCM and regular UART port at 115200n8 configuration. Steps are rather trivial: 1. At the BCM terminal, select the following to configure DSP noboot: bootmode #15 reboot This should prevent any existing bootloader OR OS from starting up on UART 2. Start Xmodem transfer of the file u-boot-uart.gph on the regular UART port using minicom OR appropriate terminal emulator. 3. At the BCM terminal, Switch over to UART mode and restart. bootmode #4 reboot 4. At the UART terminal, the transfer completes and u-boot startsup. This may be used to download and flash u-boot to nand/spi etc. + + extra EOL? Will remove Load and Run U-Boot on keystone EVMs using CCS = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [U-boot][PATCH] keystone2: add support for UART download
On 02/16/2015 02:56 PM, Vitaly Andrianov wrote: On 02/16/2015 03:15 PM, Nishanth Menon wrote: On 02/16/2015 12:22 PM, Vitaly Andrianov wrote: Currently to flash u-boot image onto NAND or SPI NOR flash, very first time user need to use Code Composer Studio (CCS). This is cumbersome for an user not familiar with CCS. This patch add simpler procedure using uart boot mode for K2 EVMs. When UART bootmode is set and board is rebooted, the ROM boot loader transfers the image at the beginning of the MSMC. After the transfer please explain MSMC. is complete the boot-loader sets the PC to the first MSMC address 0x0c00. The u-boot.bin is linked to the address 0x0c001000. why not just shift u-boot.bin to start of MSMC address? We already have u-boot linked to the 0x0c001000 address. Why do we need to build another version for one time process. Why is it a one time process? consider continuous integration(CI) model for validating u-boot - UART mode is perfect for such an automated testing - flash over uart, test basic boot, reflash over to SPI and NAND and test that as well. we can do it as frequently as we want and ensure that any user of k2* board will get the exact functional experience no matter which u-boot revision they pick. In order to use the u-boot.bin as an image for UART download, we need to add 4K zeros prefix that act as 1K NOP instructions before reaching 0xc001000. OR, add a relocation logic which saves the 1k NOP and resultant load time? Relocation logic to where? ROM bootloader? I can put a branch instruction at the beginning, but we still need 4k of pad, which will be loaded anyways. So, adding the branch will reduce several microseconds out of ~40 seconds. I thought u-boot was always position independent code with relocate_code being invoked to move to position dependent logic. Was'nt this the standard procedure for u-boot to let u-boot to be downloaded to any address? I wonder if something is broke or dependent now... Anyways, ignore the overall 40 second angle for a moment- that is OS dependent and there is tons of optimizations at different layers for the same - and that has nothing to do with the objective of the patch :). If we do have relocation logic functional, then we should be able to execute off a proper address and relocate off to a safe location. but i suspect the link address at 0xc001000 might indicate that there is no safe way to relocate when loaded up at 0xc00, given the size of u-boot.bin. solution must then be to move it linking off 0xc001000 to somewhere else. Signed-off-by: Vitaly Andrianov vita...@ti.com Acked-by: Murali Karicheri m-kariche...@ti.com Tested-by: Murali Karicheri m-kariche...@ti.com --- Makefile| 6 ++ board/ti/ks2_evm/README | 17 + 2 files changed, 23 insertions(+) diff --git a/Makefile b/Makefile index 36a9a28..7a86cac 100644 --- a/Makefile +++ b/Makefile @@ -940,6 +940,12 @@ u-boot-nand.gph: u-boot.bin FORCE $(call if_changed,mkimage) @dd if=/dev/zero bs=8 count=1 2/dev/null $@ +u-boot.uart.pad: + @dd if=/dev/zero bs=4 count=1024 2/dev/null $@ How about the cleaning up? is it not better to do this algorithmically? Cleaning up what? The u-boot.uart.pad is cleaned by the clean target. Uggh.. I missed the following rule and was wondering how did u-boot.uart.pad (a new file entry) get cleaned up. CLOBBER_FILES += u-boot* MLO* SPL System.map do we need to update .gitignore? + +u-boot.uart: u-boot.uart.pad u-boot.bin FORCE + $(call if_changed,cat) + # x86 uses a large ROM. We fill it with 0xff, put the 16-bit stuff (including # reset vector) at the top, Intel ME descriptor at the bottom, and U-Boot in # the middle. diff --git a/board/ti/ks2_evm/README b/board/ti/ks2_evm/README index 9ee90a4..a1fc943 100644 --- a/board/ti/ks2_evm/README +++ b/board/ti/ks2_evm/README @@ -81,6 +81,23 @@ To build u-boot-nand.gph make k2hk_evm_defconfig make u-boot-nand.gph +To build u-boot.uart + make k2hk_evm_defconfig + make u-boot.uart + + extra EOL? Will remove +Load and Run U-Boot on keystone EVMs using UART download + + +Open BMC and regular UART terminals. + +1. On the regular UART port start xmodem transfer of the u-boot.uart +2. Using BMC terminal set the ARM-UART bootmode and reboot the EVM + BMC bootmode #4 + MBC reboot +3. When xmodem is complete you should see the u-boot starts on the UART port This is hard to do in practice. At times when one has regular OS running already in uart port, it tends to mess up xmodem before we switch terminal and issue bootmode #4 and reboot to BMC. instead, the only failsafe sequence I could come up with is as follows: All point to have uart download is when the flashed u-boot is broken and board doesn't boot up at all. In that case it cannot run regular OS you are talking
[U-Boot] [PATCH 2/4] mmc: fsl_esdhc: Add support to force VSELECT set
Some boards cannot do voltage negotiation but need to set the VSELECT bit forcely to ensure it to work at 1.8V. This commit adds CONFIG_SYS_FSL_ESDHC_FORCE_VSELECT flag for this use. Signed-off-by: Otavio Salvador ota...@ossystems.com.br --- doc/README.fsl-esdhc| 1 + drivers/mmc/fsl_esdhc.c | 4 2 files changed, 5 insertions(+) diff --git a/doc/README.fsl-esdhc b/doc/README.fsl-esdhc index b70f271..619c6b2 100644 --- a/doc/README.fsl-esdhc +++ b/doc/README.fsl-esdhc @@ -1,5 +1,6 @@ CONFIG_SYS_FSL_ESDHC_LE means ESDHC IP is in little-endian mode. CONFIG_SYS_FSL_ESDHC_BE means ESDHC IP is in big-endian mode. +CONFIG_SYS_FSL_ESDHC_FORCE_VSELECT forces to run at 1.8V. Accessing ESDHC registers can be determined by ESDHC IP's endian mode or processor's endian mode. diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c index eb0fbf9..5fde2b6 100644 --- a/drivers/mmc/fsl_esdhc.c +++ b/drivers/mmc/fsl_esdhc.c @@ -524,6 +524,10 @@ static int esdhc_init(struct mmc *mmc) /* Set timout to the maximum value */ esdhc_clrsetbits32(regs-sysctl, SYSCTL_TIMEOUT_MASK, 14 16); +#ifdef CONFIG_SYS_FSL_ESDHC_FORCE_VSELECT + esdhc_setbits32(regs-vendorspec, ESDHC_VENDORSPEC_VSELECT); +#endif + return 0; } -- 2.1.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/4] mmc: fsl_esdhc: Add CMD11 support to switch to 1.8V
This adds support to switch to 1.8V in case CMD11 succeeds. Signed-off-by: Otavio Salvador ota...@ossystems.com.br --- drivers/mmc/fsl_esdhc.c | 30 +++--- include/fsl_esdhc.h | 2 ++ include/mmc.h | 1 + 3 files changed, 26 insertions(+), 7 deletions(-) diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c index c55eb28..eb0fbf9 100644 --- a/drivers/mmc/fsl_esdhc.c +++ b/drivers/mmc/fsl_esdhc.c @@ -54,19 +54,21 @@ struct fsl_esdhc { uintfevt; /* Force event register */ uintadmaes; /* ADMA error status register */ uintadsaddr;/* ADMA system address register */ - charreserved2[160]; /* reserved */ + charreserved2[100]; /* reserved */ + uintvendorspec; /* Vendor Specific register */ + charreserved3[59]; /* reserved */ uinthostver;/* Host controller version register */ - charreserved3[4]; /* reserved */ - uintdmaerraddr; /* DMA error address register */ charreserved4[4]; /* reserved */ - uintdmaerrattr; /* DMA error attribute register */ + uintdmaerraddr; /* DMA error address register */ charreserved5[4]; /* reserved */ + uintdmaerrattr; /* DMA error attribute register */ + charreserved6[4]; /* reserved */ uinthostcapblt2;/* Host controller capabilities register 2 */ - charreserved6[8]; /* reserved */ + charreserved7[8]; /* reserved */ uinttcr;/* Tuning control register */ - charreserved7[28]; /* reserved */ + charreserved8[28]; /* reserved */ uintsddirctl; /* SD direction control register */ - charreserved8[712]; /* reserved */ + charreserved9[712]; /* reserved */ uintscr;/* eSDHC control register */ }; @@ -341,6 +343,15 @@ esdhc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data) goto out; } + /* Switch voltage to 1.8V if CMD11 succeeded */ + if (cmd-cmdidx == SD_CMD_SWITCH_UHS18V) { + esdhc_setbits32(regs-vendorspec, ESDHC_VENDORSPEC_VSELECT); + + printf(Run CMD11 1.8V switch\n); + /* Sleep for 5 ms - max time for card to switch to 1.8V */ + udelay(5000); + } + /* Workaround for ESDHC errata ENGcm03648 */ if (!data (cmd-resp_type MMC_RSP_BUSY)) { int timeout = 2500; @@ -413,6 +424,11 @@ out: while ((esdhc_read32(regs-sysctl) SYSCTL_RSTD)) ; } + + /* If this was CMD11, then notify that power cycle is needed */ + if (cmd-cmdidx == SD_CMD_SWITCH_UHS18V) + printf(CMD11 to switch to 1.8V mode failed. + Card requires power cycle\n); } esdhc_write32(regs-irqstat, -1); diff --git a/include/fsl_esdhc.h b/include/fsl_esdhc.h index c1b6648..e3d6581 100644 --- a/include/fsl_esdhc.h +++ b/include/fsl_esdhc.h @@ -154,6 +154,8 @@ #define ESDHC_HOSTCAPBLT_DMAS 0x0040 #define ESDHC_HOSTCAPBLT_HSS 0x0020 +#define ESDHC_VENDORSPEC_VSELECT 0x0002 /* Use 1.8V */ + struct fsl_esdhc_cfg { u32 esdhc_base; u32 sdhc_clk; diff --git a/include/mmc.h b/include/mmc.h index 56d97bb..e4b071e 100644 --- a/include/mmc.h +++ b/include/mmc.h @@ -88,6 +88,7 @@ #define SD_CMD_SEND_RELATIVE_ADDR 3 #define SD_CMD_SWITCH_FUNC 6 #define SD_CMD_SEND_IF_COND8 +#define SD_CMD_SWITCH_UHS18V 11 #define SD_CMD_APP_SET_BUS_WIDTH 6 #define SD_CMD_ERASE_WR_BLK_START 32 -- 2.1.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 4/4] warp: Add initial WaRP Board support
The WaRP Board is a Wearable Reference Plaform. The board features: - Freescale i.MX6 SoloLite processor with 512MB of RAM - Freescale FXOS8700CQ 6-axis Xtrinsic sensor - Freescale Kinetis KL16 MCU - Freescale Xtrinsic MMA955xL intelligent motion sensing platform The board implements a hybrid architecture to address the evolving needs of the wearables market. The platform consists of a main board and an example daughtercard with the ability to add additional daughtercards for different usage models. For more information about the project, visit: http://www.warpboard.org/ Signed-off-by: Otavio Salvador ota...@ossystems.com.br --- arch/arm/Kconfig | 5 ++ board/warp/Kconfig | 12 +++ board/warp/MAINTAINERS | 6 ++ board/warp/Makefile| 8 ++ board/warp/warp.c | 113 configs/warp_defconfig | 3 + include/configs/warp.h | 198 + 7 files changed, 345 insertions(+) create mode 100644 board/warp/Kconfig create mode 100644 board/warp/MAINTAINERS create mode 100644 board/warp/Makefile create mode 100644 board/warp/warp.c create mode 100644 configs/warp_defconfig create mode 100644 include/configs/warp.h diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 1f1ccad..a3eb876 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -608,6 +608,10 @@ config TARGET_WANDBOARD bool Support wandboard select CPU_V7 +config TARGET_WARP + bool Support WaRP + select CPU_V7 + config TARGET_TITANIUM bool Support titanium select CPU_V7 @@ -1013,6 +1017,7 @@ source board/ttcontrol/vision2/Kconfig source board/udoo/Kconfig source board/vpac270/Kconfig source board/wandboard/Kconfig +source board/warp/Kconfig source board/woodburn/Kconfig source board/xaeniax/Kconfig source board/zipitz2/Kconfig diff --git a/board/warp/Kconfig b/board/warp/Kconfig new file mode 100644 index 000..7b569cc --- /dev/null +++ b/board/warp/Kconfig @@ -0,0 +1,12 @@ +if TARGET_WARP + +config SYS_BOARD + default warp + +config SYS_SOC + default mx6 + +config SYS_CONFIG_NAME + default warp + +endif diff --git a/board/warp/MAINTAINERS b/board/warp/MAINTAINERS new file mode 100644 index 000..ee2114d --- /dev/null +++ b/board/warp/MAINTAINERS @@ -0,0 +1,6 @@ +WaRP BOARD +M: Otavio Salvador ota...@ossystems.com.br +S: Maintained +F: board/warp/ +F: include/configs/warp.h +F: configs/warp_defconfig diff --git a/board/warp/Makefile b/board/warp/Makefile new file mode 100644 index 000..c555f87 --- /dev/null +++ b/board/warp/Makefile @@ -0,0 +1,8 @@ +# Copyright (C) 2014 O.S. Systems Software LTDA. +# Copyright (C) 2014 Kynetics LLC. +# Copyright (C) 2014 Revolution Robotics, Inc. +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y := warp.o diff --git a/board/warp/warp.c b/board/warp/warp.c new file mode 100644 index 000..3b275c2 --- /dev/null +++ b/board/warp/warp.c @@ -0,0 +1,113 @@ +/* + * Copyright (C) 2014, 2015 O.S. Systems Software LTDA. + * Copyright (C) 2014 Kynetics LLC. + * Copyright (C) 2014 Revolution Robotics, Inc. + * + * Author: Otavio Salvador ota...@ossystems.com.br + * + * SPDX-License-Identifier:GPL-2.0+ + */ + +#include asm/arch/clock.h +#include asm/arch/iomux.h +#include asm/arch/imx-regs.h +#include asm/arch/mx6-pins.h +#include asm/arch/sys_proto.h +#include asm/gpio.h +#include asm/imx-common/iomux-v3.h +#include asm/io.h +#include linux/sizes.h +#include common.h +#include watchdog.h +#include fsl_esdhc.h +#include mmc.h + +DECLARE_GLOBAL_DATA_PTR; + +#define UART_PAD_CTRL (PAD_CTL_PUS_100K_UP | \ + PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | \ + PAD_CTL_SRE_FAST | PAD_CTL_HYS | \ + PAD_CTL_LVE) + +#define USDHC_PAD_CTRL (PAD_CTL_PUS_22K_UP | \ + PAD_CTL_SPEED_LOW | PAD_CTL_DSE_80ohm | \ + PAD_CTL_SRE_FAST | PAD_CTL_HYS | \ + PAD_CTL_LVE) + +int dram_init(void) +{ + gd-ram_size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE); + + return 0; +} + +static void setup_iomux_uart(void) +{ + static iomux_v3_cfg_t const uart1_pads[] = { + MX6_PAD_UART1_TXD__UART1_TXD | MUX_PAD_CTRL(UART_PAD_CTRL), + MX6_PAD_UART1_RXD__UART1_RXD | MUX_PAD_CTRL(UART_PAD_CTRL), + }; + + imx_iomux_v3_setup_multiple_pads(uart1_pads, ARRAY_SIZE(uart1_pads)); +} + +static struct fsl_esdhc_cfg usdhc_cfg[1] = { + {USDHC2_BASE_ADDR}, +}; + +int board_mmc_getcd(struct mmc *mmc) +{ + return 1; /* Assume boot SD always present */ +} + +int board_mmc_init(bd_t *bis) +{ + static iomux_v3_cfg_t const usdhc2_pads[] = { + MX6_PAD_SD2_CLK__USDHC2_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL), + MX6_PAD_SD2_CMD__USDHC2_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL), + MX6_PAD_SD2_RST__USDHC2_RST | MUX_PAD_CTRL(USDHC_PAD_CTRL), + MX6_PAD_SD2_DAT0__USDHC2_DAT0 | MUX_PAD_CTRL(USDHC_PAD_CTRL), +
[U-Boot] [PATCH 3/4] imx: mx6sl: Extend USDHC SD2 pins to support 8-wire use
This adds the DATA[4-7] and RST pin definitions. Signed-off-by: Otavio Salvador ota...@ossystems.com.br --- arch/arm/include/asm/arch-mx6/mx6sl_pins.h | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm/include/asm/arch-mx6/mx6sl_pins.h b/arch/arm/include/asm/arch-mx6/mx6sl_pins.h index 9ded3d8..10a4a1e 100644 --- a/arch/arm/include/asm/arch-mx6/mx6sl_pins.h +++ b/arch/arm/include/asm/arch-mx6/mx6sl_pins.h @@ -31,7 +31,12 @@ enum { MX6_PAD_SD2_DAT1__USDHC2_DAT1 = IOMUX_PAD(0x0568, 0x0260, 0, 0x, 0, 0), MX6_PAD_SD2_DAT2__USDHC2_DAT2 = IOMUX_PAD(0x056C, 0x0264, 0, 0x, 0, 0), MX6_PAD_SD2_DAT3__USDHC2_DAT3 = IOMUX_PAD(0x0570, 0x0268, 0, 0x, 0, 0), + MX6_PAD_SD2_DAT4__USDHC2_DAT4 = IOMUX_PAD(0X0574, 0X026C, 0, 0X, 0, 0), + MX6_PAD_SD2_DAT5__USDHC2_DAT5 = IOMUX_PAD(0X0578, 0X0270, 0, 0X, 0, 0), + MX6_PAD_SD2_DAT6__USDHC2_DAT6 = IOMUX_PAD(0X057C, 0X0274, 0, 0X, 0, 0), + MX6_PAD_SD2_DAT7__USDHC2_DAT7 = IOMUX_PAD(0X0580, 0X0278, 0, 0X, 0, 0), MX6_PAD_SD2_DAT7__GPIO_5_0 = IOMUX_PAD(0x0580, 0x0278, 5, 0x, 0, 0), + MX6_PAD_SD2_RST__USDHC2_RST = IOMUX_PAD(0x0584, 0x027C, 0, 0x, 0, 0), MX6_PAD_SD3_CLK__USDHC3_CLK = IOMUX_PAD(0x0588, 0x0280, 0, 0x, 0, 0), MX6_PAD_SD3_CMD__USDHC3_CMD = IOMUX_PAD(0x058C, 0x0284, 0, 0x, 0, 0), MX6_PAD_SD3_DAT0__USDHC3_DAT0 = IOMUX_PAD(0x0590, 0x0288, 0, 0x, 0, 0), -- 2.1.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCHv1 10/22] arm: socfpga: spl: add sdram init and calibration
On Wed 2015-01-14 10:40:50, dingu...@opensource.altera.com wrote: From: Dinh Nguyen dingu...@opensource.altera.com Add a call to checkboard along with sdram intilialization and calibration. /* enable console uart printing */ preloader_console_init(); + + checkboard(); + + if (sdram_mmr_init_full(0x) != 0) + hang(); + puts(SDRAM: Calibrating PHY\n); + /* SDRAM calibration */ + if (sdram_calibration_full() == 0) + hang(); } You might want to standartize on == 0 ok, 0 errno returned Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCHv1 07/22] arm: socfpga: spl: enable sdram, timer and uart
On Wed 2015-01-14 10:40:47, dingu...@opensource.altera.com wrote: From: Dinh Nguyen dingu...@opensource.altera.com Signed-off-by: Dinh Nguyen dingu...@opensource.altera.com Acked-by: Pavel Machek pa...@ucw.cz -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCHv1 09/22] arm: socfpga: spl: allow bootrom to enable IOs after warm reset
On Wed 2015-01-14 10:40:49, dingu...@opensource.altera.com wrote: From: Dinh Nguyen dingu...@opensource.altera.com Signed-off-by: Dinh Nguyen dingu...@opensource.altera.com Acked-by: Pavel Machek pa...@ucw.cz ...Actually, you can merge this with 7/10, I guess. One 2000 lines patch + twenty 10 line patches is not interesting form of series :-). -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] am43xx_evm: Add netboot and related to environment
On 02/16/2015 02:59 PM, Franklin S Cooper Jr wrote: From: Tom Rini tr...@ti.com Signed-off-by: Tom Rini tr...@ti.com --- include/configs/am43xx_evm.h | 16 1 file changed, 16 insertions(+) diff --git a/include/configs/am43xx_evm.h b/include/configs/am43xx_evm.h index 7ccbf36..44b6f93 100644 --- a/include/configs/am43xx_evm.h +++ b/include/configs/am43xx_evm.h @@ -168,6 +168,10 @@ usbroot=/dev/sda2 rw\0 \ usbrootfstype=ext4 rootwait\0 \ usbdev=0\0 \ + rootpath=/export/rootfs\0 \ + nfsopts=nolock\0 \ + static_ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname} \ + ::off\0 \ ramroot=/dev/ram0 rw\0 \ ramrootfstype=ext2\0 \ mmcargs=setenv bootargs console=${console} \ @@ -178,6 +182,11 @@ ${optargs} \ root=${usbroot} \ rootfstype=${usbrootfstype}\0 \ + netargs=setenv bootargs console=${console} \ + ${optargs} \ + root=/dev/nfs \ + nfsroot=${serverip}:${rootpath},${nfsopts} rw \ + ip=dhcp\0 \ bootenv=uEnv.txt\0 \ loadbootenv=load ${devtype} ${devnum} ${loadaddr} ${bootenv}\0 \ importbootenv=echo Importing environment from mmc ...; \ @@ -229,6 +238,13 @@ bootz ${loadaddr} - ${fdtaddr}; \ fi; \ fi\0 \ + netboot=echo Booting from network ...; \ + setenv autoload no; \ + dhcp; \ + tftp ${loadaddr} ${bootfile}; \ + tftp ${fdtaddr} ${fdtfile}; \ + run netargs; \ + bootz ${loadaddr} - ${fdtaddr}\0 \ findfdt=\ if test $board_name = AM43EPOS; then \ setenv fdtfile am43x-epos-evm.dtb; fi; \ Should we start introducing generic macros in v7_common.h ? that'd let all network enabled platforms to uniformly provide this? -- Regards, Nishanth Menon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] am43xx_evm: Add netboot and related to environment
-Original Message- From: Menon, Nishanth Sent: Monday, February 16, 2015 4:03 PM To: Cooper Jr., Franklin; u-boot@lists.denx.de Cc: Rini, Tom Subject: Re: [U-Boot] [PATCH] am43xx_evm: Add netboot and related to environment On 02/16/2015 02:59 PM, Franklin S Cooper Jr wrote: From: Tom Rini tr...@ti.com Signed-off-by: Tom Rini tr...@ti.com --- include/configs/am43xx_evm.h | 16 1 file changed, 16 insertions(+) diff --git a/include/configs/am43xx_evm.h b/include/configs/am43xx_evm.h index 7ccbf36..44b6f93 100644 --- a/include/configs/am43xx_evm.h +++ b/include/configs/am43xx_evm.h @@ -168,6 +168,10 @@ usbroot=/dev/sda2 rw\0 \ usbrootfstype=ext4 rootwait\0 \ usbdev=0\0 \ + rootpath=/export/rootfs\0 \ + nfsopts=nolock\0 \ + static_ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname} \ + ::off\0 \ ramroot=/dev/ram0 rw\0 \ ramrootfstype=ext2\0 \ mmcargs=setenv bootargs console=${console} \ @@ -178,6 +182,11 @@ ${optargs} \ root=${usbroot} \ rootfstype=${usbrootfstype}\0 \ + netargs=setenv bootargs console=${console} \ + ${optargs} \ + root=/dev/nfs \ + nfsroot=${serverip}:${rootpath},${nfsopts} rw \ + ip=dhcp\0 \ bootenv=uEnv.txt\0 \ loadbootenv=load ${devtype} ${devnum} ${loadaddr} ${bootenv}\0 \ importbootenv=echo Importing environment from mmc ...; \ @@ -229,6 +238,13 @@ bootz ${loadaddr} - ${fdtaddr}; \ fi; \ fi\0 \ + netboot=echo Booting from network ...; \ + setenv autoload no; \ + dhcp; \ + tftp ${loadaddr} ${bootfile}; \ + tftp ${fdtaddr} ${fdtfile}; \ + run netargs; \ + bootz ${loadaddr} - ${fdtaddr}\0 \ findfdt=\ if test $board_name = AM43EPOS; then \ setenv fdtfile am43x-epos-evm.dtb; fi; \ Should we start introducing generic macros in v7_common.h ? that'd let all network enabled platforms to uniformly provide this? [Franklin] I see no issue with that. We should probably do the same for mmc, usb and probably some other peripherals. It won't really change anything for 335x, 437x and am57x TI evms but users of non TI boards or other TI SOCs may have an issue. -- Regards, Nishanth Menon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC PATCH v3 11/14] dm: eth: Add support for aliases
On Sun, Feb 15, 2015 at 9:50 AM, Simon Glass s...@chromium.org wrote: Hi Joe, On 10 February 2015 at 18:30, Joe Hershberger joe.hershber...@ni.com wrote: Allow network devices to be referred to as eth0 instead of eth@12345678 when specified in ethact. Add tests to verify this behavior. Signed-off-by: Joe Hershberger joe.hershber...@ni.com --- Changes in v3: -Added support for aliases Changes in v2: None include/configs/sandbox.h | 4 ++-- include/fdtdec.h | 1 + include/net.h | 5 + lib/fdtdec.c | 1 + net/eth.c | 53 +++ test/dm/eth.c | 25 ++ test/dm/test.dts | 10 + 7 files changed, 84 insertions(+), 15 deletions(-) diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h index fdba1c8..9df5f74 100644 --- a/include/configs/sandbox.h +++ b/include/configs/sandbox.h @@ -187,7 +187,7 @@ stderr=serial,lcd\0 \ ethaddr=00:00:11:22:33:44\0 \ eth1addr=00:00:11:22:33:45\0 \ - eth2addr=00:00:11:22:33:46\0 \ + eth5addr=00:00:11:22:33:46\0 \ ipaddr=1.2.3.4\0 #else @@ -196,7 +196,7 @@ stderr=serial,lcd\0 \ ethaddr=00:00:11:22:33:44\0 \ eth1addr=00:00:11:22:33:45\0 \ - eth2addr=00:00:11:22:33:46\0 \ + eth5addr=00:00:11:22:33:46\0 \ ipaddr=1.2.3.4\0 #endif diff --git a/include/fdtdec.h b/include/fdtdec.h index 231eed7..e945baa 100644 --- a/include/fdtdec.h +++ b/include/fdtdec.h @@ -167,6 +167,7 @@ enum fdt_compat_id { COMPAT_INTEL_GMA, /* Intel Graphics Media Accelerator */ COMPAT_AMS_AS3722, /* AMS AS3722 PMIC */ COMPAT_INTEL_ICH_SPI, /* Intel ICH7/9 SPI controller */ + COMPAT_ETHERNET,/* Ethernet devices */ SANDBOX_ETHERNET This is not limited to sandbox. This is needed for all Ethernet MACs. Is there some other way that I should be identifying with all devices in the device tree of a certain class? COMPAT_COUNT, }; diff --git a/include/net.h b/include/net.h index 11471bd..4e98850 100644 --- a/include/net.h +++ b/include/net.h @@ -38,6 +38,8 @@ #define PKTALIGN ARCH_DMA_MINALIGN +#define ETH_MAX_DEVS 32 + /* IPv4 addresses are always 32 bits in size */ typedef __be32 IPaddr_t; @@ -79,6 +81,8 @@ enum eth_state_t { }; #ifdef CONFIG_DM_ETH +#define ETH_ALIAS_ROOT eth + struct eth_pdata { phys_addr_t iobase; unsigned char enetaddr[6]; @@ -96,6 +100,7 @@ struct eth_ops { }; struct udevice *eth_get_dev(void); /* get the current device */ +struct udevice *eth_get_dev_by_name(const char *devname); unsigned char *eth_get_ethaddr(void); /* get the current device MAC */ int eth_init_state_only(bd_t *bis); /* Set active state */ void eth_halt_state_only(void); /* Set passive state */ diff --git a/lib/fdtdec.c b/lib/fdtdec.c index 5bf8f29..33b0a53 100644 --- a/lib/fdtdec.c +++ b/lib/fdtdec.c @@ -75,6 +75,7 @@ static const char * const compat_names[COMPAT_COUNT] = { COMPAT(INTEL_GMA, intel,gma), COMPAT(AMS_AS3722, ams,as3722), COMPAT(INTEL_ICH_SPI, intel,ich-spi), + COMPAT(ETHERNET, eth), sandbox,eth Again, this is used to identify all Ethernet controllers. Perhaps fdtdec_find_aliases_for_id() should not be limiting the alias search to those that have a certain compatible string? }; const char *fdtdec_get_compatible(enum fdt_compat_id id) diff --git a/net/eth.c b/net/eth.c index e84b948..762effe 100644 --- a/net/eth.c +++ b/net/eth.c @@ -10,11 +10,14 @@ #include command.h #include dm.h #include dm/device-internal.h +#include fdtdec.h #include net.h #include miiphy.h #include phy.h #include asm/errno.h +DECLARE_GLOBAL_DATA_PTR; + void eth_parse_enetaddr(const char *addr, uchar *enetaddr) { char *end; @@ -121,6 +124,39 @@ static void eth_set_dev(struct udevice *dev) uc_priv-current = dev; } +/* + * Find the udevice that either has the name passed in as devname or has an + * alias named devname. + */ +struct udevice *eth_get_dev_by_name(const char *devname) +{ + int node_list[ETH_MAX_DEVS]; + int count; + int seq; + char *endp = NULL; + const char *true_name = devname; + struct udevice *it; +
Re: [U-Boot] [PATCH] am43xx_evm: Add netboot and related to environment
On Mon, Feb 16, 2015 at 10:54:56PM +, Cooper Jr., Franklin wrote: -Original Message- From: Menon, Nishanth Sent: Monday, February 16, 2015 4:03 PM To: Cooper Jr., Franklin; u-boot@lists.denx.de Cc: Rini, Tom Subject: Re: [U-Boot] [PATCH] am43xx_evm: Add netboot and related to environment On 02/16/2015 02:59 PM, Franklin S Cooper Jr wrote: From: Tom Rini tr...@ti.com Signed-off-by: Tom Rini tr...@ti.com --- include/configs/am43xx_evm.h | 16 1 file changed, 16 insertions(+) diff --git a/include/configs/am43xx_evm.h b/include/configs/am43xx_evm.h index 7ccbf36..44b6f93 100644 --- a/include/configs/am43xx_evm.h +++ b/include/configs/am43xx_evm.h @@ -168,6 +168,10 @@ usbroot=/dev/sda2 rw\0 \ usbrootfstype=ext4 rootwait\0 \ usbdev=0\0 \ + rootpath=/export/rootfs\0 \ + nfsopts=nolock\0 \ + static_ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname} \ + ::off\0 \ ramroot=/dev/ram0 rw\0 \ ramrootfstype=ext2\0 \ mmcargs=setenv bootargs console=${console} \ @@ -178,6 +182,11 @@ ${optargs} \ root=${usbroot} \ rootfstype=${usbrootfstype}\0 \ + netargs=setenv bootargs console=${console} \ + ${optargs} \ + root=/dev/nfs \ + nfsroot=${serverip}:${rootpath},${nfsopts} rw \ + ip=dhcp\0 \ bootenv=uEnv.txt\0 \ loadbootenv=load ${devtype} ${devnum} ${loadaddr} ${bootenv}\0 \ importbootenv=echo Importing environment from mmc ...; \ @@ -229,6 +238,13 @@ bootz ${loadaddr} - ${fdtaddr}; \ fi; \ fi\0 \ + netboot=echo Booting from network ...; \ + setenv autoload no; \ + dhcp; \ + tftp ${loadaddr} ${bootfile}; \ + tftp ${fdtaddr} ${fdtfile}; \ + run netargs; \ + bootz ${loadaddr} - ${fdtaddr}\0 \ findfdt=\ if test $board_name = AM43EPOS; then \ setenv fdtfile am43x-epos-evm.dtb; fi; \ Should we start introducing generic macros in v7_common.h ? that'd let all network enabled platforms to uniformly provide this? [Franklin] I see no issue with that. We should probably do the same for mmc, usb and probably some other peripherals. It won't really change anything for 335x, 437x and am57x TI evms but users of non TI boards or other TI SOCs may have an issue. And at that point adopt some of the generic distro boot command patches that have been posted for am335x to be to ti_armv7_common.h and update that generic framework as needed for netboot, etc? -- 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] [U-Boot, v2, 8/8] lpc32xx: add support for board work_92105
On Thu, Feb 12, 2015 at 06:37:07PM +0100, Albert ARIBAUD (3ADEV) wrote: Work_92105 from Work Microwave is an LPC3250- based board with the following features: - 64MB SDR DRAM - 1 GB SLC NAND, managed through MLC controller. - Ethernet - Ethernet + PHY SMSC8710 - I2C: - EEPROM (24M01-compatible) - RTC (DS1374-compatible) - Temperature sensor (DS620) - DACs (2 x MAX518) - SPI (through SSP interface) - Port expander MAX6957 - LCD display (HD44780-compatible), controlled through the port expander and DACs This board has SPL support, and uses the LPC32XX boot image format. Signed-off-by: Albert ARIBAUD (3ADEV) albert.arib...@3adev.fr This adds a warning about CONFIG_CMD_DM being redefined for every file, please fix. 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] [PATCH 2/4] mmc: fsl_esdhc: Add support to force VSELECT set
On 2/16/2015 2:38 PM, Otavio Salvador wrote: Some boards cannot do voltage negotiation but need to set the VSELECT bit forcely to ensure it to work at 1.8V. This commit adds CONFIG_SYS_FSL_ESDHC_FORCE_VSELECT flag for this use. Signed-off-by: Otavio Salvador ota...@ossystems.com.br --- doc/README.fsl-esdhc| 1 + drivers/mmc/fsl_esdhc.c | 4 2 files changed, 5 insertions(+) diff --git a/doc/README.fsl-esdhc b/doc/README.fsl-esdhc index b70f271..619c6b2 100644 --- a/doc/README.fsl-esdhc +++ b/doc/README.fsl-esdhc @@ -1,5 +1,6 @@ CONFIG_SYS_FSL_ESDHC_LE means ESDHC IP is in little-endian mode. CONFIG_SYS_FSL_ESDHC_BE means ESDHC IP is in big-endian mode. +CONFIG_SYS_FSL_ESDHC_FORCE_VSELECT forces to run at 1.8V. Accessing ESDHC registers can be determined by ESDHC IP's endian mode or processor's endian mode. diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c index eb0fbf9..5fde2b6 100644 --- a/drivers/mmc/fsl_esdhc.c +++ b/drivers/mmc/fsl_esdhc.c @@ -524,6 +524,10 @@ static int esdhc_init(struct mmc *mmc) /* Set timout to the maximum value */ esdhc_clrsetbits32(regs-sysctl, SYSCTL_TIMEOUT_MASK, 14 16); +#ifdef CONFIG_SYS_FSL_ESDHC_FORCE_VSELECT + esdhc_setbits32(regs-vendorspec, ESDHC_VENDORSPEC_VSELECT); +#endif + return 0; } What if 1 controller needs it set and another needs it clear? ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V3 3/3] rpi: add support for Raspberry Pi 2 model B
On Mon, Feb 16, 2015 at 12:16:15PM -0700, Stephen Warren wrote: USB doesn't seem to work yet; the controller detects the on-board Hub/ Ethernet device but can't read the descriptors from it. I haven't investigated yet. Signed-off-by: Stephen Warren swar...@wwwdotorg.org --- v3: Rebased on top of u-boot-dm merge. v2: Implement new board_rev decoding scheme, to avoid hard-coding the board revision onthe RPi 2. +(rpi_2) make[3]: *** No rule to make target `arch/arm/cpu/armv7/bcm2835/../../arm1176/bcm2835//init.o', needed by `arch/arm/cpu/armv7/bcm2835/built-in.o'. Stop. +(rpi_2) make[2]: *** [arch/arm/cpu/armv7/bcm2835] Error 2 +(rpi_2) make[1]: *** [arch/arm/cpu/armv7] Error 2 When I try and build it with buildman. Something get left out somewhere? 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] [PATCH 02/12] remove nowhere used symbol CONFIG_SYS_CLKS_IN_HZ
Hi Marcel, On 16/02/2015 13:14, Marcel Ziswiler wrote: Basically finish what the following commit started a long time ago: 488f5d8790c451fc527fe5d2ef218f2a5e40ea17 Signed-off-by: Marcel Ziswiler mar...@ziswiler.com --- include/configs/balloon3.h| 1 - include/configs/flea3.h | 2 -- include/configs/mx35pdk.h | 2 -- include/configs/palmld.h | 1 - include/configs/palmtc.h | 1 - include/configs/palmtreo680.h | 1 - include/configs/snowball.h| 1 - include/configs/ti816x_evm.h | 1 - include/configs/u8500_href.h | 1 - include/configs/vexpress_common.h | 1 - include/configs/woodburn_common.h | 2 -- include/configs/zipitz2.h | 1 - 12 files changed, 15 deletions(-) diff --git a/include/configs/balloon3.h b/include/configs/balloon3.h index 2f5a660..8dabc80 100644 For mx35pdk/woodburn: Acked-by: Stefano Babic sba...@denx.de Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [u-boot 32/40] usb: dwc3: Add chained TRB support for ep0
Hi, On Monday 16 February 2015 06:34 PM, Lukasz Majewski wrote: Hi Kishon, Hi Lukasz, On Monday 16 February 2015 05:12 PM, Lukasz Majewski wrote: Hi Kishon, dwc3 can do only max packet aligned transfers. So in case request length is not max packet aligned and is bigger than DWC3_EP0_BOUNCE_SIZE two chained TRBs is required to handle the transfer. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com --- drivers/usb/dwc3/ep0.c| 72 + drivers/usb/dwc3/gadget.c |2 +- 2 files changed, 55 insertions(+), 19 deletions(-) diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c index fce2558..c2fe0ec 100644 --- a/drivers/usb/dwc3/ep0.c +++ b/drivers/usb/dwc3/ep0.c @@ -48,7 +48,7 @@ static const char *dwc3_ep0_state_string(enum dwc3_ep0_state state) } static int dwc3_ep0_start_trans(struct dwc3 *dwc, u8 epnum, dma_addr_t buf_dma, - u32 len, u32 type) + u32 len, u32 type, unsigned chain) { struct dwc3_gadget_ep_cmd_params params; struct dwc3_trb *trb; @@ -62,7 +62,10 @@ static int dwc3_ep0_start_trans(struct dwc3 *dwc, u8 epnum, dma_addr_t buf_dma, return 0; } - trb = dwc-ep0_trb; + trb = dwc-ep0_trb[dep-free_slot]; + + if (chain) + dep-free_slot++; trb-bpl = lower_32_bits(buf_dma); trb-bph = upper_32_bits(buf_dma); @@ -70,13 +73,20 @@ static int dwc3_ep0_start_trans(struct dwc3 *dwc, u8 epnum, dma_addr_t buf_dma, trb-ctrl = type; trb-ctrl |= (DWC3_TRB_CTRL_HWO - | DWC3_TRB_CTRL_LST - | DWC3_TRB_CTRL_IOC | DWC3_TRB_CTRL_ISP_IMI); + if (chain) + trb-ctrl |= DWC3_TRB_CTRL_CHN; + else + trb-ctrl |= (DWC3_TRB_CTRL_IOC + | DWC3_TRB_CTRL_LST); + dwc3_flush_cache((int)buf_dma, len); dwc3_flush_cache((int)trb, sizeof(*trb)); + if (chain) + return 0; + memset(params, 0, sizeof(params)); params.param0 = upper_32_bits(dwc-ep0_trb_addr); params.param1 = lower_32_bits(dwc-ep0_trb_addr); @@ -289,7 +299,7 @@ void dwc3_ep0_out_start(struct dwc3 *dwc) int ret; ret = dwc3_ep0_start_trans(dwc, 0, dwc-ctrl_req_addr, 8, - DWC3_TRBCTL_CONTROL_SETUP); + DWC3_TRBCTL_CONTROL_SETUP, 0); WARN_ON(ret 0); } @@ -799,6 +809,23 @@ static void dwc3_ep0_complete_data(struct dwc3 *dwc, maxp = ep0-endpoint.maxpacket; + /* Handle the first TRB before handling the bounce buffer if the request Minor comment - please fix above comment. Sorry. Didn't get what should I fix here? The comment should be as follow: /* * Handle the first . * * */ The first line is wrong (/* Handle ...). ah.. alright. Thanks Kishon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/2] arm:aspenite: Convert to generic board
Enable CONFIG_SYS_GENERIC_BOARD for Marvell aspenite. Signed-off-by: Ajay Bhargav ajay.bhar...@einfochips.com --- include/configs/aspenite.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/configs/aspenite.h b/include/configs/aspenite.h index 727b14a..5258486 100644 --- a/include/configs/aspenite.h +++ b/include/configs/aspenite.h @@ -11,6 +11,11 @@ #define __CONFIG_ASPENITE_H /* + * Generic Board support + */ +#define CONFIG_SYS_GENERIC_BOARD + +/* * Version number information */ #define CONFIG_IDENT_STRING\nMarvell-Aspenite DB -- 2.3.0 * eInfochips Business Disclaimer: This e-mail message and all attachments transmitted with it are intended solely for the use of the addressee and may contain legally privileged and confidential information. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution, copying, or other use of this message or its attachments is strictly prohibited. If you have received this message in error, please notify the sender immediately by replying to this message and please delete it from your computer. Any views expressed in this message are those of the individual sender unless otherwise stated. Company has taken enough precautions to prevent the spread of viruses. However the company ac cepts no liability for any damage caused by any virus transmitted by this email. * ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 3/3] board/seco: Add mx6q-uq7 basic board support
Add basic SECO MX6Q/uQ7 board support (Ethernet, UART, SD are supported). It also adds a Kconfig skeleton to later add more SECO board (supporting SoC and board variants). Signed-off-by: Boris Brezillon boris.brezil...@free-electrons.com --- arch/arm/cpu/armv7/mx6/Kconfig| 11 +++ board/seco/Kconfig| 63 ++ board/seco/common/Makefile| 2 + board/seco/common/mx6.c | 137 ++ board/seco/common/mx6.h | 9 ++ board/seco/mx6quq7/Makefile | 7 ++ board/seco/mx6quq7/mx6quq7-2g.cfg | 173 ++ board/seco/mx6quq7/mx6quq7.c | 165 configs/secomx6quq7_defconfig | 7 ++ include/configs/secomx6quq7.h | 162 +++ 10 files changed, 736 insertions(+) create mode 100644 board/seco/Kconfig create mode 100644 board/seco/common/Makefile create mode 100644 board/seco/common/mx6.c create mode 100644 board/seco/common/mx6.h create mode 100644 board/seco/mx6quq7/Makefile create mode 100644 board/seco/mx6quq7/mx6quq7-2g.cfg create mode 100644 board/seco/mx6quq7/mx6quq7.c create mode 100644 configs/secomx6quq7_defconfig create mode 100644 include/configs/secomx6quq7.h diff --git a/arch/arm/cpu/armv7/mx6/Kconfig b/arch/arm/cpu/armv7/mx6/Kconfig index a32fd87..076ba52 100644 --- a/arch/arm/cpu/armv7/mx6/Kconfig +++ b/arch/arm/cpu/armv7/mx6/Kconfig @@ -25,7 +25,18 @@ config MX6SL config MX6SX bool +choice + prompt MX6 board select + +config TARGET_SECOMX6 + bool Support secomx6 boards + select CPU_V7 + +endchoice + config SYS_SOC default mx6 +source board/seco/Kconfig + endif diff --git a/board/seco/Kconfig b/board/seco/Kconfig new file mode 100644 index 000..dcb1ac8 --- /dev/null +++ b/board/seco/Kconfig @@ -0,0 +1,63 @@ +if TARGET_SECOMX6 + +choice + prompt SECO i.MX6 Board variant + +config SECOMX6_Q7 + bool Q7 + +config SECOMX6_UQ7 + bool uQ7 + +config SECOMX6_USBC + bool uSBC + +endchoice + +choice + prompt SECO i.MX6 SoC variant + +config SECOMX6Q + bool i.MX6Q + select MX6Q + +config SECOMX6DL + bool i.MX6DL + select MX6DL + +config SECOMX6S + bool i.MX6S + select MX6S + +endchoice + +choice + prompt DDR size + +config SECOMX6_512MB + bool 512MB + +config SECOMX6_1GB + bool 1GB + +config SECOMX6_2GB + bool 2GB + +config SECOMX6_4GB + bool 4GB + +endchoice + +config IMX_CONFIG + default board/seco/mx6quq7/mx6quq7-2g.cfg if SECOMX6_UQ7 SECOMX6Q SECOMX6_2GB + +config SYS_BOARD + default mx6quq7 if SECOMX6_UQ7 SECOMX6Q + +config SYS_VENDOR + default seco + +config SYS_CONFIG_NAME + default secomx6quq7 if SECOMX6_UQ7 SECOMX6Q + +endif diff --git a/board/seco/common/Makefile b/board/seco/common/Makefile new file mode 100644 index 000..9e37ebb --- /dev/null +++ b/board/seco/common/Makefile @@ -0,0 +1,2 @@ + +obj-$(CONFIG_TARGET_SECOMX6) += mx6.o diff --git a/board/seco/common/mx6.c b/board/seco/common/mx6.c new file mode 100644 index 000..40b8f56 --- /dev/null +++ b/board/seco/common/mx6.c @@ -0,0 +1,137 @@ +/* + * Copyright (C) 2013 Freescale Semiconductor, Inc. + * Copyright (C) 2015 ECA Sinters + * + * Author: Fabio Estevam fabio.este...@freescale.com + * Modified by: Boris Brezillon boris.brezil...@free-electrons.com + * + * SPDX-License-Identifier:GPL-2.0+ + */ + +#include asm/arch/clock.h +#include asm/arch/imx-regs.h +#include asm/arch/iomux.h +#include asm/arch/mx6-pins.h +#include asm/errno.h +#include asm/gpio.h +#include asm/imx-common/iomux-v3.h +#include asm/imx-common/boot_mode.h +#include mmc.h +#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 +#include micrel.h +#include asm/imx-common/mxc_i2c.h +#include i2c.h + +#define UART_PAD_CTRL (PAD_CTL_PUS_100K_UP | \ + PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | \ + PAD_CTL_SRE_FAST | PAD_CTL_HYS) + +static iomux_v3_cfg_t const uart2_pads[] = { + MX6_PAD_EIM_D26__UART2_TX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL), + MX6_PAD_EIM_D27__UART2_RX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL), +}; + +void seco_mx6_setup_uart_iomux(void) +{ + imx_iomux_v3_setup_multiple_pads(uart2_pads, ARRAY_SIZE(uart2_pads)); +} + +#define ENET_PAD_CTRL (PAD_CTL_PUS_47K_UP | \ +PAD_CTL_SPEED_MED |\ +PAD_CTL_DSE_40ohm |\ +PAD_CTL_HYS) + +static iomux_v3_cfg_t const enet_pads[] = { + MX6_PAD_ENET_MDIO__ENET_MDIO| MUX_PAD_CTRL(ENET_PAD_CTRL), + MX6_PAD_ENET_MDC__ENET_MDC | MUX_PAD_CTRL(ENET_PAD_CTRL), + MX6_PAD_RGMII_TXC__RGMII_TXC|
[U-Boot] [PATCH 1/3] ARM: mx6: move to a standard arch/board approach
Freescale boards are currently all defined in arch/arm/Kconfig, which makes them hard to detect. Moreover the MX6 SoC variant (Q, D, DL, S, SL) selection is currently done via the SYS_EXTRA_OPTIONS option which marked as deprecated. Move to a more standard way to select sub-architecture and board by creating a Kconfig under arch/arm/cpu/armv7/mx6 and a new ARCH_MX6 option. Existing MX6 board definitions should be moved in this new Kconfig in choice menu, and new boards should be directly declared in this menu. Signed-off-by: Boris Brezillon boris.brezil...@free-electrons.com --- arch/arm/Kconfig | 6 ++ arch/arm/cpu/armv7/mx6/Kconfig | 31 +++ 2 files changed, 37 insertions(+) create mode 100644 arch/arm/cpu/armv7/mx6/Kconfig diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 1f1ccad..7984bef 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -563,6 +563,10 @@ config ARCH_KEYSTONE select CPU_V7 select SUPPORT_SPL +config ARCH_MX6 + bool Freescale MX6 + select CPU_V7 + config TARGET_M53EVK bool Support m53evk select CPU_V7 @@ -847,6 +851,8 @@ source arch/arm/cpu/armv7/keystone/Kconfig source arch/arm/cpu/arm926ejs/kirkwood/Kconfig +source arch/arm/cpu/armv7/mx6/Kconfig + source arch/arm/cpu/arm926ejs/nomadik/Kconfig source arch/arm/cpu/armv7/omap3/Kconfig diff --git a/arch/arm/cpu/armv7/mx6/Kconfig b/arch/arm/cpu/armv7/mx6/Kconfig new file mode 100644 index 000..a32fd87 --- /dev/null +++ b/arch/arm/cpu/armv7/mx6/Kconfig @@ -0,0 +1,31 @@ +if ARCH_MX6 + +config MX6 + bool + default y + +config MX6D + bool + +config MX6DL + bool + +config MX6Q + bool + +config MX6QDL + bool + +config MX6S + bool + +config MX6SL + bool + +config MX6SX + bool + +config SYS_SOC + default mx6 + +endif -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/3] ARM: iMX: define an IMX_CONFIG Kconfig option
IMX_CONFIG is currently passed via the SYS_EXTRA_OPTIONS which is marked as deprecated. Add a new Kconfig file under arch/arm/imx-common and define the IMX_CONFIG Kconfig in there. Each board is supposed to provide a default value pointing to the appropriate imximage.cfg file. Signed-off-by: Boris Brezillon boris.brezil...@free-electrons.com --- arch/arm/Kconfig| 2 ++ arch/arm/imx-common/Kconfig | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 arch/arm/imx-common/Kconfig diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 7984bef..429a6cc 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -877,6 +877,8 @@ source arch/arm/cpu/armv7/zynq/Kconfig source arch/arm/cpu/armv7/Kconfig +source arch/arm/imx-common/Kconfig + source board/aristainetos/Kconfig source board/BuR/kwb/Kconfig source board/BuR/tseries/Kconfig diff --git a/arch/arm/imx-common/Kconfig b/arch/arm/imx-common/Kconfig new file mode 100644 index 000..37b3752 --- /dev/null +++ b/arch/arm/imx-common/Kconfig @@ -0,0 +1,2 @@ +config IMX_CONFIG + string -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 0/3] board/seco: Add mx6q-uq7 basic board support
Hello, This series adds a preliminary support for SECO's iMX6 based boards. The first 2 patches rework the way MX6 support is activated: - avoid defining SoC variant and imximage.cfg file path in the deprecated SYS_EXTRA_OPTIONS Kconfig option - remove the need for the CONFIG_MX6 definition in each board config header Let me know if there already is some WIP to address those issues. The last patch adds basic support for the mx6q/uq7 SECO board, and a sane Kconfig skeleton for other SoC (Q, DL and S) and board (uQ7, Q7 and uSBC) variants. Best Regards, Boris Boris Brezillon (3): ARM: mx6: move to a standard arch/board approach ARM: iMX: define an IMX_CONFIG Kconfig option board/seco: Add mx6q-uq7 basic board support arch/arm/Kconfig | 8 ++ arch/arm/cpu/armv7/mx6/Kconfig| 42 + arch/arm/imx-common/Kconfig | 2 + board/seco/Kconfig| 63 ++ board/seco/common/Makefile| 2 + board/seco/common/mx6.c | 137 ++ board/seco/common/mx6.h | 9 ++ board/seco/mx6quq7/Makefile | 7 ++ board/seco/mx6quq7/mx6quq7-2g.cfg | 173 ++ board/seco/mx6quq7/mx6quq7.c | 165 configs/secomx6quq7_defconfig | 7 ++ include/configs/secomx6quq7.h | 162 +++ 12 files changed, 777 insertions(+) create mode 100644 arch/arm/cpu/armv7/mx6/Kconfig create mode 100644 arch/arm/imx-common/Kconfig create mode 100644 board/seco/Kconfig create mode 100644 board/seco/common/Makefile create mode 100644 board/seco/common/mx6.c create mode 100644 board/seco/common/mx6.h create mode 100644 board/seco/mx6quq7/Makefile create mode 100644 board/seco/mx6quq7/mx6quq7-2g.cfg create mode 100644 board/seco/mx6quq7/mx6quq7.c create mode 100644 configs/secomx6quq7_defconfig create mode 100644 include/configs/secomx6quq7.h -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 05/12] pxa: balloon3/colibri_pxa270: fix environment optionally being nowhere
I couldn't quite figure out whether or not CONFIG_SYS_ENV_IS_NOWHERE actually ever worked but nowadays this is called CONFIG_ENV_IS_NOWHERE. Signed-off-by: Marcel Ziswiler mar...@ziswiler.com --- include/configs/balloon3.h | 2 +- include/configs/colibri_pxa270.h | 2 +- include/configs/vpac270.h| 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/configs/balloon3.h b/include/configs/balloon3.h index e7f0345..848a158 100644 --- a/include/configs/balloon3.h +++ b/include/configs/balloon3.h @@ -134,7 +134,7 @@ #defineCONFIG_ENV_IS_IN_FLASH #else #defineCONFIG_SYS_NO_FLASH -#defineCONFIG_SYS_ENV_IS_NOWHERE +#defineCONFIG_ENV_IS_NOWHERE #endif #defineCONFIG_SYS_MONITOR_BASE 0x00 diff --git a/include/configs/colibri_pxa270.h b/include/configs/colibri_pxa270.h index 08bd276..b8df89c 100644 --- a/include/configs/colibri_pxa270.h +++ b/include/configs/colibri_pxa270.h @@ -142,7 +142,7 @@ #else /* No flash */ #defineCONFIG_SYS_NO_FLASH -#defineCONFIG_SYS_ENV_IS_NOWHERE +#defineCONFIG_ENV_IS_NOWHERE #endif #defineCONFIG_SYS_MONITOR_BASE 0x0 diff --git a/include/configs/vpac270.h b/include/configs/vpac270.h index e54601d..887433b 100644 --- a/include/configs/vpac270.h +++ b/include/configs/vpac270.h @@ -221,7 +221,7 @@ #else /* No flash */ #defineCONFIG_SYS_NO_FLASH -#defineCONFIG_SYS_ENV_IS_NOWHERE +#defineCONFIG_ENV_IS_NOWHERE #endif /* -- 1.9.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 10/12] pxa: colibri_pxa270: fix wrong comment about voipac ethernet chip
Signed-off-by: Marcel Ziswiler mar...@ziswiler.com --- include/configs/colibri_pxa270.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/configs/colibri_pxa270.h b/include/configs/colibri_pxa270.h index 07426d1..28e57b5 100644 --- a/include/configs/colibri_pxa270.h +++ b/include/configs/colibri_pxa270.h @@ -65,7 +65,6 @@ /* * Networking Configuration - * chip on the Voipac PXA270 board */ #ifdef CONFIG_CMD_NET #defineCONFIG_CMD_PING -- 1.9.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 12/12] pxa: colibri_pxa270: integrate latest validated register settings
Integrate latest validated register settings from Toradex WinCE BSP 4.2 working accross all module versions from early V1.x, V1.2D, V2.2B to V2.4A. Signed-off-by: Marcel Ziswiler mar...@ziswiler.com --- include/configs/colibri_pxa270.h | 48 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/include/configs/colibri_pxa270.h b/include/configs/colibri_pxa270.h index ed0589a..7fc364e 100644 --- a/include/configs/colibri_pxa270.h +++ b/include/configs/colibri_pxa270.h @@ -163,7 +163,7 @@ */ #defineCONFIG_SYS_GPSR0_VAL0x #defineCONFIG_SYS_GPSR1_VAL0x0002 -#defineCONFIG_SYS_GPSR2_VAL0x0002C000 +#defineCONFIG_SYS_GPSR2_VAL0x0002c000 #defineCONFIG_SYS_GPSR3_VAL0x #defineCONFIG_SYS_GPCR0_VAL0x @@ -171,19 +171,19 @@ #defineCONFIG_SYS_GPCR2_VAL0x #defineCONFIG_SYS_GPCR3_VAL0x -#defineCONFIG_SYS_GPDR0_VAL0x0800 -#defineCONFIG_SYS_GPDR1_VAL0x0002A981 -#defineCONFIG_SYS_GPDR2_VAL0x0202FC00 -#defineCONFIG_SYS_GPDR3_VAL0x +#defineCONFIG_SYS_GPDR0_VAL0xc8008000 +#defineCONFIG_SYS_GPDR1_VAL0xfc02a981 +#defineCONFIG_SYS_GPDR2_VAL0x92c3 +#defineCONFIG_SYS_GPDR3_VAL0x0061e804 -#defineCONFIG_SYS_GAFR0_L_VAL 0x0010 -#defineCONFIG_SYS_GAFR0_U_VAL 0x00C00010 -#defineCONFIG_SYS_GAFR1_L_VAL 0x999A901A -#defineCONFIG_SYS_GAFR1_U_VAL 0xAAA8 -#defineCONFIG_SYS_GAFR2_L_VAL 0x -#defineCONFIG_SYS_GAFR2_U_VAL 0x0109A000 -#defineCONFIG_SYS_GAFR3_L_VAL 0x54000300 -#defineCONFIG_SYS_GAFR3_U_VAL 0x00024001 +#defineCONFIG_SYS_GAFR0_L_VAL 0x8010 +#defineCONFIG_SYS_GAFR0_U_VAL 0xa5c00010 +#defineCONFIG_SYS_GAFR1_L_VAL 0x6992901a +#defineCONFIG_SYS_GAFR1_U_VAL 0xaaa50008 +#defineCONFIG_SYS_GAFR2_L_VAL 0x +#defineCONFIG_SYS_GAFR2_U_VAL 0x4109a002 +#defineCONFIG_SYS_GAFR3_L_VAL 0x54000310 +#defineCONFIG_SYS_GAFR3_U_VAL 0x5401 #defineCONFIG_SYS_PSSR_VAL 0x30 @@ -196,24 +196,24 @@ /* * Memory settings */ -#defineCONFIG_SYS_MSC0_VAL 0x95f2 -#defineCONFIG_SYS_MSC1_VAL 0x7ff4 -#defineCONFIG_SYS_MSC2_VAL 0x -#defineCONFIG_SYS_MDCNFG_VAL 0x08000ac9 -#defineCONFIG_SYS_MDREFR_VAL 0x2013e01e -#defineCONFIG_SYS_MDMRS_VAL0x00320032 -#defineCONFIG_SYS_FLYCNFG_VAL 0x +#defineCONFIG_SYS_MSC0_VAL 0x9ee1c5f2 +#defineCONFIG_SYS_MSC1_VAL 0x9ee1f994 +#defineCONFIG_SYS_MSC2_VAL 0x9ee19ee1 +#defineCONFIG_SYS_MDCNFG_VAL 0x090009c9 +#defineCONFIG_SYS_MDREFR_VAL 0x2003a031 +#defineCONFIG_SYS_MDMRS_VAL0x00220022 +#defineCONFIG_SYS_FLYCNFG_VAL 0x00010001 #defineCONFIG_SYS_SXCNFG_VAL 0x40044004 /* * PCMCIA and CF Interfaces */ -#defineCONFIG_SYS_MECR_VAL 0x0001 -#defineCONFIG_SYS_MCMEM0_VAL 0x00014307 +#defineCONFIG_SYS_MECR_VAL 0x +#defineCONFIG_SYS_MCMEM0_VAL 0x00028307 #defineCONFIG_SYS_MCMEM1_VAL 0x00014307 -#defineCONFIG_SYS_MCATT0_VAL 0x0001c787 +#defineCONFIG_SYS_MCATT0_VAL 0x00038787 #defineCONFIG_SYS_MCATT1_VAL 0x0001c787 -#defineCONFIG_SYS_MCIO0_VAL0x0001430f +#defineCONFIG_SYS_MCIO0_VAL0x0002830f #defineCONFIG_SYS_MCIO1_VAL0x0001430f #include pxa-common.h -- 1.9.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 11/12] pxa: colibri_pxa270: remove CONFIG_ENV_ADDR_REDUND
Usually not required for NOR flash. Signed-off-by: Marcel Ziswiler mar...@ziswiler.com --- include/configs/colibri_pxa270.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/configs/colibri_pxa270.h b/include/configs/colibri_pxa270.h index 28e57b5..ed0589a 100644 --- a/include/configs/colibri_pxa270.h +++ b/include/configs/colibri_pxa270.h @@ -157,8 +157,6 @@ (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN + 0x4) #defineCONFIG_ENV_SIZE 0x4 #defineCONFIG_ENV_SECT_SIZE0x4 -#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE) -#define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE) /* * GPIO settings -- 1.9.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 09/12] pxa: colibri_pax270: fix CONFIG_BOOTCOMMAND
While 'mmc init' is no longer required the address to bootm the kernel from NOR flash was wrong. Signed-off-by: Marcel Ziswiler mar...@ziswiler.com --- include/configs/colibri_pxa270.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/configs/colibri_pxa270.h b/include/configs/colibri_pxa270.h index 1b1816a..07426d1 100644 --- a/include/configs/colibri_pxa270.h +++ b/include/configs/colibri_pxa270.h @@ -26,13 +26,13 @@ #defineCONFIG_SYS_MALLOC_LEN (128 * 1024) #defineCONFIG_ARCH_CPU_INIT #defineCONFIG_BOOTCOMMAND \ - if mmc init fatload mmc 0 0xa000 uImage; then \ + if fatload mmc 0 0xa000 uImage; then \ bootm 0xa000; \ fi; \ if usb reset fatload usb 0 0xa000 uImage; then \ bootm 0xa000; \ fi; \ - bootm 0x8; + bootm 0xc; #defineCONFIG_BOOTARGS console=tty0 console=ttyS0,115200 #defineCONFIG_TIMESTAMP #defineCONFIG_BOOTDELAY2 /* Autoboot delay */ -- 1.9.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 11/12] tegra124: Reserve secure RAM using MC_SECURITY_CFG{0, 1}_0
On Mon, Feb 16, 2015 at 12:54:48PM +, Jan Kiszka wrote: From: Ian Campbell i...@hellion.org.uk These registers can be used to prevent non-secure world from accessing a megabyte aligned region of RAM, use them to protect the u-boot secure monitor code. What happens if the CPU tried to read this memory from the non-secure world? If the OS has it mapped then the CPU could perform speculative reads at any point in time. If that can raise an abort then the OS needs to not map the region. I take it U-Boot uses a secure mapping for the region (which I believe should avoid the mismatched attributes issue I mentioned in my other reply). Thanks, Mark. At first I tried to do this from s_init(), however this inexplicably causes u-boot's networking (e.g. DHCP) to fail, while networking under Linux was fine. So instead I have added a new weak arch function protect_secure_section() called from relocate_secure_section() and reserved the region there. This is better overall since it defers the reservation until after the sec vs. non-sec decision (which can be influenced by an envvar) has been made when booting the os. Signed-off-by: Ian Campbell i...@hellion.org.uk Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- arch/arm/cpu/armv7/virt-v7.c | 5 + arch/arm/cpu/tegra-common/ap.c | 15 +++ arch/arm/include/asm/system.h | 1 + 3 files changed, 21 insertions(+) diff --git a/arch/arm/cpu/armv7/virt-v7.c b/arch/arm/cpu/armv7/virt-v7.c index b69fd37..eb6195c 100644 --- a/arch/arm/cpu/armv7/virt-v7.c +++ b/arch/arm/cpu/armv7/virt-v7.c @@ -46,6 +46,10 @@ static unsigned long get_gicd_base_address(void) #endif } +/* Define a specific version of this function to enable any available + * hardware protections for the reserved region */ +void __weak protect_secure_section(void) {} + static void relocate_secure_section(void) { #ifdef CONFIG_ARMV7_SECURE_BASE @@ -54,6 +58,7 @@ static void relocate_secure_section(void) memcpy((void *)CONFIG_ARMV7_SECURE_BASE, __secure_start, sz); flush_dcache_range(CONFIG_ARMV7_SECURE_BASE, CONFIG_ARMV7_SECURE_BASE + sz + 1); + protect_secure_section(); invalidate_icache_all(); #endif } diff --git a/arch/arm/cpu/tegra-common/ap.c b/arch/arm/cpu/tegra-common/ap.c index a17dfd1..f1d3070 100644 --- a/arch/arm/cpu/tegra-common/ap.c +++ b/arch/arm/cpu/tegra-common/ap.c @@ -10,6 +10,7 @@ #include common.h #include asm/io.h #include asm/arch/gp_padctrl.h +#include asm/arch/mc.h #include asm/arch-tegra/ap.h #include asm/arch-tegra/clock.h #include asm/arch-tegra/fuse.h @@ -154,6 +155,20 @@ static void init_pmc_scratch(void) writel(odmdata, pmc-pmc_scratch20); } +#ifdef CONFIG_ARMV7_SECURE_RESERVE_SIZE +void protect_secure_section(void) +{ + struct mc_ctlr *mc = (struct mc_ctlr *)NV_PA_MC_BASE; + + /* Must be MB aligned */ + BUILD_BUG_ON(CONFIG_ARMV7_SECURE_BASE 0xF); + BUILD_BUG_ON(CONFIG_ARMV7_SECURE_RESERVE_SIZE 0xF); + + writel(CONFIG_ARMV7_SECURE_BASE, mc-mc_security_cfg0); + writel(CONFIG_ARMV7_SECURE_RESERVE_SIZE20, mc-mc_security_cfg1); +} +#endif + void s_init(void) { /* Init PMC scratch memory */ diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h index 89f2294..21be69d 100644 --- a/arch/arm/include/asm/system.h +++ b/arch/arm/include/asm/system.h @@ -76,6 +76,7 @@ void armv8_switch_to_el1(void); void gic_init(void); void gic_send_sgi(unsigned long sgino); void wait_for_wakeup(void); +void protect_secure_region(void); void smp_kick_all_cpus(void); void flush_l3_cache(void); -- 2.1.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 11/12] tegra124: Reserve secure RAM using MC_SECURITY_CFG{0, 1}_0
On 2015-02-16 14:49, Mark Rutland wrote: On Mon, Feb 16, 2015 at 12:54:48PM +, Jan Kiszka wrote: From: Ian Campbell i...@hellion.org.uk These registers can be used to prevent non-secure world from accessing a megabyte aligned region of RAM, use them to protect the u-boot secure monitor code. What happens if the CPU tried to read this memory from the non-secure world? If the OS has it mapped then the CPU could perform speculative reads at any point in time. If that can raise an abort then the OS needs to not map the region. I take it U-Boot uses a secure mapping for the region (which I believe should avoid the mismatched attributes issue I mentioned in my other reply). What I can contribute to this are kernel messages due to a misconfiguration of our hypervisor Jailhouse (while Linux was still trying to boot it): [ 61.896860] tegra-mc 70019000.memory-controller: mpcorew: write @0xfff00040: Security violation (TrustZone violation) [ 61.896888] tegra-mc 70019000.memory-controller: mpcorew: write @0xfff2d340: Security violation (TrustZone violation) So it seems that Linux is receiving a violation report here when trying to access the memory. Jan -- Siemens AG, Corporate Technology, CT RTC ITP SES-DE Corporate Competence Center Embedded Linux ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 12/12] tegra: Set CNTFRQ for secondary CPUs
On 2015-02-16 14:51, Mark Rutland wrote: On Mon, Feb 16, 2015 at 01:44:36PM +, Jan Kiszka wrote: On 2015-02-16 14:37, Mark Rutland wrote: On Mon, Feb 16, 2015 at 12:54:49PM +, Jan Kiszka wrote: We only set CNTFRQ in arch_timer_init for the boot CPU. But this has to happen for all cores. Fixing this resolves problems of KVM with emulating the generic timer/counter. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- arch/arm/cpu/armv7/tegra-common/psci.S | 13 + 1 file changed, 13 insertions(+) diff --git a/arch/arm/cpu/armv7/tegra-common/psci.S b/arch/arm/cpu/armv7/tegra-common/psci.S index b7501fb..119c246 100644 --- a/arch/arm/cpu/armv7/tegra-common/psci.S +++ b/arch/arm/cpu/armv7/tegra-common/psci.S @@ -51,12 +51,25 @@ ENTRY(psci_arch_init) mrc p15, 0, r4, c0, c0, 5 @ MPIDR and r4, r4, #7 @ number of CPUs in cluster + + adr r5, _sys_clock_freq + cmp r4, #0 + + mrceq p15, 0, r7, c14, c0, 0 @ read CNTFRQ from CPU0 + streq r7, [r5] + + ldrne r7, [r5] + mcrne p15, 0, r7, c14, c0, 0 @ write CNTFRQ to CPU1..3 Is it not possible to have a hook that uses the same variable as arch_timer_init rather than doing a here copy? It seems a shame to duplicate the effort. The problem is related to the different address spaces. Here we run in the secure monitor, arch_timer_init - to my understanding - in non-secure mode. Didn't find a pattern so far how to transfer data (and that shouldn't be more complex than the above code). Surely arch_timer_init must be run in a secure mode in order to be allowed to write to CNTFRQ? Ah, right. If this is simply the easiest way of moving the data around then there's no real problem with it; it's just a shame that it only happens in the PSCI case. OK, I'll check again. Maybe it's easier than I thought. Jan -- Siemens AG, Corporate Technology, CT RTC ITP SES-DE Corporate Competence Center Embedded Linux ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] tools: imagetool: Remove INSERT BEFORE from linker script
Not all linkers are able to parse INSERT BEFORE part of the linker script. For example following (rather new) gold one: GNU gold (GNU Binutils for Debian 2.22) 1.11 produces following error: HOSTLD tools/mkenvimage /usr/bin/ld: error: ./tools/imagetool.lds:23:8: syntax error, unexpected STRING /usr/bin/ld: fatal error: unable to parse script file ./tools/imagetool.lds collect2: error: ld returned 1 exit status make[1]: *** [tools/mkenvimage] Error 1 make: *** [tools] Error 2 The problem has already been reported, but no evident solution has been proposed: https://bugzilla.redhat.com/show_bug.cgi?id=927573#c5 Signed-off-by: Lukasz Majewski l.majew...@samsung.com --- tools/imagetool.lds | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/imagetool.lds b/tools/imagetool.lds index 7e92b4a..4fa996a 100644 --- a/tools/imagetool.lds +++ b/tools/imagetool.lds @@ -20,5 +20,3 @@ SECTIONS __bss_start = .; } - -INSERT BEFORE .data; -- 2.0.0.rc2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] arm:aspenite: Convert to generic board
-Original Message- From: Ajay Bhargav [mailto:ajay.bhar...@einfochips.com] Sent: 16 February 2015 18:37 To: u-boot@lists.denx.de; ma...@denx.de Cc: tr...@ti.com; Prafulla Wadaskar; yamad...@jp.panasonic.com; Ajay Bhargav Subject: [PATCH 2/2] arm:aspenite: Convert to generic board Enable CONFIG_SYS_GENERIC_BOARD for Marvell aspenite. Signed-off-by: Ajay Bhargav ajay.bhar...@einfochips.com --- include/configs/aspenite.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/configs/aspenite.h b/include/configs/aspenite.h index 727b14a..5258486 100644 --- a/include/configs/aspenite.h +++ b/include/configs/aspenite.h @@ -11,6 +11,11 @@ #define __CONFIG_ASPENITE_H /* + * Generic Board support + */ +#define CONFIG_SYS_GENERIC_BOARD + +/* * Version number information */ #define CONFIG_IDENT_STRING\nMarvell-Aspenite DB -- 2.3.0 Acked-by: Prafulla Wadaskar prafu...@marvell.com Added Luka on this thread. Regards... Prafulla . . . ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 06/12] virt-dt: Allow reservation of the secure region when it is in a RAM carveout.
On Mon, Feb 16, 2015 at 01:51:37PM +, Jan Kiszka wrote: On 2015-02-16 14:42, Mark Rutland wrote: On Mon, Feb 16, 2015 at 12:54:43PM +, Jan Kiszka wrote: From: Ian Campbell i...@hellion.org.uk In this case the secure code lives in RAM, and hence needs to be reserved, but it has been relocated, so the reservation of __secure_start does not apply. Add support for setting CONFIG_ARMV7_SECURE_RESERVE_SIZE to reserve such a region. This will be used in a subsequent patch for Jetson-TK1 Using a memreserve and allowing the OS to map the memory but not poke it can be problematic due to the potential of mismatched attributes between the monitor and the OS. OK, here my knowledge is not yet sufficient to process this remark. What kind of problems can arise from what kind of attribute mismatch? And why should the OS be able to cause problems for the monitor? For example, consider the case of the region being mapped cacheable by the OS but not by the monitor. The monitor communicates between cores expecting to never hit in a cache (because it uses a non-cacheable mapping), but the mapping used by the OS can cause the region to be allocated into caches at any point in time even if it never accesses the region explicitly. The CPU _may_ hit in a cache even if making a non-cacheable access (this is called an unexepcted data cache hit), so the cache allocations caused by the OS can mask data other CPUs wrote straight to memory. Other than that case, I believe the rules given in the ARM ARM for mismatched memory attributes may apply for similar reasons. Thus allowing the OS to map this memory can cause a loss of coherency on the monitor side, if the OS and monitor map the region with different attributes. This is all IMPLEMENTATION DEFINED, so it may be that you're fine on the system you're dealing with. I don't immediately know whether that is the case, however. Never telling the OS about the memory in the first place avoids the possibility in all cases. If you're able to carve out the secure memory from the memory node(s), then you should be safe from that. Do you have a pointer to an example how to do it instead? Unfortunately not; I don't know whether there's an existing primitive for doing that. In general you might need to split a memory region in two to carve out the portion in the middle. Thanks, Mark. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 06/12] virt-dt: Allow reservation of the secure region when it is in a RAM carveout.
On 2015-02-16 15:25, Mark Rutland wrote: On Mon, Feb 16, 2015 at 01:51:37PM +, Jan Kiszka wrote: On 2015-02-16 14:42, Mark Rutland wrote: On Mon, Feb 16, 2015 at 12:54:43PM +, Jan Kiszka wrote: From: Ian Campbell i...@hellion.org.uk In this case the secure code lives in RAM, and hence needs to be reserved, but it has been relocated, so the reservation of __secure_start does not apply. Add support for setting CONFIG_ARMV7_SECURE_RESERVE_SIZE to reserve such a region. This will be used in a subsequent patch for Jetson-TK1 Using a memreserve and allowing the OS to map the memory but not poke it can be problematic due to the potential of mismatched attributes between the monitor and the OS. OK, here my knowledge is not yet sufficient to process this remark. What kind of problems can arise from what kind of attribute mismatch? And why should the OS be able to cause problems for the monitor? For example, consider the case of the region being mapped cacheable by the OS but not by the monitor. The monitor communicates between cores expecting to never hit in a cache (because it uses a non-cacheable mapping), but the mapping used by the OS can cause the region to be allocated into caches at any point in time even if it never accesses the region explicitly. The CPU _may_ hit in a cache even if making a non-cacheable access (this is called an unexepcted data cache hit), so the cache allocations caused by the OS can mask data other CPUs wrote straight to memory. Other than that case, I believe the rules given in the ARM ARM for mismatched memory attributes may apply for similar reasons. Thus allowing the OS to map this memory can cause a loss of coherency on the monitor side, if the OS and monitor map the region with different attributes. This is all IMPLEMENTATION DEFINED, so it may be that you're fine on the system you're dealing with. I don't immediately know whether that is the case, however. Never telling the OS about the memory in the first place avoids the possibility in all cases. But from a security point of view, it must not matter if the OS maps the memory or not - the monitor must be robust against that, no? If the architecture cannot provide such guarantees, it has to be worked around in software in the monitor (I hope you can do so...). Jan If you're able to carve out the secure memory from the memory node(s), then you should be safe from that. Do you have a pointer to an example how to do it instead? Unfortunately not; I don't know whether there's an existing primitive for doing that. In general you might need to split a memory region in two to carve out the portion in the middle. Thanks, Mark. -- Siemens AG, Corporate Technology, CT RTC ITP SES-DE Corporate Competence Center Embedded Linux ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC PATCH v3 07/14] dm: eth: Add basic driver model support to Ethernet stack
Hi Simon, On Sun, Feb 15, 2015 at 9:49 AM, Simon Glass s...@chromium.org wrote: Hi Joe, On 10 February 2015 at 18:30, Joe Hershberger joe.hershber...@ni.com wrote: First just add support for MAC drivers. It has taken me a while to get through all this unfortunately. This seems OK to me but needs a clean-up with more comments, etc. If you like these could go in a separate patch, so if you want to do that please add my Reviewed-by: Simon Glass s...@chromium.org to this one. I would prefer that we sort out the bind/probe problem before this is merged but I understand you now have quite a bit of work built on top, and the problems can be separated. So if you like we could do one more version, merge it, and continue with refinements after that. I'm a bit leery to merge this until I've actually got more of the real-world implementation for a board done. I guess it could always be corrected in the future, but at the same time, I think it should be fairly complete. Do you prefer that it go in as smaller parts? There's still no actual board supported and the MDIO / PHY support is not done yet. Signed-off-by: Joe Hershberger joe.hershber...@ni.com --- Changes in v3: -Correct the pre_unbind logic -Correct failure chaining from bind to probe to init --Fail init if not activated --Fail probe if ethaddr not set -Update ethaddr from env unconditionally on init -Use set current to select the current device regardless of the previous selection -Allow current eth dev to be NULL -Fixed blank line formatting for variable declaration Changes in v2: -Updated comments -Removed extra parentheses -Changed eth_uclass_priv local var names to be uc_priv -Update error codes -Cause an invalid name to fail binding -Rebase on top of dm/master -Stop maintaining our own index and use DM seq now that it works for our needs -Move the hwaddr to platdata so that its memory is allocated at bind when we need it -Prevent device from being probed before used by a command (i.e. before eth_init()). common/board_r.c | 4 +- common/cmd_bdinfo.c| 2 + include/dm/uclass-id.h | 1 + include/net.h | 25 net/eth.c | 336 - 5 files changed, 361 insertions(+), 7 deletions(-) diff --git a/common/board_r.c b/common/board_r.c index 68a9448..75147b7 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -556,7 +556,7 @@ static int initr_bbmii(void) } #endif -#ifdef CONFIG_CMD_NET +#if defined(CONFIG_CMD_NET) !defined(CONFIG_DM_ETH) static int initr_net(void) { puts(Net: ); @@ -825,7 +825,7 @@ init_fnc_t init_sequence_r[] = { #ifdef CONFIG_BITBANGMII initr_bbmii, #endif -#ifdef CONFIG_CMD_NET +#if defined(CONFIG_CMD_NET) !defined(CONFIG_DM_ETH) INIT_FUNC_WATCHDOG_RESET initr_net, #endif diff --git a/common/cmd_bdinfo.c b/common/cmd_bdinfo.c index e6d8a7a..8688cf9 100644 --- a/common/cmd_bdinfo.c +++ b/common/cmd_bdinfo.c @@ -34,6 +34,7 @@ static void print_eth(int idx) printf(%-12s= %s\n, name, val); } +#ifndef CONFIG_DM_ETH __maybe_unused static void print_eths(void) { @@ -52,6 +53,7 @@ static void print_eths(void) printf(current eth = %s\n, eth_get_name()); printf(ip_addr = %s\n, getenv(ipaddr)); } +#endif __maybe_unused static void print_lnum(const char *name, unsigned long long value) diff --git a/include/dm/uclass-id.h b/include/dm/uclass-id.h index 91bb90d..ad96682 100644 --- a/include/dm/uclass-id.h +++ b/include/dm/uclass-id.h @@ -34,6 +34,7 @@ enum uclass_id { UCLASS_I2C_GENERIC, /* Generic I2C device */ UCLASS_I2C_EEPROM, /* I2C EEPROM device */ UCLASS_MOD_EXP, /* RSA Mod Exp device */ + UCLASS_ETH, /* Ethernet device */ UCLASS_COUNT, UCLASS_INVALID = -1, diff --git a/include/net.h b/include/net.h index 4d7575e..11471bd 100644 --- a/include/net.h +++ b/include/net.h @@ -78,6 +78,30 @@ enum eth_state_t { ETH_STATE_ACTIVE }; +#ifdef CONFIG_DM_ETH +struct eth_pdata { + phys_addr_t iobase; + unsigned char enetaddr[6]; +}; + +struct eth_ops { + int (*init)(struct udevice *dev, bd_t *bis); Why do we pass in bd_t? Isn't that available through gd-bd? Legacy. I can kill it if you like. + int (*send)(struct udevice *dev, void *packet, int length); + int (*recv)(struct udevice *dev); + void (*halt)(struct udevice *dev); +#ifdef CONFIG_MCAST_TFTP + int (*mcast)(struct udevice *dev, const u8 *enetaddr, u8 set); s/u8/bool/ or maybe int? On ARM at least it is inefficient to keep having to mask the parameters. Again, legacy. I just copied the former function prototypes and changed the first parameter to udevice*. +#endif +
Re: [U-Boot] [PATCH V3 3/3] rpi: add support for Raspberry Pi 2 model B
On 02/16/2015 06:03 PM, Tom Rini wrote: On Mon, Feb 16, 2015 at 12:16:15PM -0700, Stephen Warren wrote: USB doesn't seem to work yet; the controller detects the on-board Hub/ Ethernet device but can't read the descriptors from it. I haven't investigated yet. Signed-off-by: Stephen Warren swar...@wwwdotorg.org --- v3: Rebased on top of u-boot-dm merge. v2: Implement new board_rev decoding scheme, to avoid hard-coding the board revision onthe RPi 2. +(rpi_2) make[3]: *** No rule to make target `arch/arm/cpu/armv7/bcm2835/../../arm1176/bcm2835//init.o', needed by `arch/arm/cpu/armv7/bcm2835/built-in.o'. Stop. +(rpi_2) make[2]: *** [arch/arm/cpu/armv7/bcm2835] Error 2 +(rpi_2) make[1]: *** [arch/arm/cpu/armv7] Error 2 When I try and build it with buildman. Something get left out somewhere? Thanks! It works fine for me using make: export CROSS_COMPILE=arm-linux-gnueabi- make ARCH=arm rpi_2_defconfig make ARCH=arm -j8 -s git status doesn't think I forgot to check anything in. The build works after git clean -f -d -x. I can't remember how to run buildman, and the help text doesn't really clue me in. I guess I'll go wade through the README. Do the commits at the following git branch work any better for you? I just rebased them on the latest u-boot.git master branch: git://github.com/swarren/u-boot.git rpi_dev ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC PATCH v3 01/14] dm: core: Allow seq numbers to be resolved before probe
Hi Simon, On Sun, Feb 15, 2015 at 9:59 AM, Simon Glass s...@chromium.org wrote: Hi Joe, On 13 February 2015 at 19:33, Joe Hershberger joe.hershber...@gmail.com wrote: On Thu, Feb 12, 2015 at 11:14 PM, Simon Glass s...@chromium.org wrote: Hi Joe, On 10 February 2015 at 23:08, Joe Hershberger joe.hershber...@gmail.com wrote: Hi Simon, On Tue, Feb 10, 2015 at 10:39 PM, Simon Glass s...@chromium.org wrote: Hi Joe, On 10 February 2015 at 18:30, Joe Hershberger joe.hershber...@ni.com wrote: Before this patch, if the sequence numbers were resolved before probe, this code would insist on defining new non-conflicting-with-itself seq numbers. Now any non -1 seq number is accepted as already resolved. Can you explain what problem this solves? At present, when probing a device, -seq must be -1 (sort-of by definition since it doesn't exist as an active device in the uclass). Please look at eth_post_bind() in patch 07/14. The Ethernet devices need to write their hardware addresses to the registers in bind (since it needs to happen regardless of the device being used so that Linux will see the MAC address). As such, the sequence number is needed to look up the ethaddr. In order to avoid probing all the devices to get the seq number resolved, I resolve it in post_bind to avoid the rest of the overhead (thus no longer probing in post_bind, which was one of the issues previously). Then when probe comes along, the seq is already resolved. That's why this patch is needed. OK I see. This is a bit messy. If the MAC address assignment is part of the bind step then it shouldn't need the seq number. Not sure why you say that. The reason I need the seq number is because I need to look up the proper env variable for the MAC address. E.g. ethaddr, eth2addr, etc. The seq number select which one to read from the env. We should be able to do this after a probe. A device which is bound but not probed does not have a sequence number, as things currently stand. I can think of some poor ways to do this but a nice way is not obvious! Not sure what you're referring to here. What is this in this context? Figuring out the sequence number. One option would be probe all the Ethernet devices on startup. If probe() only set up the hardware (including MAC address) then that might work. It would be fairly fast since it wouldn't involve starting up the link, etc. I suspect you are worried about a lot of Ethernet devices sitting around probed by unused. I'm not sure if that matters though. I had it probing the devices originally (by calling first and next) and you commented that it shouldn't happen until the devices are used. However, I That was because your code was probing things in the bind mehod. don't think we can guarantee that all drivers that come later will have simple probe (since that's not part of the contract). I think I agree with your original statement that we should not probe. It seems more suitable to write the hwaddr in bind as a known and limited side effect. I don't like the idea of an ethernet device supporting writing its hardware address before it is probed. Until it is probed we don't really know it is there, nor where it is exactly (bus, memory address). So I think writing the hardware address makes more sense after probe. But probe should not happen as part of bind. It seems to me it could happen in your eth_init(). OK. I can see why you prefer not to have the hardware accessed in bind. In order to probe the devices (but not from bind) I'll have to add back eth_initialize() and have it probe all of the devices. the eth_init() that you see here is what gets called when the network is enabled, so it certainly shouldn't go in eth_init(). I could potentially rename it to eth_start() or something. That would be clearer, but would break from the former naming for anyone familiar. The seq number resolution seems fairly well contained as I implemented it in bind. I simply call the core function and write the result to the device member. Then of course this patch to remove the assert. Yes it is well contained, but I still don't think it is right. If you want to put '#ifndef CONFIG_DM_NET' around the assert in uclass_resolve_seq() while we work it out, that is OK with me. I will work on making it correct instead of adding that. -Joe ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V3 3/3] rpi: add support for Raspberry Pi 2 model B
On 02/16/2015 09:15 PM, Simon Glass wrote: Hi Stephen, On 16 February 2015 at 21:09, Stephen Warren swar...@wwwdotorg.org wrote: On 02/16/2015 06:03 PM, Tom Rini wrote: On Mon, Feb 16, 2015 at 12:16:15PM -0700, Stephen Warren wrote: USB doesn't seem to work yet; the controller detects the on-board Hub/ Ethernet device but can't read the descriptors from it. I haven't investigated yet. Signed-off-by: Stephen Warren swar...@wwwdotorg.org --- v3: Rebased on top of u-boot-dm merge. v2: Implement new board_rev decoding scheme, to avoid hard-coding the board revision onthe RPi 2. +(rpi_2) make[3]: *** No rule to make target `arch/arm/cpu/armv7/bcm2835/../../arm1176/bcm2835//init.o', needed by `arch/arm/cpu/armv7/bcm2835/built-in.o'. Stop. +(rpi_2) make[2]: *** [arch/arm/cpu/armv7/bcm2835] Error 2 +(rpi_2) make[1]: *** [arch/arm/cpu/armv7] Error 2 When I try and build it with buildman. Something get left out somewhere? Thanks! It works fine for me using make: export CROSS_COMPILE=arm-linux-gnueabi- make ARCH=arm rpi_2_defconfig make ARCH=arm -j8 -s git status doesn't think I forgot to check anything in. The build works after git clean -f -d -x. I can't remember how to run buildman, and the help text doesn't really clue me in. I guess I'll go wade through the README. Well worth it :-) Something like this might work for you: buildman --fetch-arch arm buildman rpi_2 or if you want to build the whole branch: buildman -b local_branch rpi_2 What do I put into ~/.buildman's toolchain section (and why can't it just automatically pick it up from the CROSS_COMPILE environment variable)? I usually set CROSS_COMPILE to arm-linux-gnueabi- to point at Ubuntu's system packaged compiler. However, none of the following works, since buildman seems to require a compiler that's placed into its own directory rather than /usr/bin: [toolchain] xxx1: /usr/bin/arm-linux-gnueabi-gcc xxx2: arm-linux-gnueabi-gcc xxx3: /usr/bin/arm-linux-gnueabi- xxx4: arm-linux-gnueabi- xxx5: /usr/bin/arm-linux-gnueabi xxx6: arm-linux-gnueabi [swarren@dart u-boot.git]$ ./tools/buildman/buildman --list-tool-chains Scanning for tool chains - scanning path '/usr/bin/arm-linux-gnueabi-gcc' - looking in '/usr/bin/arm-linux-gnueabi-gcc/.' - looking in '/usr/bin/arm-linux-gnueabi-gcc/bin' - looking in '/usr/bin/arm-linux-gnueabi-gcc/usr/bin' - scanning path 'arm-linux-gnueabi-gcc' - looking in 'arm-linux-gnueabi-gcc/.' - looking in 'arm-linux-gnueabi-gcc/bin' - looking in 'arm-linux-gnueabi-gcc/usr/bin' - scanning path '/usr/bin/arm-linux-gnueabi-' - looking in '/usr/bin/arm-linux-gnueabi-/.' - looking in '/usr/bin/arm-linux-gnueabi-/bin' - looking in '/usr/bin/arm-linux-gnueabi-/usr/bin' - scanning path 'arm-linux-gnueabi-' - looking in 'arm-linux-gnueabi-/.' - looking in 'arm-linux-gnueabi-/bin' - looking in 'arm-linux-gnueabi-/usr/bin' - scanning path '/usr/bin/arm-linux-gnueabi' - looking in '/usr/bin/arm-linux-gnueabi/.' - looking in '/usr/bin/arm-linux-gnueabi/bin' - looking in '/usr/bin/arm-linux-gnueabi/usr/bin' - scanning path 'arm-linux-gnueabi' - looking in 'arm-linux-gnueabi/.' - looking in 'arm-linux-gnueabi/bin' - looking in 'arm-linux-gnueabi/usr/bin' List of available toolchains (0): None I'm not going to download a whole new toolchain just to use a different build tool. I thought I had this working on my work machine before, but I have no idea how I had that configured. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V3 3/3] rpi: add support for Raspberry Pi 2 model B
Hi Stephen, On 16 February 2015 at 21:09, Stephen Warren swar...@wwwdotorg.org wrote: On 02/16/2015 06:03 PM, Tom Rini wrote: On Mon, Feb 16, 2015 at 12:16:15PM -0700, Stephen Warren wrote: USB doesn't seem to work yet; the controller detects the on-board Hub/ Ethernet device but can't read the descriptors from it. I haven't investigated yet. Signed-off-by: Stephen Warren swar...@wwwdotorg.org --- v3: Rebased on top of u-boot-dm merge. v2: Implement new board_rev decoding scheme, to avoid hard-coding the board revision onthe RPi 2. +(rpi_2) make[3]: *** No rule to make target `arch/arm/cpu/armv7/bcm2835/../../arm1176/bcm2835//init.o', needed by `arch/arm/cpu/armv7/bcm2835/built-in.o'. Stop. +(rpi_2) make[2]: *** [arch/arm/cpu/armv7/bcm2835] Error 2 +(rpi_2) make[1]: *** [arch/arm/cpu/armv7] Error 2 When I try and build it with buildman. Something get left out somewhere? Thanks! It works fine for me using make: export CROSS_COMPILE=arm-linux-gnueabi- make ARCH=arm rpi_2_defconfig make ARCH=arm -j8 -s git status doesn't think I forgot to check anything in. The build works after git clean -f -d -x. I can't remember how to run buildman, and the help text doesn't really clue me in. I guess I'll go wade through the README. Well worth it :-) Something like this might work for you: buildman --fetch-arch arm buildman rpi_2 or if you want to build the whole branch: buildman -b local_branch rpi_2 Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC PATCH v3 09/14] dm: eth: Add ARP and PING response to sandbox driver
On Sun, Feb 15, 2015 at 9:49 AM, Simon Glass s...@chromium.org wrote: Hi Joe, On 10 February 2015 at 18:30, Joe Hershberger joe.hershber...@ni.com wrote: The sandbox driver will now generate response traffic to exercise the ping command even when no network exists. This allows the basic data pathways of the DM to be tested. Signed-off-by: Joe Hershberger joe.hershber...@ni.com Reviewed-by: Simon Glass s...@chromium.org --- Changes in v3: -Prevent a crash if memory is not allocated Changes in v2: -Change printfs to debug in sandbox driver -Move static data to priv -Move fake hwaddr to the device tree arch/sandbox/dts/sandbox.dts | 1 + drivers/net/sandbox.c| 101 +++ 2 files changed, 102 insertions(+) diff --git a/arch/sandbox/dts/sandbox.dts b/arch/sandbox/dts/sandbox.dts index 502eb3d..ba635e8 100644 --- a/arch/sandbox/dts/sandbox.dts +++ b/arch/sandbox/dts/sandbox.dts @@ -186,5 +186,6 @@ eth@10002000 { compatible = sandbox,eth; reg = 0x10002000 0x1000; + fake-host-hwaddr = 0x00 0x00 0x66 0x44 0x22 0x00; }; }; diff --git a/drivers/net/sandbox.c b/drivers/net/sandbox.c index 2a2ad41..f9fa1a1 100644 --- a/drivers/net/sandbox.c +++ b/drivers/net/sandbox.c @@ -15,22 +15,121 @@ DECLARE_GLOBAL_DATA_PTR; +struct eth_sandbox_priv { + uchar fake_host_hwaddr[ARP_HLEN]; + IPaddr_t fake_host_ipaddr; + uchar recv_packet_buffer[PKTSIZE]; + int recv_packet_length; +}; + static int sb_eth_init(struct udevice *dev, bd_t *bis) { debug(eth_sandbox: Init\n); + struct eth_sandbox_priv *priv = dev-priv; + u32 int_array[ARP_HLEN]; + int i; + + if (!priv) + return -EINVAL; How can this happen? If I recall this was happening when the probe failed due to being unable to find a MAC address. This meant that the device was not active when the init was called on it. I believe I later remedied it by checking that the DM_FLAG_ACTIVATED was set, so this check is probably not needed any longer. Is there a way in DM to iterate through only those devices that have been successfully probed or is it my responsibility to check activated before using any ops? + + fdtdec_get_int_array(gd-fdt_blob, dev-of_offset, fake-host-hwaddr, +int_array, ARP_HLEN); + for (i = 0; i ARP_HLEN; i++) + priv-fake_host_hwaddr[i] = (uchar)int_array[i]; + return 0; } static int sb_eth_send(struct udevice *dev, void *packet, int length) { debug(eth_sandbox: Send packet %d\n, length); + struct eth_sandbox_priv *priv = dev-priv; + struct ethernet_hdr *eth = packet; + + if (ntohs(eth-et_protlen) == PROT_ARP) { + struct arp_hdr *arp = packet + ETHER_HDR_SIZE; + if (ntohs(arp-ar_op) == ARPOP_REQUEST) { + /* store this as the assumed IP of the fake host */ + priv-fake_host_ipaddr = NetReadIP(arp-ar_tpa); + /* Formulate a fake response */ + struct ethernet_hdr *eth_recv = + (void *)priv-recv_packet_buffer; + memcpy(eth_recv-et_dest, eth-et_src, ARP_HLEN); + memcpy(eth_recv-et_src, priv-fake_host_hwaddr, + ARP_HLEN); + eth_recv-et_protlen = htons(PROT_ARP); + + struct arp_hdr *arp_recv = + (void *)priv-recv_packet_buffer + + ETHER_HDR_SIZE; + arp_recv-ar_hrd = htons(ARP_ETHER); + arp_recv-ar_pro = htons(PROT_IP); + arp_recv-ar_hln = ARP_HLEN; + arp_recv-ar_pln = ARP_PLEN; + arp_recv-ar_op = htons(ARPOP_REPLY); + memcpy(arp_recv-ar_sha, priv-fake_host_hwaddr, + ARP_HLEN); + NetWriteIP(arp_recv-ar_spa, priv-fake_host_ipaddr); + memcpy(arp_recv-ar_tha, arp-ar_sha, ARP_HLEN); + NetCopyIP(arp_recv-ar_tpa, arp-ar_spa); + + priv-recv_packet_length = ETHER_HDR_SIZE + + ARP_HDR_SIZE; + } + } else if (ntohs(eth-et_protlen) == PROT_IP) { + struct ip_udp_hdr *ip = packet + ETHER_HDR_SIZE; + if (ip-ip_p == IPPROTO_ICMP) { + struct icmp_hdr *icmp = (struct icmp_hdr *)ip-udp_src; + if (icmp-type == ICMP_ECHO_REQUEST) { + /* reply to the ping */ +
[U-Boot] [PATCH 1/2] arm:gplugd: Convert to generic board
Enable CONFIG_SYS_GENERIC_BOARD for Marvell Gplugd. Signed-off-by: Ajay Bhargav ajay.bhar...@einfochips.com --- include/configs/gplugd.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/configs/gplugd.h b/include/configs/gplugd.h index 404c56a..0ac198d 100644 --- a/include/configs/gplugd.h +++ b/include/configs/gplugd.h @@ -26,6 +26,11 @@ #endif /* + * Generic board support + */ +#define CONFIG_SYS_GENERIC_BOARD + +/* * Version number information */ #define CONFIG_IDENT_STRING\nMarvell-gplugD -- 2.3.0 * eInfochips Business Disclaimer: This e-mail message and all attachments transmitted with it are intended solely for the use of the addressee and may contain legally privileged and confidential information. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution, copying, or other use of this message or its attachments is strictly prohibited. If you have received this message in error, please notify the sender immediately by replying to this message and please delete it from your computer. Any views expressed in this message are those of the individual sender unless otherwise stated. Company has taken enough precautions to prevent the spread of viruses. However the company ac cepts no liability for any damage caused by any virus transmitted by this email. * ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Please pull u-boot-marvell master
Hi Tom, this series contains kirkwood patches from Michael. Please pull them when you find the time. The following changes since commit bd2a4888b123713adec271d6c8040ca9f609aa2f: sunxi: configs/sunxi-common.h: Enable CONFIG_CMD_PART (2015-02-11 19:43:45 -0500) are available in the git repository at: git://git.denx.de/u-boot-marvell.git for you to fetch changes up to 43730ba72c176ffc4d9858249475f458203d9757: lsxl: add a README file (2015-02-16 11:44:59 +0100) Michael Walle (4): lsxl: use default load addresses for legacy boot lsxl: place the dtb below the inital ramdisk lsxl: switch from bootm to bootz for boot commands lsxl: add a README file board/buffalo/lsxl/README | 139 ++ include/configs/lsxl.h| 42 -- 2 files changed, 164 insertions(+), 17 deletions(-) create mode 100644 board/buffalo/lsxl/README Regards, Luka ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 07/12] tegra: Make tegra_powergate_power_on public
Will be used for unpowergating CPUs. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- arch/arm/cpu/tegra-common/powergate.c | 2 +- arch/arm/include/asm/arch-tegra/powergate.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/cpu/tegra-common/powergate.c b/arch/arm/cpu/tegra-common/powergate.c index 439cff3..6331cd4 100644 --- a/arch/arm/cpu/tegra-common/powergate.c +++ b/arch/arm/cpu/tegra-common/powergate.c @@ -44,7 +44,7 @@ static int tegra_powergate_set(enum tegra_powergate id, bool state) return -ETIMEDOUT; } -static int tegra_powergate_power_on(enum tegra_powergate id) +int tegra_powergate_power_on(enum tegra_powergate id) { return tegra_powergate_set(id, true); } diff --git a/arch/arm/include/asm/arch-tegra/powergate.h b/arch/arm/include/asm/arch-tegra/powergate.h index 130b58b..2e491f1 100644 --- a/arch/arm/include/asm/arch-tegra/powergate.h +++ b/arch/arm/include/asm/arch-tegra/powergate.h @@ -33,6 +33,7 @@ enum tegra_powergate { int tegra_powergate_sequence_power_up(enum tegra_powergate id, enum periph_id periph); +int tegra_powergate_power_on(enum tegra_powergate id); int tegra_powergate_power_off(enum tegra_powergate id); #endif -- 2.1.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 06/12] virt-dt: Allow reservation of the secure region when it is in a RAM carveout.
From: Ian Campbell i...@hellion.org.uk In this case the secure code lives in RAM, and hence needs to be reserved, but it has been relocated, so the reservation of __secure_start does not apply. Add support for setting CONFIG_ARMV7_SECURE_RESERVE_SIZE to reserve such a region. This will be used in a subsequent patch for Jetson-TK1 Signed-off-by: Ian Campbell i...@hellion.org.uk Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- arch/arm/cpu/armv7/virt-dt.c | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm/cpu/armv7/virt-dt.c b/arch/arm/cpu/armv7/virt-dt.c index ad19e4c..eb95031 100644 --- a/arch/arm/cpu/armv7/virt-dt.c +++ b/arch/arm/cpu/armv7/virt-dt.c @@ -96,6 +96,11 @@ int armv7_update_dt(void *fdt) /* secure code lives in RAM, keep it alive */ fdt_add_mem_rsv(fdt, (unsigned long)__secure_start, __secure_end - __secure_start); +#elif defined(CONFIG_ARMV7_SECURE_RESERVE_SIZE) + /* secure code has been relocated into RAM carveout, keep it alive */ + fdt_add_mem_rsv(fdt, + CONFIG_ARMV7_SECURE_BASE, + CONFIG_ARMV7_SECURE_RESERVE_SIZE); #endif return fdt_psci(fdt); -- 2.1.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 07/12] pxa: colibri_pxa270: disable loadb/s commands and long help
To save more than 20 KB of precious space in NOR flash get rid of the following configuration options: CONFIG_CMD_LOADB CONFIG_CMD_LOADS CONFIG_SYS_LONGHELP Signed-off-by: Marcel Ziswiler mar...@ziswiler.com --- include/configs/colibri_pxa270.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/configs/colibri_pxa270.h b/include/configs/colibri_pxa270.h index bb48419..c2714f7 100644 --- a/include/configs/colibri_pxa270.h +++ b/include/configs/colibri_pxa270.h @@ -52,6 +52,8 @@ */ #include config_cmd_default.h +#undef CONFIG_CMD_LOADB/* Both together */ +#undef CONFIG_CMD_LOADS/* saves 10 KB */ #defineCONFIG_CMD_NET #defineCONFIG_CMD_ENV #undef CONFIG_CMD_IMLS @@ -84,7 +86,7 @@ */ #defineCONFIG_SYS_HUSH_PARSER 1 -#defineCONFIG_SYS_LONGHELP +#undef CONFIG_SYS_LONGHELP /* Saves 10 KB */ #ifdef CONFIG_SYS_HUSH_PARSER #defineCONFIG_SYS_PROMPT $ #else -- 1.9.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 04/12] pxa: balloon3: fix comment about sdram banks
Signed-off-by: Marcel Ziswiler mar...@ziswiler.com --- include/configs/balloon3.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/configs/balloon3.h b/include/configs/balloon3.h index f20a631..e7f0345 100644 --- a/include/configs/balloon3.h +++ b/include/configs/balloon3.h @@ -13,7 +13,7 @@ * High Level Board Configuration Options */ #defineCONFIG_CPU_PXA27X 1 /* Marvell PXA270 CPU */ -#defineCONFIG_BALLOON3 1 /* Balloon3 board */ +#defineCONFIG_BALLOON3 1 /* Balloon3 board */ /* * Environment settings @@ -89,12 +89,12 @@ /* * DRAM Map */ -#defineCONFIG_NR_DRAM_BANKS3 /* 2 banks of DRAM */ +#defineCONFIG_NR_DRAM_BANKS3 /* 3 banks of DRAM */ #definePHYS_SDRAM_10xa000 /* SDRAM Bank #1 */ #definePHYS_SDRAM_1_SIZE 0x0800 /* 128 MB */ #definePHYS_SDRAM_20xb000 /* SDRAM Bank #2 */ #definePHYS_SDRAM_2_SIZE 0x0800 /* 128 MB */ -#definePHYS_SDRAM_30x8000 /* SDRAM Bank #2 */ +#definePHYS_SDRAM_30x8000 /* SDRAM Bank #3 */ #definePHYS_SDRAM_3_SIZE 0x0800 /* 128 MB */ #defineCONFIG_SYS_DRAM_BASE0xa000 /* CS0 */ -- 1.9.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 02/12] remove nowhere used symbol CONFIG_SYS_CLKS_IN_HZ
Basically finish what the following commit started a long time ago: 488f5d8790c451fc527fe5d2ef218f2a5e40ea17 Signed-off-by: Marcel Ziswiler mar...@ziswiler.com --- include/configs/balloon3.h| 1 - include/configs/flea3.h | 2 -- include/configs/mx35pdk.h | 2 -- include/configs/palmld.h | 1 - include/configs/palmtc.h | 1 - include/configs/palmtreo680.h | 1 - include/configs/snowball.h| 1 - include/configs/ti816x_evm.h | 1 - include/configs/u8500_href.h | 1 - include/configs/vexpress_common.h | 1 - include/configs/woodburn_common.h | 2 -- include/configs/zipitz2.h | 1 - 12 files changed, 15 deletions(-) diff --git a/include/configs/balloon3.h b/include/configs/balloon3.h index 2f5a660..8dabc80 100644 --- a/include/configs/balloon3.h +++ b/include/configs/balloon3.h @@ -84,7 +84,6 @@ /* * Clock Configuration */ -#undef CONFIG_SYS_CLKS_IN_HZ #defineCONFIG_SYS_CPUSPEED 0x290 /* 520MHz */ /* diff --git a/include/configs/flea3.h b/include/configs/flea3.h index bf02829..edff0f5 100644 --- a/include/configs/flea3.h +++ b/include/configs/flea3.h @@ -124,8 +124,6 @@ #define CONFIG_SYS_MEMTEST_START 0 /* memtest works on */ #define CONFIG_SYS_MEMTEST_END 0x1 -#undef CONFIG_SYS_CLKS_IN_HZ /* everything, incl board info, in Hz */ - #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR /* diff --git a/include/configs/mx35pdk.h b/include/configs/mx35pdk.h index a145f08..603d17c 100644 --- a/include/configs/mx35pdk.h +++ b/include/configs/mx35pdk.h @@ -146,8 +146,6 @@ #define CONFIG_SYS_MEMTEST_START 0 /* memtest works on */ #define CONFIG_SYS_MEMTEST_END 0x1 -#undef CONFIG_SYS_CLKS_IN_HZ /* everything, incl board info, in Hz */ - #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR /* diff --git a/include/configs/palmld.h b/include/configs/palmld.h index 9480d8d..7dbc9ae 100644 --- a/include/configs/palmld.h +++ b/include/configs/palmld.h @@ -114,7 +114,6 @@ /* * Clock Configuration */ -#undef CONFIG_SYS_CLKS_IN_HZ #defineCONFIG_SYS_CPUSPEED 0x210 /* 416MHz ; N=2,L=16 */ /* diff --git a/include/configs/palmtc.h b/include/configs/palmtc.h index 8abce1b..75506b2 100644 --- a/include/configs/palmtc.h +++ b/include/configs/palmtc.h @@ -116,7 +116,6 @@ /* * Clock Configuration */ -#undef CONFIG_SYS_CLKS_IN_HZ #defineCONFIG_SYS_CPUSPEED 0x161 /* 400MHz;L=1 M=3 T=1 */ /* diff --git a/include/configs/palmtreo680.h b/include/configs/palmtreo680.h index 6490be5..bd0f44b 100644 --- a/include/configs/palmtreo680.h +++ b/include/configs/palmtreo680.h @@ -117,7 +117,6 @@ /* * Clock Configuration */ -#undef CONFIG_SYS_CLKS_IN_HZ #define CONFIG_SYS_CPUSPEED 0x210 /* 416MHz ; N=2,L=16 */ /* diff --git a/include/configs/snowball.h b/include/configs/snowball.h index dacb560..126201c 100644 --- a/include/configs/snowball.h +++ b/include/configs/snowball.h @@ -175,7 +175,6 @@ #define CONFIG_SYS_MAXARGS 32 /* max number of command args */ #define CONFIG_SYS_BARGSIZECONFIG_SYS_CBSIZE /* Boot Arg Buffer Size */ -#undef CONFIG_SYS_CLKS_IN_HZ /* everything, incl board info, in Hz */ #define CONFIG_SYS_LOAD_ADDR 0x0010 /* default load address */ #define CONFIG_SYS_LOADS_BAUD_CHANGE 1 diff --git a/include/configs/ti816x_evm.h b/include/configs/ti816x_evm.h index 87a4efc..f69a559 100644 --- a/include/configs/ti816x_evm.h +++ b/include/configs/ti816x_evm.h @@ -58,7 +58,6 @@ + sizeof(CONFIG_SYS_PROMPT) + 16) /* print buffer size */ #define CONFIG_SYS_BARGSIZECONFIG_SYS_CBSIZE /* boot arg buffer size */ -#undef CONFIG_SYS_CLKS_IN_HZ #define CONFIG_SYS_LOAD_ADDR 0x8100 /* Default load address */ #define CONFIG_CMD_ASKEN diff --git a/include/configs/u8500_href.h b/include/configs/u8500_href.h index 8d7970a..5302b1f 100644 --- a/include/configs/u8500_href.h +++ b/include/configs/u8500_href.h @@ -131,7 +131,6 @@ #define CONFIG_SYS_MAXARGS 32 /* max number of command args */ #define CONFIG_SYS_BARGSIZECONFIG_SYS_CBSIZE /* Boot Arg Buffer Size */ -#undef CONFIG_SYS_CLKS_IN_HZ /* everything, incl board info, in Hz */ #define CONFIG_SYS_LOAD_ADDR 0x0010 /* default load address */ #define CONFIG_SYS_LOADS_BAUD_CHANGE diff --git a/include/configs/vexpress_common.h b/include/configs/vexpress_common.h index 2dea921..989e755 100644 --- a/include/configs/vexpress_common.h +++ b/include/configs/vexpress_common.h @@ -188,7 +188,6 @@ #define CONFIG_BOOTP_PXE_CLIENTARCH0x100 /* Miscellaneous configurable options */ -#undef CONFIG_SYS_CLKS_IN_HZ #define CONFIG_SYS_LOAD_ADDR (V2M_BASE + 0x8000) #define LINUX_BOOT_PARAM_ADDR (V2M_BASE + 0x2000) #define CONFIG_BOOTDELAY 2 diff --git
[U-Boot] [PATCH 00/12] various fixes mainly for pxa and colibri_pxa270
The following is a set of various fixes mainly for PXA and the Toradex Colibri PXA270 introducing it to generic board to save it from becoming obsolete as those modules are still on sale for another 3 to 4 years. Marcel Ziswiler (12): pxa: fix wrong comment about vpac270 being the arch number remove nowhere used symbol CONFIG_SYS_CLKS_IN_HZ pxa: balloon3: remove nowhere used symbol CONFIG_SYS_MEM_BUF_IMP pxa: balloon3: fix comment about sdram banks pxa: balloon3/colibri_pxa270: fix environment optionally being nowhere pxa: colibri_pxa270: migrate to generic board pxa: colibri_pxa270: disable loadb/s commands and long help pxa: colibri_pxa270: avoid overwriting factory configuration block pxa: colibri_pax270: fix CONFIG_BOOTCOMMAND pxa: colibri_pxa270: fix wrong comment about voipac ethernet chip pxa: colibri_pxa270: remove CONFIG_ENV_ADDR_REDUND pxa: colibri_pxa270: integrate latest validated register settings board/balloon3/balloon3.c | 2 +- board/toradex/colibri_pxa270/colibri_pxa270.c | 2 +- include/configs/balloon3.h| 10 ++-- include/configs/colibri_pxa270.h | 77 ++- include/configs/flea3.h | 2 - include/configs/mx35pdk.h | 2 - include/configs/palmld.h | 1 - include/configs/palmtc.h | 1 - include/configs/palmtreo680.h | 1 - include/configs/snowball.h| 1 - include/configs/ti816x_evm.h | 1 - include/configs/u8500_href.h | 1 - include/configs/vexpress_common.h | 1 - include/configs/vpac270.h | 3 +- include/configs/woodburn_common.h | 2 - include/configs/zipitz2.h | 1 - 16 files changed, 47 insertions(+), 61 deletions(-) -- 1.9.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 03/12] pxa: balloon3: remove nowhere used symbol CONFIG_SYS_MEM_BUF_IMP
Signed-off-by: Marcel Ziswiler mar...@ziswiler.com --- include/configs/balloon3.h | 1 - include/configs/vpac270.h | 1 - 2 files changed, 2 deletions(-) diff --git a/include/configs/balloon3.h b/include/configs/balloon3.h index 8dabc80..f20a631 100644 --- a/include/configs/balloon3.h +++ b/include/configs/balloon3.h @@ -190,7 +190,6 @@ #defineCONFIG_SYS_MDMRS_VAL0x00220022 #defineCONFIG_SYS_FLYCNFG_VAL 0x #defineCONFIG_SYS_SXCNFG_VAL 0x -#defineCONFIG_SYS_MEM_BUF_IMP 0x0f /* * PCMCIA and CF Interfaces diff --git a/include/configs/vpac270.h b/include/configs/vpac270.h index 2fb91a8..e54601d 100644 --- a/include/configs/vpac270.h +++ b/include/configs/vpac270.h @@ -297,7 +297,6 @@ #defineCONFIG_SYS_MDMRS_VAL0x #defineCONFIG_SYS_FLYCNFG_VAL 0x #defineCONFIG_SYS_SXCNFG_VAL 0x40044004 -#defineCONFIG_SYS_MEM_BUF_IMP 0x0f /* * PCMCIA and CF Interfaces -- 1.9.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 06/12] pxa: colibri_pxa270: migrate to generic board
Migrate Toradex Colibri PXA270 to use CONFIG_SYS_GENERIC_BOARD. Signed-off-by: Marcel Ziswiler mar...@ziswiler.com --- include/configs/colibri_pxa270.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/configs/colibri_pxa270.h b/include/configs/colibri_pxa270.h index b8df89c..bb48419 100644 --- a/include/configs/colibri_pxa270.h +++ b/include/configs/colibri_pxa270.h @@ -2,6 +2,7 @@ * Toradex Colibri PXA270 configuration file * * Copyright (C) 2010 Marek Vasut marek.va...@gmail.com + * Copyright (C) 2015 Marcel Ziswiler mar...@ziswiler.com * * SPDX-License-Identifier:GPL-2.0+ */ @@ -13,6 +14,7 @@ * High Level Board Configuration Options */ #defineCONFIG_CPU_PXA27X 1 /* Marvell PXA270 CPU */ +#define CONFIG_SYS_GENERIC_BOARD #defineCONFIG_SYS_TEXT_BASE0x0 /* -- 1.9.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 08/12] pxa: colibri_pxa270: avoid overwriting factory configuration block
Specify a CONFIG_BOARD_SIZE_LIMIT of 256 KB in order to avoid overwriting the factory configuration block located at offset 0x4 in NOR flash. Signed-off-by: Marcel Ziswiler mar...@ziswiler.com --- include/configs/colibri_pxa270.h | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/include/configs/colibri_pxa270.h b/include/configs/colibri_pxa270.h index c2714f7..1b1816a 100644 --- a/include/configs/colibri_pxa270.h +++ b/include/configs/colibri_pxa270.h @@ -7,8 +7,8 @@ * SPDX-License-Identifier:GPL-2.0+ */ -#ifndef __CONFIG_H -#define __CONFIG_H +#ifndef__CONFIG_H +#define__CONFIG_H /* * High Level Board Configuration Options @@ -16,6 +16,8 @@ #defineCONFIG_CPU_PXA27X 1 /* Marvell PXA270 CPU */ #define CONFIG_SYS_GENERIC_BOARD #defineCONFIG_SYS_TEXT_BASE0x0 +/* Avoid overwriting factory configuration block */ +#define CONFIG_BOARD_SIZE_LIMIT0x4 /* * Environment settings @@ -100,7 +102,6 @@ #defineCONFIG_CMDLINE_EDITING 1 #defineCONFIG_AUTO_COMPLETE1 - /* * Clock Configuration */ @@ -150,10 +151,11 @@ #endif #defineCONFIG_SYS_MONITOR_BASE 0x0 -#defineCONFIG_SYS_MONITOR_LEN 0x8 +#defineCONFIG_SYS_MONITOR_LEN 0x4 +/* Skip factory configuration block */ #defineCONFIG_ENV_ADDR \ - (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN) + (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN + 0x4) #defineCONFIG_ENV_SIZE 0x4 #defineCONFIG_ENV_SECT_SIZE0x4 #define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE) @@ -219,4 +221,4 @@ #include pxa-common.h -#endif /* __CONFIG_H */ +#endif /* __CONFIG_H */ -- 1.9.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 12/12] tegra: Set CNTFRQ for secondary CPUs
On 2015-02-16 14:37, Mark Rutland wrote: On Mon, Feb 16, 2015 at 12:54:49PM +, Jan Kiszka wrote: We only set CNTFRQ in arch_timer_init for the boot CPU. But this has to happen for all cores. Fixing this resolves problems of KVM with emulating the generic timer/counter. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- arch/arm/cpu/armv7/tegra-common/psci.S | 13 + 1 file changed, 13 insertions(+) diff --git a/arch/arm/cpu/armv7/tegra-common/psci.S b/arch/arm/cpu/armv7/tegra-common/psci.S index b7501fb..119c246 100644 --- a/arch/arm/cpu/armv7/tegra-common/psci.S +++ b/arch/arm/cpu/armv7/tegra-common/psci.S @@ -51,12 +51,25 @@ ENTRY(psci_arch_init) mrc p15, 0, r4, c0, c0, 5 @ MPIDR and r4, r4, #7 @ number of CPUs in cluster + +adr r5, _sys_clock_freq +cmp r4, #0 + +mrceq p15, 0, r7, c14, c0, 0 @ read CNTFRQ from CPU0 +streq r7, [r5] + +ldrne r7, [r5] +mcrne p15, 0, r7, c14, c0, 0 @ write CNTFRQ to CPU1..3 Is it not possible to have a hook that uses the same variable as arch_timer_init rather than doing a here copy? It seems a shame to duplicate the effort. The problem is related to the different address spaces. Here we run in the secure monitor, arch_timer_init - to my understanding - in non-secure mode. Didn't find a pattern so far how to transfer data (and that shouldn't be more complex than the above code). Jan -- Siemens AG, Corporate Technology, CT RTC ITP SES-DE Corporate Competence Center Embedded Linux ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 06/12] virt-dt: Allow reservation of the secure region when it is in a RAM carveout.
On 2015-02-16 14:42, Mark Rutland wrote: On Mon, Feb 16, 2015 at 12:54:43PM +, Jan Kiszka wrote: From: Ian Campbell i...@hellion.org.uk In this case the secure code lives in RAM, and hence needs to be reserved, but it has been relocated, so the reservation of __secure_start does not apply. Add support for setting CONFIG_ARMV7_SECURE_RESERVE_SIZE to reserve such a region. This will be used in a subsequent patch for Jetson-TK1 Using a memreserve and allowing the OS to map the memory but not poke it can be problematic due to the potential of mismatched attributes between the monitor and the OS. OK, here my knowledge is not yet sufficient to process this remark. What kind of problems can arise from what kind of attribute mismatch? And why should the OS be able to cause problems for the monitor? If you're able to carve out the secure memory from the memory node(s), then you should be safe from that. Do you have a pointer to an example how to do it instead? Jan Thanks, Mark. Signed-off-by: Ian Campbell i...@hellion.org.uk Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- arch/arm/cpu/armv7/virt-dt.c | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm/cpu/armv7/virt-dt.c b/arch/arm/cpu/armv7/virt-dt.c index ad19e4c..eb95031 100644 --- a/arch/arm/cpu/armv7/virt-dt.c +++ b/arch/arm/cpu/armv7/virt-dt.c @@ -96,6 +96,11 @@ int armv7_update_dt(void *fdt) /* secure code lives in RAM, keep it alive */ fdt_add_mem_rsv(fdt, (unsigned long)__secure_start, __secure_end - __secure_start); +#elif defined(CONFIG_ARMV7_SECURE_RESERVE_SIZE) +/* secure code has been relocated into RAM carveout, keep it alive */ +fdt_add_mem_rsv(fdt, +CONFIG_ARMV7_SECURE_BASE, +CONFIG_ARMV7_SECURE_RESERVE_SIZE); #endif return fdt_psci(fdt); -- 2.1.4 -- Siemens AG, Corporate Technology, CT RTC ITP SES-DE Corporate Competence Center Embedded Linux ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 09/12] tegra124: Add PSCI support for Tegra124
This is based on Thierry Reding's work and uses Ian Campell's preparatory patches. It comes with full support for CPU_ON/OFF PSCI services. The algorithm used in this version for turning CPUs on and off was proposed by Thierry Reding in http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/210881. It consists of first enabling CPU1..3 via the PMC, just to powergate them again with the help of the Flow Controller. Once the Flow Controller is in place, we can leave the PMC alone while processing CPU_ON and CPU_OFF PSCI requests. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- arch/arm/cpu/armv7/Makefile | 1 + arch/arm/cpu/armv7/tegra-common/Makefile | 1 + arch/arm/cpu/armv7/tegra-common/psci.S| 101 ++ arch/arm/cpu/armv7/tegra124/Makefile | 7 +++ arch/arm/cpu/armv7/tegra124/ap.c | 44 + arch/arm/include/asm/arch-tegra124/flow.h | 5 ++ 6 files changed, 159 insertions(+) create mode 100644 arch/arm/cpu/armv7/tegra-common/psci.S create mode 100644 arch/arm/cpu/armv7/tegra124/Makefile create mode 100644 arch/arm/cpu/armv7/tegra124/ap.c diff --git a/arch/arm/cpu/armv7/Makefile b/arch/arm/cpu/armv7/Makefile index 409e6f5..616b6cc 100644 --- a/arch/arm/cpu/armv7/Makefile +++ b/arch/arm/cpu/armv7/Makefile @@ -59,6 +59,7 @@ obj-$(CONFIG_SOCFPGA) += socfpga/ obj-$(if $(filter stv0991,$(SOC)),y) += stv0991/ obj-$(CONFIG_ARCH_SUNXI) += sunxi/ obj-$(CONFIG_TEGRA20) += tegra20/ +obj-$(CONFIG_TEGRA124) += tegra124/ obj-$(CONFIG_U8500) += u8500/ obj-$(CONFIG_ARCH_UNIPHIER) += uniphier/ obj-$(CONFIG_VF610) += vf610/ diff --git a/arch/arm/cpu/armv7/tegra-common/Makefile b/arch/arm/cpu/armv7/tegra-common/Makefile index 463c260..89355ca 100644 --- a/arch/arm/cpu/armv7/tegra-common/Makefile +++ b/arch/arm/cpu/armv7/tegra-common/Makefile @@ -7,4 +7,5 @@ # SPDX-License-Identifier: GPL-2.0+ # +obj-$(CONFIG_ARMV7_PSCI) += psci.o obj-$(CONFIG_CMD_ENTERRCM) += cmd_enterrcm.o diff --git a/arch/arm/cpu/armv7/tegra-common/psci.S b/arch/arm/cpu/armv7/tegra-common/psci.S new file mode 100644 index 000..b7501fb --- /dev/null +++ b/arch/arm/cpu/armv7/tegra-common/psci.S @@ -0,0 +1,101 @@ +/* + * Copyright (C) 2014, NVIDIA + * Copyright (C) 2015, Siemens AG + * + * Authors: + * Thierry Reding tred...@nvidia.com + * Jan Kiszka jan.kis...@siemens.com + * + * SPDX-License-Identifier:GPL-2.0+ + */ + +#include linux/linkage.h +#include asm/psci.h + + .pushsection ._secure.text, ax + .arch_extension sec + +#define TEGRA_SB_CSR_0 0x6000c200 +#define NS_RST_VEC_WR_DIS (1 1) + +#define TEGRA_RESET_EXCEPTION_VECTOR 0x6000f100 + +#define TEGRA_FLOW_CTRL_BASE 0x60007000 +#define FLOW_CTRL_CPU_CSR 0x08 +#define CSR_ENABLE (1 0) +#define CSR_IMMEDIATE_WAKE (1 3) +#define CSR_WAIT_WFI_SHIFT 8 +#define FLOW_CTRL_CPU1_CSR 0x18 + +@ converts CPU ID into FLOW_CTRL_CPUn_CSR offset +.macro get_csr_reg cpu, ofs, tmp + cmp \cpu, #0@ CPU0? + lsl \tmp, \cpu, #3 @ multiple by 8 (register offset CPU1-3) + moveq \ofs, #FLOW_CTRL_CPU_CSR + addne \ofs, \tmp, #FLOW_CTRL_CPU1_CSR - 8 +.endm + +ENTRY(psci_arch_init) + mov r6, lr + + mrc p15, 0, r5, c1, c1, 0 @ Read SCR + bic r5, r5, #1 @ Secure mode + mcr p15, 0, r5, c1, c1, 0 @ Write SCR + isb + + @ lock reset vector + ldr r4, =TEGRA_SB_CSR_0 + ldr r5, [r4] + orr r5, r5, #NS_RST_VEC_WR_DIS + str r5, [r4] + + mrc p15, 0, r4, c0, c0, 5 @ MPIDR + and r4, r4, #7 @ number of CPUs in cluster + bl psci_get_cpu_stack_top + mov sp, r5 + + bx r6 +ENDPROC(psci_arch_init) + +ENTRY(psci_cpu_off) + bl psci_cpu_off_common + + mrc p15, 0, r1, c0, c0, 5 @ MPIDR + and r1, r1, #7 @ number of CPUs in cluster + + get_csr_reg r1, r2, r3 + + ldr r6, =TEGRA_FLOW_CTRL_BASE + mov r5, #(CSR_ENABLE) + add r5, r1, lsl #CSR_WAIT_WFI_SHIFT + str r5, [r6, r2] + +_loop: wfi + b _loop +ENDPROC(psci_cpu_off) + +ENTRY(psci_cpu_on) + push{lr} + + mov r4, r1 + bl psci_get_cpu_stack_top @ get stack top of target CPU + str r2, [r5]@ store target PC at stack top + dsb + + ldr r6, =TEGRA_RESET_EXCEPTION_VECTOR + ldr r5, =psci_cpu_entry + str r5, [r6] + + get_csr_reg r1, r2, r3 + + ldr r6, =TEGRA_FLOW_CTRL_BASE + mov r5, #(CSR_IMMEDIATE_WAKE | CSR_ENABLE) + str r5, [r6, r2] + + mov r0, #ARM_PSCI_RET_SUCCESS @ Return PSCI_RET_SUCCESS + pop {pc} +ENDPROC(psci_cpu_on) + + .globl psci_text_end +psci_text_end: +