summaryrefslogtreecommitdiffstats
path: root/arch
Commit message (Collapse)AuthorAgeFilesLines
* ARM: rpi: Add mini UART debug_ll supportSascha Hauer2019-03-061-0/+37
| | | | | | | The raspberry pi 3 comes up with the mini UART as default, so allow to use it for debug_ll output. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: rpi: move debug UART Kconfig settingsSascha Hauer2019-03-062-24/+8
| | | | | | | | | | | | In contrast to other architectures, R.Pi debug UART config was placed under the "System Type" menu, not under the "Debugging -> low-level debugging port". This made this setting easy to miss when enabling low level debug mesages. While at it use the existing base address defines rather than defining them again in Kconfig. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* debug_ll: Move pl011 header file to architecture independent placeSascha Hauer2019-03-066-30/+5
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: rpi: Move UART base address definitions to header fileSascha Hauer2019-03-062-4/+5
| | | | | | Move defines to header file to make them reusable. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: rpi: save bootargs from VC FDT to vc.bootargsTomaz Solc2019-03-041-0/+47
| | | | | | | | | | | | | | | | When booting a Raspberry Pi, it is useful to extract bootargs from the device tree that was created by the VideoCore firmware. These bootargs contain for example settings for the framebuffer that the kernel needs to properly set the video output. This commit extracts the bootargs in the board initialization code and saves them to the vc.bootargs global variable. For example, a bootloader environment can then add the contents of this variable to linux.bootargs.vc, which then gets included into the final bootargs for the kernel using CONFIG_FLEXIBLE_BOOTARGS. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: rpi: save fdt that was passed from VideoCoreTomaz Solc2019-03-043-19/+92
| | | | | | | | | | | | | | | | | | | | On Raspberry Pi, VideoCore firmware creates a device tree that contains information about peripherals that were initialized by VideoCore based on settings in config.txt. Normally this device tree is passed to the Linux kernel via a pointer in the r2 register. A bootloader needs to pass this device tree to the kernel, or some peripherals will not work correctly. Since the VideoCore device tree is not compatible with barebox, we can't just pass it to barebox_arm_entry() as the internal barebox device tree. This commit makes the prebootloader code copy the device tree from VideoCore into a scrap RAM area just above the area reserved for the bootloader. Board initialization code in the bootloader proper then copies it into a file /vc.dtb. The bootloader environment is then free to pass this file to the kernel at boot (e.g. via bootm -o). Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: start: save end of memory passed to start.Tomaz Solc2019-03-042-0/+9
| | | | | | | | Knowing the address of the end of the memory area used by Barebox is useful if PBL stores some extra data after it, so that board init code can later retrieve it from there. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: rpi: add CONFIG_PINCTRL to rpi_defconfig.Tomaz Solc2019-02-191-1/+1
| | | | | | Required for emmc pin function switching on Raspberry Pi 3. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: rpi: Add device tree for Compute Module 3.Tomaz Solc2019-02-194-0/+35
| | | | | | | Compute Module needs "no-sd" property on the MMC interface otherwise mci-bcm2835 hangs on SD card probe. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* pinctrl: bcm2835: move existing code from gpio.Tomaz Solc2019-02-191-1/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: rpi: switch emmc from sdhost to sdhciTomaz Solc2019-02-191-0/+9
| | | | | | | | | | BCM2837 has two mmc interfaces: sdhost and sdhci. On Raspberry Pi 3, sdhost is normally used for SD card/MMC flash and sdhci for the wireless interface. Barebox currently only has a driver for sdhci, so we disable the sdhost interface and remap the pins so that the sdhci has access to the SD card/MMC flash. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/rpi'Sascha Hauer2019-02-136-55/+84
|\
| * ARM: rpi: complete new revision schemeMoritz Augsburger2019-02-052-24/+47
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: rpi: make locally used functions staticRoland Hieber2019-02-052-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These functions are not meant to be a public interface, so they can well be static. rpi_b_plus_init() was previously declared with a prototype, which is no longer needed. This fixes the following build warnings: .../arch/arm/boards/raspberry-pi/rpi-common.c:124:6: warning: no previous prototype for 'rpi_add_led' [-Wmissing-prototypes] void rpi_add_led(void) ^~~~~~~~~~~ .../arch/arm/boards/raspberry-pi/rpi-common.c:141:6: warning: no previous prototype for 'rpi_b_init' [-Wmissing-prototypes] void rpi_b_init(void) Signed-off-by: Roland Hieber <rhi@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: rpi: use defines for uart basesRouven Czerwinski2019-02-051-3/+7
| | | | | | | | | | | | | | | | Previously the clkdev_add_phybase was called on magic register values, add defines which clarify the device for which the phybase clkdev is created. Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: rpi: choose miniuart as stdoutRouven Czerwinski2019-02-051-6/+1
| | | | | | | | | | | | | | | | | | Since we now support the miniuart, enable it as the default stdout port. With this change the device tree overlay to switch the miniuart to bluetooth is no longer necessary. Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: rpi: add NS16550 supportRouven Czerwinski2019-02-051-0/+1
| | | | | | | | | | | | | | | | Since the 16550 driver now supports the RPI3 miniuart, enable it in the default config. Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: rpi: retrieve miniuart clock from firmwareRouven Czerwinski2019-02-051-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | The miniuart uses the core clock as the clock source. This clock is fixed by the firmware to 250Mhz if enable_uart=1 is set in the config.txt file. However a user could still choose to overclock the core frequency, which would result in wrong baudrates computed by barebox. Retrieve the core clock frequency from the firmware to allow all potential firmware configurations to work with barebox. Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: rpi: move clks into board specific rpi-commonRouven Czerwinski2019-02-052-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | We don't know if the firmware running on the raspberry pi is the same firmware which is running on all bcm283x devices. Therefore move the console clock initialization into the rpi-common.c board file. A future commit will use this function to retrieve the miniuart clock from the raspberry pi firmware. No functional changes. Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: rpi: fix typo in rpi-common.cRouven Czerwinski2019-02-051-2/+2
| | | | | | | | | | Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/pci'Sascha Hauer2019-02-131-1/+2
|\ \
| * | PCI: Convert ->res_start() to return resource_size_tAndrey Smirnov2019-01-161-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On 64-bit machines int doesn't cover full address space, so convert .res_start to both accept resource_size_t as a parameter and return it as result. Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/mmc-esdhc'Sascha Hauer2019-02-139-88/+26
|\ \ \
| * | | mci: imx-esdhc: move platform_dataSascha Hauer2019-02-062-49/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | move platform_data from mach-imx/include/mach/ to include/platform_data where it's available for other architectures aswell. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mci: imx-esdhc: use dev_idSascha Hauer2019-02-068-39/+25
| | |/ | |/| | | | | | | | | | | | | | | | Avoid using cpu_is_* macros and use a dev_id instead. This will make it easier to integrate the driver into another architecture. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/misc'Sascha Hauer2019-02-1323-441/+51
|\ \ \
| * | | ARM: omap: Wago PFC200: Initialize switch registersSascha Hauer2019-01-281-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The PFC200 has a KSZ886x switch connected. Some of its registers need to be initialized for proper ehternet support. Add the initialization code. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Cc: Heinrich.Toews@wago.com
| * | | ARM: netx: delete unused netx-devices.hAlexander Shiyan2019-01-211-73/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes the stale netx-devices.h include as there is no user of it. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: at91: delete unused mach/sama5d3_matrix.hAlexander Shiyan2019-01-211-15/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes the stale mach/sama5d3_matrix.h include as there is no user of it. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | PPC: delete unused asm/mc146818rtc.hAlexander Shiyan2019-01-211-27/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes the stale asm/mc146818rtc.h include as there is no user of it. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | PPC: delete unused asm/e300.hAlexander Shiyan2019-01-211-130/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes the stale asm/e300.h include as there is no user of it. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: mvebu: delete unused mach/dove.hAlexander Shiyan2019-01-211-23/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes the stale mach/dove.h include as there is no user of it. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: imx: delete unused mach/clock-imx1.hAlexander Shiyan2019-01-211-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes the stale mach/clock-imx1.h include as there is no user of it. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: omap: delete unused mach/am33xx-devices.hAlexander Shiyan2019-01-211-80/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes the stale mach/am33xx-devices.h include as there is no user of it. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: mvebu: delete unused mach/kirkwood.hAlexander Shiyan2019-01-211-22/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes the stale mach/kirkwood.h include as there is no user of it. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: omap: Remove reference to non-existent HAVE_DEFAULT_ENVIRONMENT_NEW symbolAlexander Shiyan2019-01-211-1/+0
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: qemu-virt64: Remove orphan KconfigAlexander Shiyan2019-01-211-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | arch/arm/boards/qemu-virt64/Kconfig is not used by build system, so it can be removed. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | treewide: Remove trailing whitespaces and tabsAlexander Shiyan2019-01-213-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Just a cleanup over barebox tree Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | move umode_t typedef from asm/types.h to linux/types.hAntony Pavlov2019-01-189-22/+0
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | MIPS: asm/types.h: drop unused stuffAntony Pavlov2019-01-181-29/+0
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | Merge branch 'for-next/mips'Sascha Hauer2019-02-1312-66/+99
|\ \ \ \
| * | | | MIPS: ath79: add spi and sram bootstrap helpersOleksij Rempel2019-01-247-0/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At least some ath79 SoC have build in 32K RAM. It allow us to use lowlevel portion of barebox to bootstrap the system by using JTAG debugger (For example OpenOCD). Since ath79 has no reliable way to stop the CPU execution before reading SPI Flash, this can cause different issues. To avoid it, we need to flash a execution trap with software debug breakpoint to the flash. The workflow should be as follow: - After power on or reset the CPU will start execution of SPI flash. As soon as software debug breakpoint is executed, CPU will halt and notify OpenOCD about breakpoint event. - OpenOCD will load reduced barebox to SRAM and execute it. This part will do all needed low level initialization - PLL, RAM and trigger second breakpoint event. - OpenOCD will load full barebox version to the main RAM and start execution. It can be used for bring-up, so no regular flashing is needed. Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | MIPS: black-swift: use ar9331_pbl_generic_startOleksij Rempel2019-01-241-28/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | most ar9331 boards are almost identical. Remove as much duplicate code as possible. Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | MIPS: tplink-mr3020: use ar9331_pbl_generic_startOleksij Rempel2019-01-241-28/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | most ar9331 boards are almost identical. Remove as much duplicate code as possible. Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | MIPS: drop *_MULTI_BOARDS atavismsAntony Pavlov2019-01-223-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | | Merge branch 'for-next/lseek'Sascha Hauer2019-02-132-2/+0
|\ \ \ \ \
| * | | | | devfs: Drop dev_lseek_default()Andrey Smirnov2019-01-292-2/+0
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only the following cdevs do not declare an .lseek() operation: - Console devices in common/console.c - Firmware framework in common/firmware.c - JTAG driver in drivers/misc/jtag.c - UBI in drivers/mtd/ubi/barebox.c Of those four, first two are marked DEVFS_IS_CHARACTER_DEV and implement only .write() operation and the last two don't implement anything but .ioctl(). While there's probably no meaningful way to use lseek() against any of those devices, there doesn't seem to be any harm in allowing it either. Change devfs_lseek() to ignore absense of .lseek() callback and drop dev_lseek_default() and all references to it in the codebase. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | | Merge branch 'for-next/imx'Sascha Hauer2019-02-1326-20/+2230
|\ \ \ \ \
| * | | | | ARM: i.MX8MQ: Add corner case for Rev 2.1 siliconAndrey Smirnov2019-02-121-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rev 2.1 of i.MX8MQ silicon needs a special check different from predecessor. Add all of the neccessary code to do just that (based on similar code in vendor U-Boot tree). Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | ARM: i.MX8MQ: Read only ROM version majorAndrey Smirnov2019-02-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't read all 32-bits located at IMX8MQ_ROM_VERSION_*0 since that, besides ROM version major in LSB, willl also contain minor components which we don't account for in the following checks. Change the code to only read LSB instead. This is a port of a vendor U-Boot[1] commit 0377dc881a96b46d858643dfaa5f9ef0dd4acccc ("MLK-19465 imx8mq: Fix cpu rev issue on B0.1 chip") [1] https://source.codeaurora.org/external/imx/uboot-imx Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>