summaryrefslogtreecommitdiffstats
path: root/arch/blackfin
Commit message (Collapse)AuthorAgeFilesLines
* configs: Re-sync almost all of cmd/KconfigTom Rini2016-04-251-3/+0
| | | | | | | | This syncs up the current cmd/Kconfig and include/configs/ files with the only exception being CMD_NAND. Due to how we have used this historically we need to take further care here when converting. Signed-off-by: Tom Rini <trini@konsulko.com>
* Use correct spelling of "U-Boot"Bin Meng2016-02-0631-32/+32
| | | | | | | | | | Correct spelling of "U-Boot" shall be used in all written text (documentation, comments in source files etc.). Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Heiko Schocher <hs@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Minkyu Kang <mk7.kang@samsung.com>
* Move console definitions into a new console.h fileSimon Glass2015-11-191-0/+1
| | | | | | | | The console includes a global variable and several functions that are only used by a small subset of U-Boot files. Before adding more functions, move the definitions into their own header file. Signed-off-by: Simon Glass <sjg@chromium.org>
* Various Makefiles: Add SPDX-License-Identifier tagsTom Rini2015-11-101-1/+1
| | | | | | | | | | | 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>
* Replace "extern inline" with "static inline"Måns Rullgård2015-11-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* blackfin: 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>
* video: Drop DEV_FLAGS_SYSTEM flagBin Meng2015-11-051-1/+1
| | | | | | DEV_FLAGS_SYSTEM does not have any actual meaning, hence drop it. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
* arch: Make board selection choices optionalJoe Hershberger2015-05-121-0/+1
| | | | | | | | | | | | By making the board selections optional, every defconfig will include the board selection when running savedefconfig so if a new board is added to the top of the list of choices the former top's defconfig will still be correct. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Stephen Warren <swarren@wwwdotorg.org> Cc: Tom Rini <trini@konsulko.com>
* generic-board: select SYS_GENERIC_BOARD for some architecturesMasahiro Yamada2015-03-281-1/+0
| | | | | | | | | | | | We have done with the generic board conversion for all the boards of ARC, Blackfin, M68000, MicroBlaze, MIPS, NIOS2, Sandbox, X86. Let's select SYS_GENERIC_BOARD for those architectures, so we can tell which architecture has finished the conversion at a glance. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Alexey Brodkin <abrodkin@synopsys.com>
* generic-board: move __HAVE_ARCH_GENERIC_BOARD to KconfigMasahiro Yamada2015-03-281-3/+0
| | | | | | | | Move the option to Kconfig renaming it to CONFIG_HAVE_GENERIC_BOARD. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Alexey Brodkin <abrodkin@synopsys.com>
* Export redesignMartin Dorwig2015-01-291-1/+2
| | | | | | | | | | | | | | | | | | | | | this is an atempt to make the export of functions typesafe. I replaced the jumptable void ** by a struct (jt_funcs) with function pointers. The EXPORT_FUNC macro now has 3 fixed parameters and one variadic parameter The first is the name of the exported function, the rest of the parameters are used to format a functionpointer in the jumptable, the EXPORT_FUNC macros are expanded three times, 1. to declare the members of the struct 2. to initialize the structmember pointers 3. to call the functions in stubs.c Signed-off-by: Martin Dorwig <dorwig@tetronik.com> Acked-by: Simon Glass <sjg@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org> (resending to the list since my tweaks are not quite trivial)
* blackfin: include <linux/compiler.h> rather than define __iomemMasahiro Yamada2014-12-081-2/+1
| | | | | | | | The macro __iomem is defined in include/linux/compiler.h. Let's include it rather than double __iomem defines. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Sonic Zhang <sonic.adi@gmail.com>
* Kbuild: introduce Makefile in arch/$ARCH/Daniel Schwierzeck2014-12-081-0/+8
| | | | | | | | | | | | | | | Introduce a Makefile under arch/$ARCH/ and include it in the top Makefile (similar to Linux kernel). This allows further refactoringi like moving architecture-specific code out of global makefiles, deprecating config variables (CPU, CPUDIR, SOC) or deprecating arch/$ARCH/config.mk. In contrary to Linux kernel, U-Boot defines the ARCH variable by Kconfig, thus the arch Makefile can only included conditionally after the top config.mk. Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Acked-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* linux/kernel.h: sync min, max, min3, max3 macros with LinuxMasahiro Yamada2014-11-232-3/+3
| | | | | | | | | | | | | | | | | | | | U-Boot has never cared about the type when we get max/min of two values, but Linux Kernel does. This commit gets min, max, min3, max3 macros synced with the kernel introducing type checks. Many of references of those macros must be fixed to suppress warnings. We have two options: - Use min, max, min3, max3 only when the arguments have the same type (or add casts to the arguments) - Use min_t/max_t instead with the appropriate type for the first argument Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Pavel Machek <pavel@denx.de> Acked-by: Lukasz Majewski <l.majewski@samsung.com> Tested-by: Lukasz Majewski <l.majewski@samsung.com> [trini: Fixup arch/blackfin/lib/string.c] Signed-off-by: Tom Rini <trini@ti.com>
* Merge branch 'master' of git://git.denx.de/u-boot-blackfinTom Rini2014-11-101-0/+2
|\
| * bfin: make the CPU macro of LDR target more genenricSonic Zhang2014-11-101-0/+2
| | | | | | | | | | | | Remove BFIN from the CPU macro in Makefile. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
* | cppcheck cleanup: fix nullPointer errorsWolfgang Denk2014-11-071-0/+1
|/ | | | | | | | | | | There are a number of places where U-Boot intentionally and legally accesses physical address 0x0000, for example when installing exception vectors on systems where these are located in low memory. Add "cppcheck-suppress nullPointer" comments to silence cppcheck where this is intentional and legal. Signed-off-by: Wolfgang Denk <wd@denx.de>
* kconfig: remove redundant "string" type in arch and board KconfigsMasahiro Yamada2014-09-131-1/+0
| | | | | | | | | | | | | | | | | | Now the types of CONFIG_SYS_{ARCH, CPU, SOC, VENDOR, BOARD, CONFIG_NAME} are specified in arch/Kconfig. We can delete the ones in arch and board Kconfig files. This commit can be easily reproduced by the following command: find . -name Kconfig -a ! -path ./arch/Kconfig | xargs sed -i -e ' /config[[:space:]]SYS_\(ARCH\|CPU\|SOC\|\VENDOR\|BOARD\|CONFIG_NAME\)/ { N s/\n[[:space:]]*string// } ' Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* blackfin: convert blackfin board_f and board_r to use generic board init ↵Sonic Zhang2014-08-079-488/+335
| | | | | | | | | | | functions - move blackfin specific cpu init code from blackfin board.c to cpu.c - remove blackfin specific board init code and invoke generic board_f fron cpu init entry - rename section name bss_vma to bss_start in order to match the generic board init code - add a fake relocate_code function to set up the new stack only Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
* blackfin: spi clock is in sysclk1 domain instead of sysclk0Scott Jiang2014-08-071-1/+1
| | | | | Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
* bfin: add register define required by core B on dual core BF609 processorAaron Wu2014-08-071-0/+2
| | | | | | Add register define required by core B on dual core BF609 processor. Signed-off-by: Aaron Wu <Aaron.wu@analog.com>
* kconfig: delete redundant CONFIG_${ARCH} definitionMasahiro Yamada2014-07-301-1/+0
| | | | | | | CONFIG_${ARCH} is defined by Kconfig. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* kconfig: add board Kconfig and defconfig filesMasahiro Yamada2014-07-301-0/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds: - arch/${ARCH}/Kconfig provide a menu to select target boards - board/${VENDOR}/${BOARD}/Kconfig or board/${BOARD}/Kconfig set CONFIG macros to the appropriate values for each board - configs/${TARGET_BOARD}_defconfig default setting of each board (This commit was automatically generated by a conversion script based on boards.cfg) In Linux Kernel, defconfig files are located under arch/${ARCH}/configs/ directory. It works in Linux Kernel since ARCH is always given from the command line for cross compile. But in U-Boot, ARCH is not given from the command line. Which means we cannot know ARCH until the board configuration is done. That is why all the "*_defconfig" files should be gathered into a single directory ./configs/. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org>
* stdio: Pass device pointer to stdio methodsSimon Glass2014-07-231-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | At present stdio device functions do not get any clue as to which stdio device is being acted on. Some implementations go to great lengths to work around this, such as defining a whole separate set of functions for each possible device. For driver model we need to associate a stdio_dev with a device. It doesn't seem possible to continue with this work-around approach. Instead, add a stdio_dev pointer to each of the stdio member functions. Note: The serial drivers have the same problem, but it is not strictly necessary to fix that to get driver model running. Also, if we convert serial over to driver model the problem will go away. Code size increases by 244 bytes for Thumb2 and 428 for PowerPC. 22: stdio: Pass device pointer to stdio methods arm: (for 2/2 boards) all +244.0 bss -4.0 text +248.0 powerpc: (for 1/1 boards) all +428.0 text +428.0 Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Marek Vasut <marex@denx.de> Reviewed-by: Marek Vasut <marex@denx.de>
* blackfin, powerpc: remove redundant definitions of ARRAY_SIZEMasahiro Yamada2014-07-071-3/+0
| | | | | | | | | Since ARRAY_SIZE macro is defined in include/common.h, re-defining it in arch-specific files is redundant. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Stefan Roese <sr@denx.de> Acked-by: Sonic Zhang <sonic.zhang@analog.com>
* blackfin: Add more dcache functionsVasili Galka2014-07-071-0/+10
| | | | | | | | | | | | Add invalidate_dcache_range() and flush_dcache_range() for the blackfin architecture. Such functions already exist on this arch with different names, so just forward the call. This fixes the build of bf609-ezkit board as it uses drivers/net/designware.c which requires the above functions. Cc: Sonic Zhang <sonic.adi@gmail.com>, Alexey Brodkin <abrodkin@synopsys.com> Signed-off-by: Vasili Galka <vvv444@gmail.com>
* blackfin: replace bfin_gen_rand_mac() with eth_random_addr()Masahiro Yamada2014-05-121-28/+0
| | | | | | | | | | | bfin_gen_rand_mac() uses __DATE__ as the seed for random ethernet address. This makes the build non-deterministic. In the first place, it should not be implemented as a Bfin-specific function. Use eth_random_addr() instead. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Sonic Zhang <sonic.zhang@analog.com>
* bd_info: remove bi_barudrate member from struct bd_infoMasahiro Yamada2014-05-122-3/+0
| | | | | | | | | | | | | | | | | gd->bd->bi_baudrate is a copy of gd->baudrate. Since baudrate is a common feature for all architectures, keep gd->baudrate only. It is true that bi_baudrate was passed to the kernel in that structure but it was a long time ago. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Tom Rini <trini@ti.com> Cc: Simon Glass <sjg@chromium.org> Cc: Wolfgang Denk <wd@denx.de> Cc: Heiko Schocher <hs@denx.de> Acked-by: Michal Simek <monstr@monstr.eu> (For microblaze)
* blackfin: make name_to_gpio be a weak symbolIan Campbell2014-04-182-49/+48
| | | | | | | | | | | | | | | | | This required moving it into a C file from the header. The only user of a non-default name_to_gpio is blackfin, therefore build tested with the blackfin bct-brettl2 build, which is one I picked at random. Also tested with a build for the ARM tec board which uses the default/fallback implementation. Inspection with objdump shows that both have done the right thing. This change was requested by Marek during review of the sunxi patch series. Signed-off-by: Ian Campbell <ijc@hellion.org.uk> Cc: Marek Vasut <marex@denx.de> Cc: Wolfgang Denk <wd@denx.de> Cc: Sonic Zhang <sonic.adi@gmail.com>
* kbuild: improve Kbuild speedMasahiro Yamada2014-03-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Kbuild brought about many advantages for us but a significant performance regression was reported by Simon Glass. After some discussions and analysis, it turned out its main cause is in $(call cc-option,...). Historically, U-Boot parses all config.mk (arch/*/config.mk and board/*/config.mk) every time descending into subdirectories. That means cc-options are evaluated over and over again. $(call cc-option,...) is useful but costly. So we want to evaluate them only in ./Makefile and spl/Makefile and export compiler flags. This commit changes the build system as follows: - Modify scripts/Makefile.build to not include config.mk Instead, add $(PLATFORM_CPPFLAGS) to asflags-y, ccflags-y, cppflags-y. - Export many variables Going forward, Kbuild will not parse config.mk files when it descends into subdirectories. If we want to set variables in config.mk and use them in subdirectories, they must be exported. This is the list of variables to get exported: PLATFORM_CPPFLAGS CPUDIR BOARDDIR OBJCOPYFLAGS LDFLAGS LDFLAGS_FINAL (used in nand_spl/board/*/*/Makefile) CONFIG_STANDALONE_LOAD_ADDR (used in examples/standalone/Makefile) SYM_PREFIX (used in examples/standalone/Makefile) RELFLAGS (used in examples/standalone/Makefile) - Delete CPPFLAGS This variable has been replaced with PLATFORM_CPPFLAGS - Copy gcclibdir from example/standalone/Makefile to arch/sparc/config.mk The reference in CONFIG_STANDALONE_LOAD_ADDR must be resolved before it is exported. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Reported-by: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org> [on Sandbox] Tested-by: Stephen Warren <swarren@nvidia.com> [on Tegra]
* kbuild: fix CROSS_COMPILE settings in config.mkMasahiro Yamada2014-03-041-1/+3
| | | | | | | | | | | | | | | | The syntax CROSS_COMIPLE ?= <cross_compiler_prefix> does not work because config.mk is parsed after exporting CROSS_COMPILE. Like Linux Kernel's arch/$(ARCH)/Makefile, we must write as follows: ifeq ($(CROSS_COMPILE),) CROSS_COMPILE := <cross_compiler_prefix> endif Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* kbuild: use shorten logs for misc targetsMasahiro Yamada2014-02-251-1/+5
| | | | Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* blackfin: Add <asm/clock.h> to numerous driversTom Rini2014-02-201-0/+1
| | | | | | | | | With d6a320d we moved some clock externs out of blackfin_local.h and into clock.h but now need to include <asm/clock.h> in more drivers to avoid warnings. Cc: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Tom Rini <trini@ti.com>
* blackfin: rename bfin-twi_i2c driver to adi_i2cSonic Zhang2014-02-201-0/+15
| | | | | | | The ADI twi peripheral is not binding to Blackfin processor only. Change to a generic name. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
* blackfin: add spi and i2c specific get clock functionsSonic Zhang2014-02-202-7/+11
| | | | Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
* kbuild: use scripts/Makefile.cleanMasahiro Yamada2014-02-191-0/+1
| | | | | | | | | | | | | | This commit refactors cleaning targets such as clean, clobber, mrpropper, distclean with scripts/Makefile.clean. By using scripts/Makefile.clean, we can recursively descend into subdirectories and delete generated files there. We do not need add a big list of generated files to the "clean" target. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* kbuild: use Linux Kernel build scriptsMasahiro Yamada2014-02-192-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | Now we are ready to switch over to real Kbuild. This commit disables temporary scripts: scripts/{Makefile.build.tmp, Makefile.host.tmp} and enables real Kbuild scripts: scripts/{Makefile.build,Makefile.host,Makefile.lib}. This switch is triggered by the line in scripts/Kbuild.include -build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build.tmp obj +build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj We need to adjust some build scripts for U-Boot. But smaller amount of modification is preferable. Additionally, we need to fix compiler flags which are locally added or removed. In Kbuild, it is not allowed to change CFLAGS locally. Instead, ccflags-y, asflags-y, cppflags-y, CFLAGS_$(basetarget).o, CFLAGS_REMOVE_$(basetarget).o are prepared for that purpose. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Tested-by: Gerhard Sittig <gsi@denx.de>
* kbuild: change out-of-tree buildMasahiro Yamada2014-02-192-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit changes the working directory where the build process occurs. Before this commit, build process occurred under the source tree for both in-tree and out-of-tree build. That's why we needed to add $(obj) prefix to all generated files in makefiles like follows: $(obj)u-boot.bin: $(obj)u-boot Here, $(obj) is empty for in-tree build, whereas it points to the output directory for out-of-tree build. And our old build system changes the current working directory with "make -C <sub-dir>" syntax when descending into the sub-directories. On the other hand, Kbuild uses a different idea to handle out-of-tree build and directory descending. The build process of Kbuild always occurs under the output tree. When "O=dir/to/store/output/files" is given, the build system changes the current working directory to that directory and restarts the make. Kbuild uses "make -f $(srctree)/scripts/Makefile.build obj=<sub-dir>" syntax for descending into sub-directories. (We can write it like "make $(obj)=<sub-dir>" with a shorthand.) This means the current working directory is always the top of the output directory. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Tested-by: Gerhard Sittig <gsi@denx.de>
* blackfin: Initialize the EMAC VLAN with proper default valueAaron Wu2014-02-071-0/+3
| | | | | | | | EMAC_VLANx regs is not properly initiallized in u-boot, once it's overwrite in the kernel when DSA enabled, hot reset will lead to bringing up EMAC fail in u-boot. Signed-off-by: Aaron Wu <Aaron.Wu@analog.com> Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
* blackfin: Change SMC dcplb entry flag to cover 16M address regionSonic Zhang2014-02-071-1/+2
| | | | Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
* blackfin: init bss earlyBob Liu2014-02-071-1/+1
| | | | | Signed-off-by: Bob Liu <lliubbo@gmail.com> Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
* blackfin: The logic of the BF609 macro is opposite.Sonic Zhang2014-02-071-3/+3
| | | | Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
* blackfin: delete unused header filesMasahiro Yamada2014-01-242-151/+0
| | | | Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* Merge branch 'master' of git://git.denx.de/u-boot-blackfinTom Rini2013-12-164-11/+20
|\
| * blackfin: remove build warningSonic Zhang2013-12-162-10/+15
| | | | | | | | Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
| * blackfin: fixing warning by including proper headersSonic Zhang2013-12-162-1/+5
| | | | | | | | Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
* | Makefile: use two double-quotations as a pairMasahiro Yamada2013-12-131-2/+2
|/ | | | | | | | | | | | Some editors such as Emacs can highlight source files. But their parser algorithm is not perfect. If you use one double-quotation alone, some editor cannot handle it nicely and mark source lines as a string by mistake. It is preferable to use two double-quotations as a pair. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* blackfin: Do not generate unused header bootrom-asm-offsets.hMasahiro Yamada2013-12-064-65/+0
| | | | | Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
* blackfin: If none ADI_GPIOX macro is defined, use ADI_GPIO1 as defaultSonic Zhang2013-12-062-2/+2
| | | | Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
* Blackfin: remove executable permission of AWK scriptMasahiro Yamada2013-12-021-0/+0
| | | | Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
OpenPOWER on IntegriCloud