summaryrefslogtreecommitdiffstats
path: root/arch/m68k
Commit message (Collapse)AuthorAgeFilesLines
* m68k: add generic-board supportangelo@sysam.it2015-03-054-1/+17
| | | | | | Add generic-board support for the m68k architecture. Signed-off-by: Angelo Dureghello <angelo@sysam.it>
* m68k: add mcf5307 cpu supportangelo@sysam.it2015-03-0512-2/+742
| | | | | | Add Freescale MCF5307 cpu support. Signed-off-by: Angelo Dureghello <angelo@sysam.it>
* m68k: add amcore board supportangelo@sysam.it2015-03-051-0/+4
| | | | | | Add Sysam Amcore m68k-based board support. Signed-off-by: Angelo Dureghello <angelo@sysam.it>
* m68k: remove TASREG boardMatthias Fuchs2015-01-131-4/+0
| | | | | Signed-off-by: Matthias Fuchs <matthias.fuchs@esd.eu> Acked-by: Stefan Roese <sr@denx.de>
* 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>
* 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>
* kconfig: delete redundant CONFIG_${ARCH} definitionMasahiro Yamada2014-07-301-1/+1
| | | | | | | CONFIG_${ARCH} is defined by Kconfig. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* kconfig: switch to KconfigMasahiro Yamada2014-07-303-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit enables Kconfig. Going forward, we use Kconfig for the board configuration. mkconfig will never be used. Nor will include/config.mk be generated. Kconfig must be adjusted for U-Boot because our situation is a little more complicated than Linux Kernel. We have to generate multiple boot images (Normal, SPL, TPL) from one source tree. Each image needs its own configuration input. Usage: Run "make <board>_defconfig" to do the board configuration. It will create the .config file and additionally spl/.config, tpl/.config if SPL, TPL is enabled, respectively. You can use "make config", "make menuconfig" etc. to create a new .config or modify the existing one. Use "make spl/config", "make spl/menuconfig" etc. for spl/.config and do likewise for tpl/.config file. The generic syntax of configuration targets for SPL, TPL is: <target_image>/<config_command> Here, <target_image> is either 'spl' or 'tpl' <config_command> is 'config', 'menuconfig', 'xconfig', etc. When the configuration is done, run "make". (Or "make <board>_defconfig all" will do the configuration and build in one time.) For futher information of how Kconfig works in U-Boot, please read the comment block of scripts/multiconfig.py. By the way, there is another item worth remarking here: coexistence of Kconfig and board herder files. Prior to Kconfig, we used C headers to define a set of configs. We expect a very long term to migrate from C headers to Kconfig. Two different infractructure must coexist in the interim. In our former configuration scheme, include/autoconf.mk was generated for use in makefiles. It is still generated under include/, spl/include/, tpl/include/ directory for the Normal, SPL, TPL image, respectively. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org>
* kconfig: add board Kconfig and defconfig filesMasahiro Yamada2014-07-301-0/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* m68k: define __kernel_size_t as unsinged int againMasahiro Yamada2014-07-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit ddc94378d changed the definition of __kernel_size_t from unsigned int to unsigned long. It is true that it fixed warnings on some crosstools but it increased warnings on the others. The problem is that we cannot see consistency in terms of the typedef of __kernel_size_t on M68K architecture. However, I'd like to suggest to have __kernel_size_t to be unsigned int again. Rationale: [1] Linux Kernel defines __kernel_size_t on M68K as unsigned int. Let's stick to the Linux's way. [2] We want to build boards with popular pre-built toolchains, not the one locally-built by indivisuals. I think m68-linux-gcc which can be downloaded from www.kernel.org is the candidate for our _recommended_ toolchains. With this patch, all the m68k boards can be built without any warnings. Give it a try with the following crosstools: https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.6.3/ x86_64-gcc-4.6.3-nolibc_m68k-linux.tar.xz or https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.9.0/ x86_64-gcc-4.9.0-nolibc_m68k-linux.tar.xz (The latter is newer.) Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Simon Glass <sjg@chromium.org> Cc: Jason Jin <Jason.jin@freescale.com>
* m68k: Fix incorrect memory access on M5235Vasili Galka2014-07-071-16/+23
| | | | | | | | | | | The csarX and cscrX registers in the fbcs_t struct are 16-bit for CONFIG_M5235 and 32-bit wide otherwise. The code in cpu_init.c accessed them always as 32-bit, effectively creating a wrong memory access on M5235. Fixed that by choosing out_be16/out_be32 depending on whether CONFIG_M5235 is defined or not. Cc: Jason Jin <Jason.jin@freescale.com> Signed-off-by: Vasili Galka <vvv444@gmail.com>
* m68k: Fix bug, "address of" operator was forgottenVasili Galka2014-07-071-1/+1
| | | | | | | | in_be16() shall be passed a pointer to register and not its value. This is clearly a typo resulting in a wrong memory access, so fix it. Cc: Alison Wang <b18965@freescale.com>, Jason Jin <Jason.jin@freescale.com> Signed-off-by: Vasili Galka <vvv444@gmail.com>
* m68k: Remove CONFIG_CMD_BEDBUG related codeVasili Galka2014-06-191-8/+0
| | | | | | | | This flag does not compile on m68k since 2003 (8bde7f7) when a required "cmd_bedbug.h" header was removed. Eleven years passed, lets clean up a little... Signed-off-by: Vasili Galka <vvv444@gmail.com>
* m68k:correct io macros about endianChao Fu2014-06-191-4/+4
| | | | | | M68k is big endian cpu ,so use be_out and be_in in big endian. Signed-off-by: Chao Fu <b44548@freescale.com>
* m68k: eliminate a warning in cpu_initMasahiro Yamada2014-06-191-1/+1
| | | | Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* m68k: Fix warnings with gcc 4.6Simon Glass2014-06-113-7/+4
| | | | | | | | Most of the warnings seem to be related to using 'int' for size_t. Change this and fix up the remaining warnings and problems. For bootm, the warning was masked by others, and there is an actual bug in the code. Signed-off-by: Simon Glass <sjg@chromium.org>
* m68k: powerpc: Clean up do_mdm_initSimon Glass2014-05-291-7/+0
| | | | | | | | This code seems unnecessarily complex. We really just need to check the global_data. Now that is it all in one place, and not arch-specific, this is pretty easy. Signed-off-by: Simon Glass <sjg@chromium.org>
* bd_info: remove bi_barudrate member from struct bd_infoMasahiro Yamada2014-05-122-2/+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)
* kbuild: rename OBJTREE to objtreeMasahiro Yamada2014-03-123-3/+3
| | | | | | | | | | | Prior to Kbuild, $(OBJTREE) was used for pointing to the top of build directory with absolute path. In Kbuild style, $(objtree) is used instead. This commit renames OBJTREE to objtree and delete the defition of OBJTREE. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* kbuild: rename TOPDIR to stctreeMasahiro Yamada2014-03-123-10/+10
| | | | | | | | | | | | Prior to Kbuild, $(TOPDIR) or $(SRCTREE) was used for pointing to the top of source directory. (No difference between the two.) In Kbuild style, $(srctree) is used instead. This commit renames TOPDIR to srctree and delete the defition of TOPDIR. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* 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>
* m68k: merge compile flags -ffixed-d7 -sep-dataMasahiro Yamada2014-03-047-10/+2
| | | | | | | | | All arch/m68k/cpu/*/config.mk define the same flags PLAGFORM_REFLFLAGS += -ffixed-d7 -msep-data Move it to arch/m68k/config.mk Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Jason Jin <Jason.jin@freescale.com>
* kbuild: use Linux Kernel build scriptsMasahiro Yamada2014-02-196-6/+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>
* include: delete include/linux/config.hMasahiro Yamada2013-11-081-1/+0
| | | | | | | | | | | | Linux Kernel abolished include/linux/config.h long time ago. (around version v2.6.18..v2.6.19) We don't need to provide Linux copatibility any more. This commit deletes include/linux/config.h and fixes source files not to include this. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* m68k: convert makefiles to Kbuild styleMasahiro Yamada2013-11-017-166/+18
| | | | | Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Jason Jin <Jason.jin@freescale.com>
* Coding Style cleanup: replace leading SPACEs by TABsWolfgang Denk2013-10-141-1/+1
| | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Drop changes for PEP 4 following python tools] Signed-off-by: Tom Rini <trini@ti.com>
* Coding Style cleanup: remove trailing white spaceWolfgang Denk2013-10-1410-10/+10
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* Merge branch 'master' of git://git.denx.de/u-boot-i2cTom Rini2013-07-2414-20/+29
|\ | | | | | | | | | | | | | | | | | | | | The sandburst-specific i2c drivers have been deleted, conflict was just over the SPDX conversion. Conflicts: board/sandburst/common/ppc440gx_i2c.c board/sandburst/common/ppc440gx_i2c.h Signed-off-by: Tom Rini <trini@ti.com>
| * i2c, fsl_i2c: switch to new multibus/multiadapter supportHeiko Schocher2013-07-2313-17/+17
| | | | | | | | | | | | | | | | | | - added to fsl_i2c driver new multibus/multiadpater support - adapted all config files, which uses this driver Signed-off-by: Heiko Schocher <hs@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Stephen Warren <swarren@wwwdotorg.org>
| * i2c, soft-i2c: switch to new multibus/multiadapter supportHeiko Schocher2013-07-231-5/+3
| | | | | | | | | | | | | | | | | | - added to soft_i2c driver new multibus/multiadpater support - adapted all config files, which uses this driver Signed-off-by: Heiko Schocher <hs@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Stephen Warren <swarren@wwwdotorg.org>
| * i2c: common changes for multibus/multiadapter supportHeiko Schocher2013-07-231-3/+14
| | | | | | | | | | | | Signed-off-by: Heiko Schocher <hs@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org> Cc: Henrik Nordström <henrik@henriknordstrom.net>
* | Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk2013-07-24111-1883/+111
|/ | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
* Build arch/$ARCH/lib/bootm.o depending on CONFIG_CMD_BOOTMDirk Eibach2013-07-161-1/+1
| | | | | | | | MAKEALL is fine for ppc4xx and mpc85xx. Run checks were done on our controlcenterd hardware. Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc> Signed-off-by: Andy Fleming <afleming@freescale.com>
* avr32/m68k/microblaze/nds32/nios2/openrisc/sh/sparc: fix do_bootm_linuxAndreas Bießmann2013-07-021-0/+6
| | | | | | | | | | | | Commit 35fc84fa1ff51e15ecd3e464dac87eb105ffed30 broke bootm on avr32. It requires to call do_bootm_linux() with flag set to BOOTM_STATE_OS_PREP before calling it again with flag set to BOOTM_STATE_OS_GO. Fix this by allowing flag set to BOOTM_STATE_OS_PREP, this however will require a complete refactoring later on. Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com> [trini: Apply to m68k, microblaze, nds32, nios2, openrisc, sh and sparc] Signed-off-by: Tom Rini <trini@ti.com>
* ColdFire: Update the arch_global_date changes for mcf5441xJason Jin2013-06-271-5/+5
| | | | | | | Update inp_clk, vco_clk and flb_clk for mcf5441x as those items were moved to arch_global_data. Signed-off-by: Jason Jin <Jason.jin@freescale.com>
* Fix MCF5235 SDRAM base address macroSteve deRosier2013-06-271-1/+1
| | | | | | | | | SDRAMC_DARCn_BA() macro worked fine when the BA is 0x00000000 even though the macro is incorrect. It causes the BA to be set incorrctly for other base addresses. This patch fixes the macro so that base addresses other than zero can be used with the MCF5235. Signed-off-by: Steve deRosier <derosier@gmail.com>
* m68k: fix debug call befor serial initJens Scharsig (BuS Elektronik)2013-06-271-2/+2
| | | | | | | There is a debug call in board.c befor serial interface was initialized. This moves the debug code behind serial_initialize call. Signed-off-by: Jens Scharsig (BuS Elektronik) <esw@bus-elektronik.de>
* m68k: Use image_setup_linux() instead of local codeSimon Glass2013-05-141-12/+3
| | | | | | | Rather than having similar code in m68k, use image_setup_linux() which should be common across all architectures that use the FDT. Signed-off-by: Simon Glass <sjg@chromium.org>
* lib: consolidate hang()Andreas Bießmann2013-05-011-7/+0
| | | | | | | | | Delete all occurrences of hang() and provide a generic function. Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com> Acked-by: Albert ARIBAUD <albert.u.boot@aribaud.net> [trini: Modify check around puts() in hang.c slightly] Signed-off-by: Tom Rini <trini@ti.com>
* Consolidate bool typeYork Sun2013-04-011-1/+1
| | | | | | | | | | | | | 'bool' is defined in random places. This patch consolidates them into a single header file include/linux/types.h, using stdbool.h introduced in C99. All other #define, typedef and enum are removed. They are all consistent with true = 1, false = 0. Replace FALSE, False with false. Replace TRUE, True with true. Skip *.py, *.php, lib/* files. Signed-off-by: York Sun <yorksun@freescale.com>
* Declare watchdog functions in watchdog.hSimon Glass2013-03-151-0/+1
| | | | | | | | These functions are only available for powerpc and are not declared in a header file. We want to use the rest function in two places (board_f and board_r), so declare the functions in watchdog.h. Signed-off-by: Simon Glass <sjg@chromium.org>
* Introduce generic link section.h symbol filesSimon Glass2013-03-151-0/+27
| | | | | | | | | | | | | | | | | | We create a separate header file for link symbols defined by the link scripts. It is helpful to have these all in one place and try to make them common across architectures. Since Linux already has a similar file, we bring this in even though many of the symbols there are not relevant to us. Each architecture has its own asm/sections.h where symbols specifc to that architecture can be added. For now everything except AVR32 just includes the generic header. One change is needed in arch/avr32/lib/board.c to make this conversion work. Reviewed-by: Tom Rini <trini@ti.com> (version 5) Signed-off-by: Simon Glass <sjg@chromium.org>
* Replace __bss_end__ with __bss_endSimon Glass2013-03-151-2/+2
| | | | | | | | | | | | | Note this is a tree-wide change affecting multiple architectures. At present we use __bss_start, but mostly __bss_end__. This seems inconsistent and in a number of places __bss_end is used instead. Change to use __bss_end for the BSS end symbol throughout U-Boot. This makes it possible to use the asm-generic/sections.h file on all archs. Signed-off-by: Simon Glass <sjg@chromium.org>
* malloc: make malloc_bin_reloc staticGabor Juhos2013-02-191-1/+0
| | | | | | | | | | | | | | | | | | | On architectures where manual relocation is needed, the 'malloc_bin_reloc' function must be called after 'mem_malloc_init'. Make the 'malloc_bin_reloc' function static and call it directly from 'mem_malloc_init' instead of calling that from board_init_{r,f} functions of the affected architectures. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Cc: Wolfgang Denk <wd@denx.de> Cc: Andreas Bießmann <andreas.devel@gmail.com> Cc: Jason Jin <Jason.jin@freescale.com> Cc: Macpaul Lin <macpaul@andestech.com> Cc: Daniel Hellstrom <daniel@gaisler.com> Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
* m68k: Use generic global_dataSimon Glass2013-02-041-38/+1
| | | | | | Move m68k over to use generic global_data. Signed-off-by: Simon Glass <sjg@chromium.org>
* m68k: Move CONFIG_EXTRA_CLOCK to arch_global_dataSimon Glass2013-02-046-26/+26
| | | | | | Move inp_clk, vco_clk and flb_clk into arch_global_data and tidy up. Signed-off-by: Simon Glass <sjg@chromium.org>
* ppc: m68k: Move i2c1_clk, i2c2_clk to arch_global_dataSimon Glass2013-02-047-12/+12
| | | | | | | Move these fields into arch_global_data and tidy up. This is needed for both ppc and m68k since they share the i2c driver. Signed-off-by: Simon Glass <sjg@chromium.org>
* Add architecture-specific global dataSimon Glass2013-02-011-0/+6
| | | | | | | | | | | | | We plan to move architecture-specific data into a separate structure so that we can make the rest of it common. As a first step, create struct arch_global_data to hold these fields. Initially it is empty. This patch applies to all archs at once. I can split it if this is really a pain. Signed-off-by: Simon Glass <sjg@chromium.org>
* m68k/lib: fix serial driver relocationangelo2013-01-111-2/+2
| | | | | | | | | | | | Fix coldfire serial driver bindings no more relocated to ram after last changes to drivers/serial/serial.c (regression). Serial initialization in ram has to be called after that gd->reloc_off is calculated. Signed-off-by: Angelo Dureghello <sysamfw@gmail.com> Cc: Jason Jin <jason.jin@freescale.com> Acked-by: Jens Scharsig (BuS Elektronik) <esw@bus-elektronik.de> Tested-by: Jens Scharsig (BuS Elektronik) <esw@bus-elektronik.de>
* env: Use getenv_yesno() more generallyJoe Hershberger2012-12-131-2/+1
| | | | | | | Move the getenv_yesno() to env_common.c and change most checks for 'y' or 'n' to use this helper. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
OpenPOWER on IntegriCloud