summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Various Makefiles: Add SPDX-License-Identifier tagsTom Rini2015-11-1055-82/+169
| | | | | | | | | | | After consulting with some of the SPDX team, the conclusion is that Makefiles are worth adding SPDX-License-Identifier tags too, and most of ours have one. This adds tags to ones that lack them and converts a few that had full (or in one case, very partial) license blobs into the equivalent tag. Cc: Kate Stewart <kstewart@linuxfoundation.org> Signed-off-by: Tom Rini <trini@konsulko.com>
* mpc85xx/u-boot*.lds: remove _GLOBAL_OFFSET_TABLE_ definitionZhenhua Luo2015-11-094-4/+0
| | | | | | | | | | | | | | | | | | | | | In binutils-2.25, the _GLOBAL_OFFSET_TABLE_ symbols defined by PROVIDE in u-boot.lds overrides the linker built-in symbols (https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff; h=b893397a4b1316610f49819344817715e4305de9), so the linker is treating _GLOBAL_OFFSET_TABLE_ as a definition into the .reloc section. To align with the change of binutils-2.25, the _GLOBAL_OFFSET_TABLE_ symbol should not be defined in sections, and the symbols in linker generated .got section should be used(https://sourceware.org/ml/binutils/2008-09/ msg00122.html) Fixed the following build errors with binutils-2.25: | powerpc-poky-linux-gnuspe-ld.bfd: _GLOBAL_OFFSET_TABLE_ not defined in linker created .got Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com> Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
* Replace "extern inline" with "static inline"Måns Rullgård2015-11-0914-133/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | A number of headers define functions as "extern inline" which is causing problems with gcc5. The reason is that starting with version 5.1, gcc defaults to the standard C99 semantics for the inline keyword. Under the traditional GNU inline semantics, an "extern inline" function would never create an external definition, the same as inline *without* extern in C99. In C99, and "extern inline" definition is simply an external definition with an inline hint. In short, the meanings of inline with and without extern are swapped between GNU and C99. The upshot is that all these definitions in header files create an external definition wherever those headers are included, resulting in multiple definition errors at link time. Changing all these functions to "static inline" fixes the problem since this works as desired in all gcc versions. Although the semantics are slightly different (a static inline definition may result in an actual function being emitted), it works as intended in practice. This patch also removes extern prototype declarations for the changed functions where they existed. Signed-off-by: Mans Rullgard <mans@mansr.com>
* ARM64: zynqmp: Sync zynq_sdhci_init() declarationMichal Simek2015-11-071-1/+1
| | | | | | | | | | | | | | | This patch fix compilation error: drivers/mmc/zynq_sdhci.c:16:5: error: conflicting types for ‘zynq_sdhci_init’ int zynq_sdhci_init(phys_addr_t regbase) ^ In file included from drivers/mmc/zynq_sdhci.c:14:0: ./arch/arm/include/asm/arch/sys_proto.h:16:5: note: previous declaration of ‘zynq_sdhci_init’ was here int zynq_sdhci_init(unsigned long regbase); ^ Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* Merge branch 'master' of git://git.denx.de/u-boot-niosTom Rini2015-11-0615-247/+158
|\
| * net: altera_tse: get numbers of fdt address and size cellsThomas Chou2015-11-061-6/+8
| | | | | | | | | | | | | | | | | | Get numbers of fdt address and size cells in altera_tse_probe(), thereby remove the assumption of one address cell and one size cell. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
| * net: altera_tse: use BIT macroThomas Chou2015-11-061-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace numerical bit shift with BIT macro in altera_tse :%s/(1 << nr)/BIT(nr)/g where nr = 0, 1, 2 .... 31 Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Reviewed-by: Marek Vasut <marex@denx.de> Reviewed-by: Chin Liang See <clsee@altera.com> Reviewed-by: Jagan Teki <jteki@openedev.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
| * net: altera_tse: remove the useless parenthesisThomas Chou2015-11-061-15/+15
| | | | | | | | | | | | | | | | | | Remove the useless parenthesis. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Reviewed-by: Marek Vasut <marex@denx.de> Reviewed-by: Chin Liang See <clsee@altera.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
| * net: altera_tse: fix packed and aligned attributeThomas Chou2015-11-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix packed and aligned attribute warnings. WARNING: __packed is preferred over __attribute__((packed)) #14: FILE: drivers/net/altera_tse.h:14: +#define __packed_1_ __attribute__ ((packed, aligned(1))) WARNING: __aligned(size) is preferred over __attribute__((aligned(size))) #14: FILE: drivers/net/altera_tse.h:14: +#define __packed_1_ __attribute__ ((packed, aligned(1))) Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Reviewed-by: Marek Vasut <marex@denx.de> Reviewed-by: Chin Liang See <clsee@altera.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
| * net: altera_tse: use data type u32 for regs and descThomas Chou2015-11-062-60/+60
| | | | | | | | | | | | | | | | | | | | Use data type u32/u16/u8 for regs and desc, as it is more portable. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Reviewed-by: Marek Vasut <marex@denx.de> Reviewed-by: Chin Liang See <clsee@altera.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
| * net: altera_tse: remove unused macro and regs defThomas Chou2015-11-061-101/+3
| | | | | | | | | | | | | | | | | | Remove unused macro and regs def. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Reviewed-by: Marek Vasut <marex@denx.de> Reviewed-by: Chin Liang See <clsee@altera.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
| * nios2: trim CONFIG_SYS_MEMTEST_ENDThomas Chou2015-11-061-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Trim CONFIG_SYS_MEMTEST_END location. CONFIG_SYS_MONITOR_LEN Reserving 256k for U-Boot at: d7fc0000 CONFIG_ENV_SIZE CONFIG_SYS_MALLOC_LEN Reserving 256k for malloc() at: d7f80000 0x10000 for the rest Reserving 68 Bytes for Board Info at: d7f7ffbc Reserving 208 Bytes for Global Data at: d7f7feec Reserving 12000 Bytes for FDT at: d7f7d00c Stack Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
| * nios2: trim CONFIG_SYS_MALLOC_LENThomas Chou2015-11-061-1/+1
| | | | | | | | | | | | | | | | Trim CONFIG_SYS_MALLOC_LEN size, because CONFIG_ENV_SIZE is included to total memory allocation in common.h, Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Reviewed-by: Chin Liang See <clsee@altera.com>
| * altera_uart: Adjust the declaration of debug_uart_init()Thomas Chou2015-11-061-1/+1
| | | | | | | | | | | | | | | | | | Follow commit 97b059730218 ("debug_uart: Adjust the declaration of debug_uart_init()") Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Reviewed-by: Marek Vasut <marex@denx.de> Reviewed-by: Chin Liang See <clsee@altera.com>
| * altera_jtag_uart: Adjust the declaration of debug_uart_init()Thomas Chou2015-11-061-1/+1
| | | | | | | | | | | | | | | | | | Follow commit 97b059730218 ("debug_uart: Adjust the declaration of debug_uart_init()") Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Reviewed-by: Marek Vasut <marex@denx.de> Reviewed-by: Chin Liang See <clsee@altera.com>
| * nios2: fix cached mode in clearing the BSSThomas Chou2015-11-061-1/+1
| | | | | | | | | | | | | | | | As the generic board runs in cached mode, it should not use "stwio" which bypass the cache. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Reviewed-by: Chin Liang See <clsee@altera.com>
| * nios2: remove CONFIG_SYS_INIT_SP macroThomas Chou2015-11-062-3/+1
| | | | | | | | | | | | | | | | | | Remove CONFIG_SYS_INIT_SP macro, as the initial stack is set to below the u-boot code. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Reviewed-by: Marek Vasut <marex@denx.de> Reviewed-by: Chin Liang See <clsee@altera.com>
| * nios2: remove CONFIG_SYS_MALLOC_BASE macroThomas Chou2015-11-061-2/+0
| | | | | | | | | | | | | | | | Remove CONFIG_SYS_MALLOC_BASE macro, as it is not used by the generic board. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Reviewed-by: Chin Liang See <clsee@altera.com>
| * spi: altera_spi: minor clean upThomas Chou2015-11-061-2/+2
| | | | | | | | | | | | | | - Remove the penultimate comma in of_match ids Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Reviewed-by: Jagan Teki <jteki@openedev.com>
| * misc: altera_sysid: minor clean upThomas Chou2015-11-061-2/+2
| | | | | | | | | | | | | | - Remove the penultimate comma in of_match ids Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Reviewed-by: Jagan Teki <jteki@openedev.com>
| * timer: altera_timer: minor clean upThomas Chou2015-11-061-7/+7
| | | | | | | | | | | | | | | | - Moved macro definitions to top - Remove the penultimate comma in of_match ids Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Reviewed-by: Jagan Teki <jteki@openedev.com>
| * timer: altera_timer: use BIT macroThomas Chou2015-11-061-3/+3
| | | | | | | | | | | | | | | | | | | | | | Replace numerical bit shift with BIT macro in altera_timer :%s/(1 << nr)/BIT(nr)/g where nr = 0, 1, 2 .... 31 Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Reviewed-by: Jagan Teki <jteki@openedev.com>
| * serial: altera_uart: minor clean upThomas Chou2015-11-061-11/+10
| | | | | | | | | | | | | | | | | | | | - Moved macro definitions to top - Re-arrange header includes ascending order - Remove unused header linux/compiler.h - Remove the penultimate comma in of_match ids Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Reviewed-by: Jagan Teki <jteki@openedev.com>
| * serial: altera_uart: use BIT macroThomas Chou2015-11-061-3/+3
| | | | | | | | | | | | | | | | | | | | | | Replace numerical bit shift with BIT macro in altera_uart :%s/(1 << nr)/BIT(nr)/g where nr = 0, 1, 2 .... 31 Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Reviewed-by: Jagan Teki <jteki@openedev.com>
| * serial: altera_jtag_uart: minor clean upThomas Chou2015-11-061-14/+13
| | | | | | | | | | | | | | | | | | | | | | - Moved macro definitions to top - Give spaces around the '>>' in ALTERA_JTAG_WSPACE() - Re-arrange header includes ascending order - Remove unused header linux/compiler.h - Remove the penultimate comma in of_match ids Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Reviewed-by: Jagan Teki <jteki@openedev.com>
| * serial: altera_jtag_uart: use BIT macroThomas Chou2015-11-061-3/+3
| | | | | | | | | | | | | | | | | | | | | | Replace numerical bit shift with BIT macro in altera_jtag_uart :%s/(1 << nr)/BIT(nr)/g where nr = 0, 1, 2 .... 31 Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Reviewed-by: Jagan Teki <jteki@openedev.com>
| * nios2: enable setexpr command in defconfigThomas Chou2015-11-061-1/+0
| | | | | | | | | | | | | | | | Enable setexpr command in defconfig because it is really useful as suggested by Marek. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Acked-by: Marek Vasut <marex@denx.de>
| * nios2: clean up macros that do not need a value in board headerThomas Chou2015-11-061-4/+4
| | | | | | | | | | | | | | | | | | Clean up macros that do not need a value as suggested by Marek. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Tested-by: Marek Vasut <marex@denx.de> Acked-by: Marek Vasut <marex@denx.de>
| * nios2: use common sequence for reserve_ubootThomas Chou2015-11-061-2/+2
| | | | | | | | | | | | | | Use common sequence for reserve_uboot, as the result is the same. Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
| * nios2: use dram bank in board infoThomas Chou2015-11-062-2/+8
| | | | | | | | | | | | | | | | Use dram bank in board info, so that it displays correct memory values in bdinfo command. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Acked-by: Marek Vasut <marex@denx.de>
| * nios2: change virt_to_phys to use physaddr_mask in global dataThomas Chou2015-11-063-4/+3
| | | | | | | | | | | | | | | | | | As virt_to_phys() is used a lot in DMA transfer, change it to use physaddr_mask in global data. This will save an "if" statement and get a little faster. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Acked-by: Marek Vasut <marex@denx.de>
| * nios2: remove the useless parenthesis in asm/io.hThomas Chou2015-11-061-4/+4
| | | | | | | | | | | | | | | | Remove the useless parenthesis in asm/io.h as suggested by Marek. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Acked-by: Marek Vasut <marex@denx.de>
| * nios2: fix map_physmem to do real cache mappingThomas Chou2015-11-063-3/+9
| | | | | | | | | | | | | | Fix the map_physmem() to do real cache mapping. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Acked-by: Marek Vasut <marex@denx.de>
* | Merge branch 'master' of git://git.denx.de/u-boot-mipsTom Rini2015-11-062-106/+98
|\ \
| * | MIPS: bootm: use CONFIG_IS_ENABLED() everywhereDaniel Schwierzeck2015-11-061-19/+14
| | | | | | | | | | | | | | | Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com>
| * | MIPS: bootm: rework and fix broken bootm codeDaniel Schwierzeck2015-11-061-85/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The move to 'generic board' as well as changes in the generic bootm code broke the boot of FIT uImage's. Especially uImage's with additional initramfs images or FDT's do not work anymore. Refactor the bootm code to work again with the generic bootm code. Always relocate ramdisk and FDT in step 'bootm prep' because the generic bootm code does this only for legacy uImage's. Move the step 'bootm cmdline' to 'bootm prep' because the Linux kernel parameters rd_start and rd_size have to be initialized after the relocation of the ramdisk. Furthermore support the step 'bootm fake'. Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | common/board_f: enable setup_board_part1() for MIPSDaniel Schwierzeck2015-11-061-2/+6
| |/ | | | | | | | | | | | | | | | | | | | | | | The variables bd_t:bi_memstart and bd_t:bi_memsize have to be initialized also on MIPS. Otherwise LMB and cmd_bdinfo do not correctly work. This currently breaks the booting of FIT images on MIPS. Enable the board_init_f hook setup_board_part1() for MIPS to fix this. Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | sf: Add SPI NOR protection mechanismFabio Estevam2015-11-055-2/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many SPI flashes have protection bits (BP2, BP1 and BP0) in the status register that can protect selected regions of the SPI NOR. Take these bits into account when performing erase operations, making sure that the protected areas are skipped. Tested on a mx6qsabresd: => sf probe SF: Detected M25P32 with page size 256 Bytes, erase size 64 KiB, total 4 MiB => sf protect lock 0x3f0000 0x10000 => sf erase 0x3f0000 0x10000 offset 0x3f0000 is protected and cannot be erased SF: 65536 bytes @ 0x3f0000 Erased: ERROR => sf protect unlock 0x3f0000 0x10000 => sf erase 0x3f0000 0x10000 SF: 65536 bytes @ 0x3f0000 Erased: OK Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> [re-worked to fit the lock common to dm and non-dm] Signed-off-by: Jagan Teki <jteki@openedev.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Heiko Schocher <hs@denx.de> Reviewed-by: Jagan Teki <jteki@openedev.com>
* | sf: Add SPI protection mechanism from the kernelFabio Estevam2015-11-052-0/+173
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the SPI NOR protection mechanism from the kernel. This code is based on the work from Brian Norris <computersforpeace@gmail.com> Here is the commit details: "mtd: spi-nor: refactor block protection functions" (sha1: 62593cf40b23b523b9fc9334ca61ba6c595ebb09) Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Jagan Teki <jteki@openedev.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Heiko Schocher <hs@denx.de> Reviewed-by: Jagan Teki <jteki@openedev.com> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
* | powerpc: Remove __ilog2_u64 and ffs4 from bitopsFabio Estevam2015-11-056-14/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | Remove __ilog2_u64 and ffs4 from powerpc bitops to align with the kernel implementation. Use the generic __ffs64 instead of a custom powerpc implementation. Cc: York Sun <yorksun@freescale.com> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Heiko Schocher <hs@denx.de> Reviewed-by: Jagan Teki <jteki@openedev.com>
* | compat: Remove is_power_of_2() definitionFabio Estevam2015-11-055-10/+4
| | | | | | | | | | | | | | | | | | | | Use the is_power_of_2() definition from log2.h to align with the kernel implementation. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Heiko Schocher <hs@denx.de> Reviewed-by: Jagan Teki <jteki@openedev.com>
* | bitops: Add fls_long and __ffs64Fabio Estevam2015-11-051-0/+27
| | | | | | | | | | | | | | Add fls_long and __ffs64 support to align with the kernel bitops implementation. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
* | avr32: Use the generic bitops headersFabio Estevam2015-11-051-0/+5
| | | | | | | | | | | | | | The generic bitops headers are required when calling logarithmic functions, such as ilog2(). Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
* | arc: Use the generic bitops headersFabio Estevam2015-11-051-0/+5
| | | | | | | | | | | | | | The generic bitops headers are required when calling logarithmic functions, such as ilog2(). Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
* | mips: Use the generic bitops headersFabio Estevam2015-11-051-0/+5
| | | | | | | | | | | | | | | | The generic bitops headers are required when calling logarithmic functions, such as ilog2(). Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
* | nios2: Use the generic bitops headersFabio Estevam2015-11-051-0/+5
| | | | | | | | | | | | | | | | | | The generic bitops headers are required when calling logarithmic functions, such as ilog2(). Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Thomas Chou <thomas@wytron.com.tw> Reviewed-by: Jagan Teki <jteki@openedev.com>
* | nds32: Use the generic bitops headersFabio Estevam2015-11-051-0/+4
| | | | | | | | | | | | | | | | The generic bitops headers are required when calling logarithmic functions, such as ilog2(). Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Reviewed-by: Jagan Teki <jteki@openedev.com>
* | openrisc: Use the generic bitops headersFabio Estevam2015-11-051-0/+4
| | | | | | | | | | | | | | | | The generic bitops headers are required when calling logarithmic functions, such as ilog2(). Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Reviewed-by: Jagan Teki <jteki@openedev.com>
* | sparc: Use the generic bitops headersFabio Estevam2015-11-051-0/+5
| | | | | | | | | | | | | | | | The generic bitops headers are required when calling logarithmic functions, such as ilog2(). Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Reviewed-by: Jagan Teki <jteki@openedev.com>
* | sandbox: Use the generic bitops headersFabio Estevam2015-11-051-0/+4
| | | | | | | | | | | | | | | | | | | | The generic bitops headers are required when calling logarithmic functions, such as ilog2(). Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Heiko Schocher <hs@denx.de> Reviewed-by: Jagan Teki <jteki@openedev.com>
OpenPOWER on IntegriCloud