summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap
Commit message (Collapse)AuthorAgeFilesLines
* ARM: omap: Fix error printingSascha Hauer2017-06-271-2/+2
| | | | | | | | | Presumably the code wanted to print the error with the %d format specifier. Actually pass the error code by using PTR_ERR() and not IS_ERR(). While at it use %ld to print a unsigned long variable to get rid of a compiler warning. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* arm: mach-omap: Change mountpoint of boot partitionsDaniel Schultz2017-05-171-11/+25
| | | | | | | | | | | | If using EMMC and SD as bootsources, mounting the boot partition of both devices to /boot makes trouble. Either the correct device is mounted to /boot or a remount of /boot has to be performed. To ensure this problem each MMCn bootsource will be mounted to his own path in /mnt/mmcN.0 Signed-off-by: Daniel Schultz <d.schultz@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* arm: mach-omap: Change file flags in emmc handlerDaniel Schultz2017-05-051-1/+1
| | | | | | | | | This handler tries to read from a file descriptor with 'write only' flags and fails. Add read permissions for the file, so the handler can read the partition layout. Signed-off-by: Daniel Schultz <d.schultz@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* arm: am33xx: Initialize EMIF REG_PR_OLD_COUNTDaniel Schultz2017-01-302-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is based on a patch from the U-Boot and fixes two errors with the LCDC. Original commit message from Jyri Sarha [1]: "Initialize EMIF OCP_CONFIG registers REG_COS_COUNT_1, REG_COS_COUNT_2, and REG_PR_OLD_COUNT field for Beaglebone-Black and am335x-evm. With the default values LCDC suffers from DMA FIFO underflows and frame synchronization lost errors. The initialization values are the highest that work flawlessly when heavy memory load is generated by CPU. 32bpp colors were used in the test. On BBB the video mode used 110MHz pixel clock. The mode supported by the panel of am335x-evm uses 30MHz pixel clock." The register values are generated by testing, because there is no formula to calculate them. Also from Jyri Sarha [1]: "In practice the only rule to find an optimal value is to find as high as possible REG_PR_OLD_COUNT value that does not produce LCDC FIFO underflows under worst case scenario. The worst case happens when the highest pixel clock videomode with maximum bpp is used while memory subsystem is stressed by endless stream of writes hitting the same memory memory bank (can be the same address)." It only contains the BeagleBone Black and the Phytec SoM, because I don't have other boards. [1] https://patchwork.ozlabs.org/patch/704013/ Signed-off-by: Daniel Schultz <d.schultz@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* arm: omap: OMAP_SERIALBOOT needs console supportLucas Stach2017-01-191-0/+1
| | | | | | | It is quite useless without a console and breaks the build. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* arm: am33xx: add reset duration control register address definitionYegor Yefremov2017-01-101-0/+1
| | | | | | | | PRM_RSTTIME register provides settings for global and power domain reset durations. Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2016-10-101-3/+6
|\
| * convert users to %pI4Sascha Hauer2016-09-221-3/+6
| | | | | | | | | | | | | | Convert users of ip_to_string() and print_IPaddr() to %pI4 and remove the now unused functions. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/defenv'Sascha Hauer2016-10-101-3/+0
|\ \
| * | Make generic default environment type a use choiceSascha Hauer2016-10-101-3/+0
| |/ | | | | | | | | | | | | | | So far it was hardcoded for each board if defenv-1 or defenv-2 is used. Make this a user choice so that a particular board no longer enforces a defenv type. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / Add support for Baltos systemsYegor Yefremov2016-10-071-0/+7
|/ | | | | | | | OnRISC Baltos devices are based on a am335x SoC and can be booted either from MMC or NAND. Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* include: Move bulk of boot.h to bootm.hSascha Hauer2016-07-261-1/+1
| | | | | | | | The majority of the stuff currently in include/boot.h is about bootm code implemented common/bootm.c. To be more consistent move it to a new file include/bootm.h. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* OMAP: am33xx_bbu_nand: Extent barebox update handlerTeresa Remmet2016-06-302-24/+33
| | | | | | | | Make it possible to write barebox image to multiple partitions like xload partitions. Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* OMAP: xload: nand: Check for redundant barebox partitionTeresa Remmet2016-06-302-1/+18
| | | | | | | | Add a support for a redundant barebox backup partition if loading barebox image from first barebox partitions fails. Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* OMAP: xload: Factor out reading image from mtd partitionTeresa Remmet2016-06-301-49/+22
| | | | | | | Remove code duplication of reading images out of mtd partitions. Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/mtd'Sascha Hauer2016-05-091-1/+0
|\
| * mtd: nand: omap_gpmc: Remove BCH4 supportTeresa Remmet2016-04-121-1/+0
| | | | | | | | | | | | | | This has no users and seems to be untested. Removed it. Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/include-pdata'Sascha Hauer2016-05-091-1/+1
|\ \
| * | include: Move ns16550 serial platform_data to include/platform_dataSascha Hauer2016-04-151-1/+1
| |/ | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/include-cleanup'Sascha Hauer2016-05-092-3/+3
|\ \
| * | string: Fix (v)asprintf prototypesSascha Hauer2016-04-152-3/+3
| |/ | | | | | | | | | | | | | | | | | | Our asprintf and vasprintf have different prototypes than the glibc functions. This causes trouble when we want to share barebox code with userspace code. Change the prototypes for (v)asprintf to match the glibc prototypes. Since the current (v)asprintf are convenient to use change the existing functions to b(v)asprintf. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / fix erasing/protecting flashes with unspecified sizeSascha Hauer2016-04-192-2/+2
|/ | | | | | | | | | | | | | | | | fixes: 81737c1 mtd: Fix erasing of devices >4GiB Several places erased a complete flash partition passing ~0 as count to erase(). With the above commit count to erase was changed from an unsigned type to a signed type, so the (count > f->size - offset) check in erase() no longer triggers and the ~0 count is no longer adjusted to the whole device size. Among other things this results in saveenv failures on NOR flashes. This patch fixes this by introducing an explicit macro for erasing the whole device which is tested for in erase(). All other negative values are rejected. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reported-by: Giorgio <giorgio.nicole@arcor.de>
* ARM: AM335x: Make use of ARM_USE_COMPRESSED_DTBTeresa Remmet2016-02-171-0/+1
| | | | | | | | | | Use ARM_USE_COMPRESSED_DTB for all AM335x based board, to reduce the image size even more. Saves about 9kB in MLO image and 20kB in barebox image. Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/fit'Sascha Hauer2016-02-081-0/+5
|\
| * bootm: Push dryrun to handlersSascha Hauer2016-01-261-0/+5
| | | | | | | | | | | | | | We can make the dryrun option more useful by calling into the handlers. With this we can detect more cases that can go wrong during boot. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | arm: am33xx: Master Osc clock speed handlingDaniel Schultz2016-01-262-2/+8
| | | | | | | | | | | | | | | | | | Setup the plls with Master Osc. clock speed from the SYSBOOT Configuration Pin. Signed-off-by: Daniel Schultz <d.schultz@phytec.de> Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | arm: am33xx: Move function to read from Master OSCDaniel Schultz2016-01-263-17/+31
|/ | | | | | | | | Move the function to read the Master OSC speed from the SYSBOOT Configuration Pin for reuse. Signed-off-by: Daniel Schultz <d.schultz@phytec.de> Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: Omap3: Remove useless inlineSascha Hauer2015-12-102-2/+2
| | | | | | | | | | Silences gcc5 warning: In file included from arch/arm/mach-omap/gpmc.c:31:0: arch/arm/mach-omap/include/mach/sys_info.h:93:83: warning: inline function 'get_sysboot_value' declared but never defined Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: omap: Use correct device to mount on /bootSascha Hauer2015-11-101-14/+7
| | | | | | | | | | | | | | | The current code tests if a partition (i.e. disk0.0) exists and instead of mounting boot from this partition it uses the whole device (disk0). This only works because the the FAT code accepts a MBR as input and automatically skips it. Let the code use the partition to mount /boot instead as it was intended. We don't have to stat() the partition device, since this error will be caught by mount() anyway, so remove the unnecessary stat(). Reported-by: Peter Mamonov <pmamonov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* omap socfpga: Switch in flash env loading to use different configTrent Piepho2015-11-051-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | On these systems, the base arch has code to load the in flash environment from a file located in a FAT filesystem. This was controlled by the config option DEFAULT_ENVIRONMENT. However, that option turns on compiling the env into the barebox binary itself, as a backup if the in flash env can't be loaded. Most other boards have in flash env support unconditionally. But omap and socfpga also have xloader configurations, which aren't supposed to have environment support, either in flash or compiled in. If the in flash env code were unconditional, then the xloaders would gain it. So the code depends on ENV_HANDLING, which is only set on those boards that are supposed to have an in flash env and not set on all the boards that aren't supposed to have it. If someone wanted to create a board that did have a saved env, but used an alternate to this generic omap/socfpga file in FAT method, then they'd probably want to create a new config option to control this code and have it not be enabled for their board. Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* xload: be more flexible when searching for second stage bootloader.Vicente Bergas2015-10-021-1/+3
| | | | | | | | | | | | | | | | A first stage bootloader can read fat and ext4 filesystems, and even both can be compiled-in at the same time. But then xload has a hardcoded fat filesystem mount option which renders ext4 unusable. This patch tries to mount it as ext4 if the fat attempt fails. Then, a typical use case of an ext4 formatted filesystem is it to be a standard linux filesystem, which contains boot-related files in /boot. So, when searching for the second stage bootloader, try /boot/barebox.bin after not finding it in /barebox.bin Signed-off-by: Vicente Bergas <vicencb@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: am33xx: Enable ethernet node on NET bootWadim Egorov2015-09-291-0/+3
| | | | | Signed-off-by: Wadim Egorov <w.egorov@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: am33xx: Add barebox_update eMMC optionDaniel Schultz2015-09-094-0/+121
| | | | | | | | | | | | | | | | | | | | | With this patch the barebox_update command will be extended by the possibility to flash the MLO to eMMC devices. The MLO will be flashed to the following addresses: 0x00000 0x20000 0x40000 0x60000 Because the first 512 Bytes of the MLO are reserved for the CHSETTINGS header and this only use ~80 Bytes, there is space for the partition table in the header. The command will overwrite the bootstrap code area and will hold the partition table and the Boot signature. Signed-off-by: Daniel Schultz <d.schultz@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* restart: replace reset_cpu with registered restart handlersSascha Hauer2015-08-277-24/+15
| | | | | | | | | | | | | | | | | | | | | | This replaces the reset_cpu() function which every SoC or board must provide with registered handlers. This makes it possible to have multiple reset functions for boards which have multiple ways to reset the machine. Also boards which have no way at all to reset the machine no longer have to provide a dummy reset_cpu() function. The problem this solves is that some machines have external PMICs or similar to reset the system which have to be preferred over the internal SoC reset, because the PMIC can reset not only the SoC but also the external devices. To pick the right way to reset a machine each handler has a priority. The default priority is 100 and all currently existing restart handlers are registered with this priority. of_get_restart_priority() allows to retrieve the priority from the device tree which makes it possible for boards to give certain restart handlers a higher priority in order to use this one instead of the default one. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2015-08-062-4/+27
|\
| * ARM: am33xx: netboot use ramfsJan Remmet2015-07-082-4/+27
| | | | | | | | | | | | | | | | | | | | Older tftp server don't send the file size. Then tftpfs needs temporary place to store the file. mount ramfs and then tftpfs in a own mount point Signed-off-by: Jan Remmet <j.remmet@phytec.de> Tested-by: Wadim Egorov <w.egorov@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/am335x'Sascha Hauer2015-08-066-17/+61
|\ \
| * | ARM: OMAP: AM33xx: add uart1 pinmux setupMichael Grzeschik2015-07-242-0/+13
| | | | | | | | | | | | | | | Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ARM: am335x: Changed timerDaniel Schultz2015-07-204-17/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | The 32KHz from dmtimer0 is derived from a SoC internal RC oscillator which is quite inaccurate. Switch to dmtimer2 which is driven from the high frequency oscillator clock. Signed-off-by: Daniel Schultz <d.schultz@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | xload: fix use after freeMichael Grzeschik2015-07-271-2/+3
|/ / | | | | | | | | | | | | | | The variable partname is used in the error path for debugging. We have to free it after this use. Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / ARM: omap: xload: Fix func uninitialized warningSascha Hauer2015-07-131-0/+1
|/ | | | | | | When doing USB boot without having it enabled in the config func is used unitialized. Explicitly set this to NULL so that booting fails in this case. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/omap'Sascha Hauer2015-07-037-25/+220
|\ | | | | | | | | Conflicts: arch/arm/boards/beagle/board.c
| * ARM: beagleboard: Move to multiimage supportSascha Hauer2015-07-021-7/+7
| | | | | | | | | | | | | | | | | | | | Breathe some life back into the beagleboard: - switch to multiimage support - update config - initialize early UART for debugging Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: OMAP: Add omap3 USB loader toolSascha Hauer2015-07-025-2/+210
| | | | | | | | | | | | | | | | | | | | | | | | The OMAP3 supports uploading the first stage bootloader via USB. The ROM leaves the MUSB controller enabled and it can then be used to upload a 2nd stage image. This patch adds the omap3-usb-loader tool and the necessary barebox support to upload the 2nd stage image. The omap usb loader tool is downloaded from https://github.com/grant-h/omap_loader and changed to also accept CHSETTINGS images. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: OMAP3: Change DSS divider to the one U-Boot usesSascha Hauer2015-07-021-1/+1
| | | | | | | | | | | | | | | | | | U-Boot uses 2 as the DSS divider, so do the same in barebox. This shouldn't currently have any effect to barebox, but makes porting some U-Boot code easier which makes assumptions about the DSS clock rate. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: OMAP: remove unused CONFIG_OMAP3_CLOCK_CONFIG optionSascha Hauer2015-06-223-15/+2
| | | | | | | | | | | | | | All boards have this option enabled and there should be no reason to disable it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ARM: AM335x: replace specific barebox update handler with generic oneSascha Hauer2015-07-012-59/+2
|/ | | | | | | The AM335x SPI NOR barebox update handlers only writes a file to a device, so use the generic handler for this purpose. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: am33xx: Add network bootWadim Egorov2015-06-053-0/+63
| | | | | Signed-off-by: Wadim Egorov <w.egorov@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: am33xx: Fix SCRM compatible string to match new DT compatible stringWadim Egorov2015-05-151-1/+1
| | | | | | | | | | Commit 461f8cfc7ea788428240271818363333ceff5c4c renamed the SCRM compatible string in am33xx.dtsi and breaks all am335x based boards. Rename the SCRM compatible string. Signed-off-by: Wadim Egorov <w.egorov@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: am33xx: Add support for reset reason detectionWadim Egorov2015-03-022-0/+37
| | | | | | | Also activate in defconfig. Signed-off-by: Wadim Egorov <w.egorov@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>