summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | drivers: base: Drop dev_get_mem_region_by_name()Andrey Smirnov2018-10-292-16/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Drop dev_get_mem_region_by_name() which doesn't seem to have any users in the codebase. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | drivers: base: Simplify generic_memmap_ro()Andrey Smirnov2018-10-291-14/+7
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | Simplify generic_memmap_ro() by re-implementing it using generic_memmap_rw(). Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | Merge branch 'for-next/at91'Sascha Hauer2018-11-0996-1718/+1352
|\ \ \ \
| * | | | ARM: at91: remove unused definesSascha Hauer2018-11-0610-133/+0
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | ARM: at91: separate restart handler registration into SoC specific codeSascha Hauer2018-11-0617-45/+111
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | ARM: at91: make at91sam926x_board_init board specificSascha Hauer2018-11-068-17/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The base addresses used in at91sam926x_board_init() differ with each SoC. The board knows which SoC we are running on though, so create and use SoC specific variants of these functions which pass the appropriate base addresses to at91sam926x_board_init(). Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | ARM: at91: drop at91_pmc_write()/at91_pmc_read()Sascha Hauer2018-11-063-7/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | at91_pmc_write() and at91_pmc_read() need a compile time base address, so remove them. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | ARM: at91rm9200ek: use plain readl/writel for pmc accessesSascha Hauer2018-11-062-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | at91_pmc_write() needs a compile time base address, so rather use plain read/writel. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | ARM: at91sam926x use writel rather than pmc accessor functionSascha Hauer2018-11-061-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The pmc accessor function depends on a compile time base address, so rather use writel directly. In this case we can hardcode the base address again since all at91sam926x SoCs have the same pmc base address. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | ARM: at91: remove mach/io.hSascha Hauer2018-11-0646-83/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove at91_sys_read() and at91_sys_write() since these are no longer used. This makes mach/io.h empty so remove that aswell. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | ARM: at91rm9200 timer: Make system timer defines SoC specificSascha Hauer2018-11-063-55/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - rename at91_st.h to at91rm9200_st.h - rename prefix from AT91_ to AT91RM9200_ - remove register offset from System timer defines Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | ARM: at91rm9200 timer: remove unused includeSascha Hauer2018-11-061-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | at91rm9200_time.c doesn't need anything from at91_pmc.h, remove the inclusion. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | ARM: at91: remove unused header fileSascha Hauer2018-11-062-147/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nothing from mach/at91_tc.h is used, remove it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | ARM: at91rm9200: Add SoC namespace to memory controller definesSascha Hauer2018-11-064-166/+171
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | ARM: at91: Use SoC specific base addresses where appropriateSascha Hauer2018-11-069-23/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace AT91_ base addresses with their SoC specific variants where possible. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | ARM: at91: Add SoC namespace to matrix definesSascha Hauer2018-11-0522-563/+575
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add SoC namespace to matrix define so we have one source less of conflicting defines. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | ARM: at91: remove common matrix header fileSascha Hauer2018-11-052-31/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The common matrix header file can be removed when the users include the SoC specific one. Fix the only user and remove the file. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | ARM: at91: consolidate phy reset functionsSascha Hauer2018-11-0513-150/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many boards have the same ethernet phy reset function, so share the code in a common function. While at it remove the AT91_RSTC offset from the rstc register defines. AT91_RSTC was the offset between the AT91_SYSTEM_BASE and the reset controller. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | ARM: at91: remove AT91_SDRAM_BASESascha Hauer2018-11-055-13/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AT91_SDRAM_BASE is only used in board code which known the SDRAM base address, so we do not need a common define. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | ARM: at91: drop AT91_NB_USARTSascha Hauer2018-11-0510-20/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AT91_NB_USART only used to return an error from at91_register_uart() if an invalid UART number is passed. This will never happen as the linker fails earlier in that case, so the runtime check can be removed and with it the now unused AT91_NB_USART define. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | ARM: at91: remove unused definesSascha Hauer2018-11-059-126/+4
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | ARM: at91sam926x: Add header for at91sam926x common base addressesSascha Hauer2018-11-051-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are some base addresses common to at91sam926x. Add a separate header for these. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | ARM: at91rm9200ek: Use SoC specific definesSascha Hauer2018-11-051-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use AT91RM9200_BASE_PIOC rather than AT91_BASE_PIOC so we can get rid of the latter later. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | ARM: at91: remove unused CONSISTENT_DMA_SIZE definesSascha Hauer2018-11-053-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CONSISTENT_DMA_SIZE is unused, remove it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | ARM: at91: remove unused AT_DMA_ID_ definesSascha Hauer2018-11-054-120/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The defines are unused and not properly namespaced, so remove them. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | ARM: at91: Add initial support for the EVB-KSZ9477 eval boardAhmad Fatoum2018-11-059-1/+270
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The EVB-KSZ9477 is an evaluation board for the KSZ9477 ethernet switch. This board is equipped with a atsama5d3 SoC with 256MiB of SDRAM, 256MiB of NAND flash and a SD card slot. For now only second stage booting is supported with AT91bootstrap as first stage loader. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | | Release v2018.11.0v2018.11.0Sascha Hauer2018-11-091-1/+1
| |_|/ / |/| | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | mtd: nand_denali: update compatibleBastian Krause2018-11-071-1/+1
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | 190a1c6e47 ("dts: update to v4.18-rc3") changed the compatible of the Denali NAND controller. Update the compatible in the barebox driver accordingly. Signed-off-by: Bastian Krause <bst@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | arm: at91: fix sdram controller initAhmad Fatoum2018-11-051-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | e739663535 confused parameters to __raw_writel. The value and the base address was mixed up. Fixes: e739663535 (arm: at91: code cleanup in at91sam926x_board_init) Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | kconfig: Avoid format overflow warning from GCC 8.1Sascha Hauer2018-11-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Linux commit 2ae89c7a82ea9d81a19b4fc2df23bef4b112f24e adapted for barebox: In file included from scripts/kconfig/zconf.tab.c:2485: scripts/kconfig/confdata.c: In function ‘conf_write’: scripts/kconfig/confdata.c:773:22: warning: ‘%s’ directive writing likely 7 or more bytes into a region of size between 1 and 4097 [-Wformat-overflow=] sprintf(newname, "%s%s", dirname, basename); ^~ scripts/kconfig/confdata.c:773:19: note: assuming directive output of 7 bytes sprintf(newname, "%s%s", dirname, basename); ^~~~~~ scripts/kconfig/confdata.c:773:2: note: ‘sprintf’ output 1 or more bytes (assuming 4104) into a destination of size 4097 sprintf(newname, "%s%s", dirname, basename); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ scripts/kconfig/confdata.c:776:23: warning: ‘.tmpconfig.’ directive writing 11 bytes into a region of size between 1 and 4097 [-Wformat-overflow=] sprintf(tmpname, "%s.tmpconfig.%d", dirname, (int)getpid()); ^~~~~~~~~~~ scripts/kconfig/confdata.c:776:3: note: ‘sprintf’ output between 13 and 4119 bytes into a destination of size 4097 sprintf(tmpname, "%s.tmpconfig.%d", dirname, (int)getpid()); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Increase the size of tmpname and newname to make GCC happy. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | usb: gadget: fastboot: remove unused variableSascha Hauer2018-10-301-1/+0
| | | | | | | | | | | | | | | | | | ep is unused, remove it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | of: unflatten: access property properlySascha Hauer2018-10-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Properties have to be accessed with of_property_get_value() rather than accessing them directly from the devicenode. The accessor does the right thing when of_new_property_const() is used. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | fs: devfs: implement d_revalidate hookSascha Hauer2018-10-291-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The files in devfs can change withouut the fs layer noticing, so we have to revalidate dentries before using them. A failure could be triggered with: ls /dev/nand0.root.ubi; ubiattach /dev/nand0.root; ls /dev/nand0.root.ubi The first 'ls' would create a dentry for nand0.root.ubi with no inode associated since it does not yet exist. 'ubiattach' then creates that file, but the second 'ls' does not show it since the dentry is not revalidated and thus no inode is added to that dentry. This patch fixes this and also the opposite case when a file is removed (for example with ubidetach). Reported-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | fs: implement d_revalidateSascha Hauer2018-10-292-1/+39
|/ / | | | | | | | | | | | | d_revalidate is useful when filesystems change under the hood of the fs layer. This can happen with network filesystems or with devfs. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / scripts: imx-usb-loader: list_imx_device_types(): move variable declaration ↵Marc Kleine-Budde2018-10-261-1/+3
|/ | | | | | | | | | | | | | | | out of for() loop On older compilers this causes the following error: | scripts/imx/imx-usb-loader.c: In function 'list_imx_device_types': | scripts/imx/imx-usb-loader.c:252:2: error: 'for' loop initial declarations are only allowed in C99 mode | for (int i = 0; i < ARRAY_SIZE(imx_ids); i++) { | ^ | scripts/imx/imx-usb-loader.c:252:2: note: use option -std=c99 or -std=gnu99 to compile your code Fixes: bcc2df673cdb ("scripts: imx-usb-loader: allow use of unknown USB IDs") Reported-by: Niklas Reisser <Niklas.Reisser@de.bosch.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: make routing work after dhcp commandAntony Pavlov2018-10-161-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At the moment only ifup stuff turns netif up. After the commit f0624a701513 ('net: Do not route traffic to interfaces that are not up') the dhcp command keeps netif->ifup == false and network subsystem can't route packets. How to repropduce the problem on qemu-malta_defconfig: qemu-system-mips -nodefaults -M malta -m 256 \ -nographic -serial stdio -monitor null \ -bios barebox-flash-image \ -net user -net nic,model=rtl8139 ... barebox:/ dhcp eth0: 100Mbps full duplex link detected eth0: DHCP client bound to address 10.0.2.15 barebox:/ ping 10.0.2.2 ping failed: No route to host However if ifup command is used for network interface configuration then there is no network problem, e.g. barebox:/ ifup eth0 eth0: 100Mbps full duplex link detected eth0: DHCP client bound to address 10.0.2.15 barebox:/ ping 10.0.2.2 host 10.0.2.2 is alive Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> CC: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* environment: bypass overlap check for mtd devicesSascha Hauer2018-10-121-0/+3
| | | | | | | | | | | | | | | | For mtd devices the overlap check does not work as expected for two reasons. First is that cdev->offset is 0 for mtd partitions, instead cdev->mtd->master_offset has to be used. That could be fixed easily. Second on NAND devices the environment is on the bb devices and not on the raw nand devices which means we would need something to get the mtd device from the bb device before doing the check. Both issues are fixable, but the check was mainly done to catch cases when an environment partition is created in the free space before the first MBR/GPT partition on SD/MMC devices, so leave out the mtd case for now. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* environment: Fix overlapping partitions error messageLadislav Michl2018-10-121-2/+2
| | | | | | | Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Fixes: b234a6da331f ("environment: Do not use environment when overlapping with other partitions") Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/ubifs'Sascha Hauer2018-10-0944-16893/+2851
|\
| * fs: ubifs: optionally allow to mount UBIFS images with encrypted filesSascha Hauer2018-10-083-1/+11
| | | | | | | | | | | | | | | | | | Currently we do not support the UBIFS file encryption feature. Nevertheless we can allow read clear files from UBIFS to be able to boot an unencrypted kernel. This differs from the Kernel behaviour, so add a globalvar to make that configurable. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ubifs: Update to v4.18-rc6Sascha Hauer2018-10-0821-550/+2147
| | | | | | | | | | | | | | | | | | | | | | | | This syncs the UBIFS code with Linux-4.19-rc6. There are many functions in the Linux UBIFS codebase that we do not need for a readonly implementation. These are missing here, but all removed functions are annotated as such so it should be relatively easy to copy a newer codebase over the current one and to see which functions shall be removed from the newer version. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * vsprintf: implement %pVSascha Hauer2018-10-082-0/+20
| | | | | | | | | | | | | | %pV allows to pass in a struct va_format as a pointer. UBIFS uses this for its logging functions, but it may be useful in other places aswell. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * compiler: Update to v4.19-rc6Sascha Hauer2018-10-085-457/+535
| | | | | | | | | | | | | | | | This updates include/linux/compiler* to Linux-4.19-rc6. Among other things this gives us __printf Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * fs: ubifs: remove not needed codeSascha Hauer2018-10-0823-16206/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch aggressively removes stuff that we do not need in a readonly implementation: - write buffering support - lpt/ltab code - garbage collector - everything under #ifndef __BAREBOX__ This decreases the binary size by about 5k on ARM, but the main reason for doing this is the idea that things that are not there don't need to be synced with upstream ubifs code. The __BAREBOX__ ifdeffery makes the code very hard to read and is a maintenance burden by itself, so it is removed here aswell. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * fs: implement clear_nlink and set_nlinkSascha Hauer2018-10-083-35/+18
| | | | | | | | | | | | | | Implement clear_nlink and set_nlink and remove the private versions from UBIFS. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * fs: implement iget_locked and iget_failedSascha Hauer2018-10-083-29/+26
| | | | | | | | | | | | Implement in fs core rather than using a private version in UBIFS. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * fs: implement file_inodeSascha Hauer2018-10-082-0/+6
| | | | | | | | | | | | To ease code porting from Linux Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * fs: Add SB_* flagsSascha Hauer2018-10-081-0/+19
| | | | | | | | | | | | | | Newer Kernel fs code uses SB_* flags rather than the same MS_* flags. Add them to barebox to make porting code easier. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * fs: Add fscrypt no-op headersSascha Hauer2018-10-082-0/+378
| | | | | | | | | | | | Newer versions of UBIFS use fscrypt, so add no-op headers here. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * fs: let dir_emit_dots return intSascha Hauer2018-10-081-1/+2
| | | | | | | | | | | | | | Change to the same prototype as the kernel to make code porting easier. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>