summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx/imx-bbu-internal.c
Commit message (Collapse)AuthorAgeFilesLines
* ARM: i.MX: remove unused imx-flash-header.hSascha Hauer2016-04-011-1/+0
| | | | | | | All i.MX images are nowadays built with the imx-image tool, so we do not need the header files and Kconfig options anymore. Remove them. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX: bbu-internal: detect device before writing to itSascha Hauer2016-03-021-0/+3
| | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Tested-by: Stefan Christ <s.christ@phytec.de>
* sizes.h: move include/sizes.h to include/linux/sizes.hMasahiro Yamada2015-01-081-1/+1
| | | | | | | | | | | | | | This file originates in Linux. Linux has it under include/linux/ directory since commit dccd2304cc90. Let's move it to the same place as well in barebox. This commit was generated by the following commands: find -name '*.[chS]' | xargs sed -i -e 's:<sizes.h>:<linux/sizes.h>:' git mv include/sizes.h include/linux/ Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX5: internal NAND update: simplify codeSascha Hauer2014-07-241-24/+9
| | | | | | | | Allocate space for the resulting image (FCB+DBBT+Firmware) in imx_bbu_internal_v2_write_nand_dbbt() instead of its caller to make the code simpler. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX5: internal NAND update: Use variables for some constantsSascha Hauer2014-07-241-6/+10
| | | | | | | Instead oof using the same constants multiple times use a variable to make the meaning of the constants clear. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX5: internal NAND update: Fix firmware start page for internal nand bootSascha Hauer2014-07-241-0/+3
| | | | | | | | | | | Documentation clearly states that the FCB at offset 0x68 has to contain the start page of the firmware. In our case this was set to 0x0. I don't know how this could ever work, but it did, at least until: 15ee301 ARM: i.MX: bbu-internal: optionally use DCD data from image Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX5: internal NAND update: Use variable for pre_image_sizeSascha Hauer2014-07-241-6/+9
| | | | | | | | | We have the hardcoded value 0x8000 for the space needed for FCB and DBBT in several places. Use a variable instead and initialize it correctly with 12 * meminfo.writesize (which is in fact 0x6000 for 2k pagesize). Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX bbu: Add update handler for external NOR bootSascha Hauer2014-06-131-1/+45
| | | | | | | | External NOR boot only requires copying the image to NOR Flash. This also adds (un)protecting the flash which is required for NOR Flash. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX: bbu: remove dcd arguments from bbu registrationSascha Hauer2014-05-091-223/+40
| | | | | | | | | | | The i.MX barebox update handlers take an optional dcd table as argument. This can be used to add the correct dcd data to the image before flashing it. This mechanism is quite complicated and largely unused, so remove it. With this it is only possible to flash the exact image passed to barebox_update, which is what is mostly done anyway. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* treewide: fix signedness mixups in printf format specifiersLucas Stach2014-04-231-2/+2
| | | | | | | | | This most likely doesn't fix any real bugs, but it's the right thing to do and reduces the noise level with static checkers. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* barebox: remove double semicolonsAlexander Aring2013-11-181-1/+2
| | | | | Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX: bbu-internal: optionally use DCD data from imageSascha Hauer2013-08-061-26/+50
| | | | | | | | We used to pass the DCD data from the boards. This patch allows to optionally skip passing DCD data. In this case the DCD data from the flash image is used if present. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX: bbu-internal: factor out a prereq functionSascha Hauer2013-08-061-12/+18
| | | | | | To elminate some code duplication. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/imx'Sascha Hauer2012-12-071-12/+107
|\ | | | | | | | | Conflicts: arch/arm/mach-imx/include/mach/devices-imx53.h
| * ARM i.MX bbu internal: Add spi/i2c supportSascha Hauer2012-12-061-0/+54
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM i.MX bbu: Add i.MX6 MMC handlerSascha Hauer2012-12-061-0/+14
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM i.MX bbu: Allow to have no DCDSascha Hauer2012-12-061-6/+16
| | | | | | | | | | | | | | | | Some boards do not have a DCD table since they initialize everything in code, so allow to skip it and leave the corresponding pointers empty. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM i.MX bbu: Allow to overwrite app_destSascha Hauer2012-12-061-6/+23
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/ext4'Sascha Hauer2012-12-071-2/+2
|\ \ | |/ |/|
| * filetype: Pass bufsizeSascha Hauer2012-12-031-2/+2
| | | | | | | | | | | | | | | | | | | | Pass the buffer size to the file detection code. This makes sure we do not read past the buffer. This is especially useful for ext filesystem detection as the magic is at byte offset 1080. Also introduce a FILE_TYPE_SAFE_BUFSIZE define which is set to the minimum bufsize the detection code needs to detect all known filetypes. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ARM i.MX bbu: Fix wrong buffer freeSascha Hauer2012-12-031-1/+1
|/ | | | | | buf is still needed, instead mbr should be freed. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM i.MX bbu: Fix compiling with DEBUG enabledSascha Hauer2012-11-271-3/+3
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM i.MX: Add barebox update handler for internal bootSascha Hauer2012-10-171-0/+543
This adds support for an update handler for internal boot. Currently handled are: - v1 MMC/SD - v2 MMC/SD - v2 NAND where v1 is found on i.MX25, i.MX35 and i.MX51. v2 is found on i.MX53. This code intentionally does not use the DCD data compiled into every i.MX internal boot image. This makes it possible to make a pure second stage barebox bootable on i.MX internal boot devices later. This has been tested on the i.MX51 babbage, i.MX53 loco and i.MX53 tx53 board. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>