aboutsummaryrefslogtreecommitdiff
path: root/board/socrates/socrates.c
AgeCommit message (Collapse)AuthorFilesLines
2023-02-06powerpc/mpc85xx: socrates: enable protected EnvironmentHeiko Schocher1-0/+17
enable protected Environment on socrates board. Signed-off-by: Heiko Schocher <hs@denx.de>
2023-02-06powerpc/mpc85xx: drop socrates specific image creationHeiko Schocher1-17/+0
convert socrates board to use MPC85XX_HAVE_RESET_VECTOR and disable CONFIG_OF_BOARD and use common u-boot.dtsi for creating u-boot-dtb.bin. Signed-off-by: Heiko Schocher <hs@denx.de>
2022-12-05global: Move remaining CONFIG_SYS_* to CFG_SYS_*Tom Rini1-5/+5
The rest of the unmigrated CONFIG symbols in the CONFIG_SYS namespace do not easily transition to Kconfig. In many cases they likely should come from the device tree instead. Move these out of CONFIG namespace and in to CFG namespace. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-11-10global: Migrate CONFIG_SYS_MPC8* symbols to the CFG_SYS namespaceTom Rini1-3/+3
Migrate all of COFIG_SYS_MPC* to the CFG_SYS namespace. Signed-off-by: Tom Rini <trini@konsulko.com>
2022-10-31Rename CONFIG_SYS_TEXT_BASE to CONFIG_TEXT_BASESimon Glass1-1/+1
The current name is inconsistent with SPL which uses CONFIG_SPL_TEXT_BASE and this makes it imposible to use CONFIG_VAL(). Rename it to resolve this problem. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-08-04Audit <flash.h> inclusionTom Rini1-2/+0
A large number of files include <flash.h> as it used to be how various SPI flash related functions were found, or for other reasons entirely. In order to migrate some further CONFIG symbols to Kconfig we need to not include flash.h in cases where we don't have a NOR flash of some sort enabled. Furthermore, in cases where we are in common code and it doesn't make sense to try and further refactor the code itself in to new files we need to guard this inclusion. Signed-off-by: Tom Rini <trini@konsulko.com>
2022-07-05socrates: Rework CONFIG_PCI_CLK_FREQTom Rini1-1/+2
The symbol CONFIG_PCI_CLK_FREQ is local to this board. Provide equal clarity in the code by referencing the numeric value directly and move the explanatory comment to the code, just prior to use. Signed-off-by: Tom Rini <trini@konsulko.com>
2022-03-28video: Drop video_fb headerSimon Glass1-1/+0
This is not used now. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-27Finish conversion of CONFIG_SYS_CLK_FREQ to KconfigTom Rini1-1/+1
In order to finish moving this symbol to Kconfig for all platforms, we need to do a few more things. First, for all platforms that define this to a function, introduce CONFIG_DYNAMIC_SYS_CLK_FREQ, similar to CONFIG_DYNAMIC_DDR_CLK_FREQ and populate clock_legacy.h. This entails also switching all users from CONFIG_SYS_CLK_FREQ to get_board_sys_clk() and updating a few preprocessor tests. With that done, all platforms that define a value here can be converted to Kconfig, and a fall-back of zero is sufficiently safe to use (and what is used today in cases where code may or may not have this available). Make sure that code which calls this function includes <clock_legacy.h> to get the prototype. Signed-off-by: Tom Rini <trini@konsulko.com>
2021-10-27sandbox: Remove OF_HOSTFILEWIP/27Oct2021Ilias Apalodimas1-1/+3
OF_HOSTFILE is used on sandbox configs only. Although it's pretty unique and not causing any confusions, we are better of having simpler config options for the DTB. So let's replace that with the existing OF_BOARD. U-Boot would then have only three config options for the DTB origin. - OF_SEPARATE, build separately from U-Boot - OF_BOARD, board specific way of providing the DTB - OF_EMBED embedded in the u-boot binary(should not be used in production Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-08-05ppc: socrates: Drop use of DM_PCISimon Glass1-3/+1
Now that DM_PCI is always enabled we don't need to check it. Drop this old code. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-02-19video: remove unused include/mb862xx.hHeinrich Schuchardt1-12/+0
CONFIG_VIDEO_MB862xx cannot be selected by any configuration. So we can eliminate include/mb862xx.h. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-02-02common: Drop asm/global_data.h from common headerSimon Glass1-0/+1
Move this out of the common header and include it only where needed. In a number of cases this requires adding "struct udevice;" to avoid adding another large header or in other cases replacing / adding missing header files that had been pulled in, very indirectly. Finally, we have a few cases where we did not need to include <asm/global_data.h> at all, so remove that include. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2020-07-17treewide: convert bd_t to struct bd_info by coccinelleMasahiro Yamada1-1/+1
The Linux coding style guide (Documentation/process/coding-style.rst) clearly says: It's a **mistake** to use typedef for structures and pointers. Besides, using typedef for structures is annoying when you try to make headers self-contained. Let's say you have the following function declaration in a header: void foo(bd_t *bd); This is not self-contained since bd_t is not defined. To tell the compiler what 'bd_t' is, you need to include <asm/u-boot.h> #include <asm/u-boot.h> void foo(bd_t *bd); Then, the include direcective pulls in more bloat needlessly. If you use 'struct bd_info' instead, it is enough to put a forward declaration as follows: struct bd_info; void foo(struct bd_info *bd); Right, typedef'ing bd_t is a mistake. I used coccinelle to generate this commit. The semantic patch that makes this change is as follows: <smpl> @@ typedef bd_t; @@ -bd_t +struct bd_info </smpl> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-05-18common: Drop linux/delay.h from common headerSimon Glass1-0/+1
Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-18common: Drop init.h from common headerSimon Glass1-0/+1
Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-18common: Drop flash.h from common headerSimon Glass1-0/+1
Move this uncommon header out of the common header. Fix up some style problems in flash.h while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-18flash: Tidy up coding style for flash functionsSimon Glass1-13/+14
Some functions use the wrong code style and generate checkpatch errors. Fix these. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-01-17common: Move clock functions into a new fileSimon Glass1-0/+1
These three clock functions don't use driver model and should be migrated. In the meantime, create a new file to hold them. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-01-17common: Move upmconfig() to ppc.hSimon Glass1-2/+2
This file is only used by PowerPC so move it to an arch-specific header file. Signed-off-by: Simon Glass <sjg@chromium.org>
2019-11-06mpc85xx, socrates: add DM PCI supportHeiko Schocher1-35/+5
add DM PCI support on the socrates board. use PCIE_FSL now. Signed-off-by: Heiko Schocher <hs@denx.de> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2019-11-06mpc85xx, socrates: enable DM serialHeiko Schocher1-0/+5
switch to DM_SERIAL support. Signed-off-by: Heiko Schocher <hs@denx.de> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2019-11-06mpc85xx, socrates: disable VIDEOHeiko Schocher1-178/+2
disable video, as not really needed longer. Signed-off-by: Heiko Schocher <hs@denx.de> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2019-11-06mpc85xx, socrates: add DM supportHeiko Schocher1-0/+15
enable CONFIG_DM for the socrates board. Signed-off-by: Heiko Schocher <hs@denx.de> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2019-08-11env: Move env_get_f() to env.hSimon Glass1-0/+1
Move this function over to the new header file. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-05-07SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini1-2/+1
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
2018-03-05libfdt: move headers to <linux/libfdt.h> and <linux/libfdt_env.h>Masahiro Yamada1-1/+1
Thomas reported U-Boot failed to build host tools if libfdt-devel package is installed because tools include libfdt headers from /usr/include/ instead of using internal ones. This commit moves the header code: include/libfdt.h -> include/linux/libfdt.h include/libfdt_env.h -> include/linux/libfdt_env.h and replaces include directives: #include <libfdt.h> -> #include <linux/libfdt.h> #include <libfdt_env.h> -> #include <linux/libfdt_env.h> Reported-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-08-16env: Rename getenv/_f() to env_get()Simon Glass1-2/+2
We are now using an env_ prefix for environment functions. Rename these two functions for consistency. Also add function comments in common.h. Quite a few places use getenv() in a condition context, provoking a warning from checkpatch. These are fixed up in this patch also. Suggested-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org>
2017-05-12socrates: Fix a misleading indentation warningTom Rini1-1/+1
With gcc-6 and later we see a warning about the fact that we have a construct of "if (test);\n\tstatement". Upon reviewing the code, the intention here is as the compiler suggests, we only want to execute the indented statement if the test was true. Cc: Sergei Poselenov <sposelenov@emcraft.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2016-05-27Delete tests of CONFIG_OF_LIBFDT when testing CONFIG_OF_BOARD_SETUPRobert P. J. Day1-2/+2
Since CONFIG_OF_BOARD_SETUP depends on CONFIG_OF_LIBFDT: config OF_BOARD_SETUP bool "Set up board-specific details in device tree before boot" depends on OF_LIBFDT ... remove superfluous tests of CONFIG_OF_LIBFDT when testing for CONFIG_OF_BOARD_SETUP. Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> [trini: Typo fix: s/ifdefi/ifdef/] Signed-off-by: Tom Rini <trini@konsulko.com>
2014-11-21fdt: Allow ft_board_setup() to report failureSimon Glass1-2/+3
This function can fail if the device tree runs out of space. Rather than silently booting with an incomplete device tree, allow the failure to be detected. Unfortunately this involves changing a lot of places in the code. I have not changed behvaiour to return an error where one is not currently returned, to avoid unexpected breakage. Eventually it would be nice to allow boards to register functions to be called to update the device tree. This would avoid all the many functions to do this. However it's not clear yet if this should be done using driver model or with a linker list. This work is left for later. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de>
2013-08-20powerpc: Fix CamelCase checkpatch warningsPrabhakar Kushwaha1-1/+1
85xx, 86xx PowerPC folders have code variables with CamelCase naming conventions. because of this code checkpatch script generates "WARNING: Avoid CamelCase". Convert variables name to normal naming convention and modify board, driver files with updated the new structure. Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com> Acked-by: York Sun <yorksun@freescale.com>
2013-07-24Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk1-17/+1
Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
2011-05-12Fix incorrect use of getenv() before relocationWolfgang Denk1-5/+7
A large number of boards incorrectly used getenv() in their board init code running before relocation. In some cases this caused U-Boot to hang when certain environment variables grew too long. Fix the code to use getenv_r(). Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Stefan Roese <sr@denx.de> Cc: The LEOX team <team@leox.org> Cc: Michael Schwingen <michael@schwingen.org> Cc: Georg Schardt <schardt@team-ctech.de> Cc: Werner Pfister <Pfister_Werner@intercontrol.de> Cc: Dirk Eibach <eibach@gdsys.de> Cc: Peter De Schrijver <p2@mind.be> Cc: John Zhan <zhanz@sinovee.com> Cc: Rishi Bhattacharya <rishi@ti.com> Cc: Peter Tyser <ptyser@xes-inc.com>
2010-07-1683xx/85xx/86xx: LBC register cleanupBecky Bruce1-16/+15
Currently, 83xx, 86xx, and 85xx have a lot of duplicated code dedicated to defining and manipulating the LBC registers. Merge this into a single spot. To do this, we have to decide on a common name for the data structure that holds the lbc registers - it will now be known as fsl_lbc_t, and we adopt a common name for the immap layouts that include the lbc - this was previously known as either im_lbc or lbus; use the former. In addition, create accessors for the BR/OR regs that use in/out_be32 and use those instead of the mismash of access methods currently in play. I have done a successful ppc build all and tested a board or two from each processor family. Signed-off-by: Becky Bruce <beckyb@kernel.crashing.org> Acked-by: Kim Phillips <kim.phillips@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-10-31video: mb862xx: improve board-specific Lime configurationWolfgang Grandegger1-39/+7
To avoid board-specific code accessing the mb862xx registers directly, the public function mb862xx_probe() has been introduced. Furthermore, the "Change of Clock Frequency" and "Set Memory I/F Mode" registers are now defined by CONFIG_SYS_MB862xx_CCF and CONFIG_SYS_MB862xx__MMR, respectively. The BSPs for the socrates and lwmon5 boards have been adapted accordingly. Signed-off-by: Wolfgang Grandegger <wg@denx.de>
2009-06-04Redundant Environment: protect full sector sizeWolfgang Denk1-1/+1
Several boards used different ways to specify the size of the protected area when enabling flash write protection for the sectors holding the environment variables: some used CONFIG_ENV_SIZE and CONFIG_ENV_SIZE_REDUND, some used CONFIG_ENV_SECT_SIZE, and some even a mix of both for the "normal" and the "redundant" areas. Normally, this makes no difference at all. However, things are different when you have to deal with boards that can come with different types of flash chips, which may have different sector sizes. Here we may have to chose CONFIG_ENV_SECT_SIZE such that it fits the biggest sector size, which may include several sectors on boards using the smaller sector flash types. In such a case, using CONFIG_ENV_SIZE or CONFIG_ENV_SIZE_REDUND to enable the protection may lead to the case that only the first of these sectors get protected, while the following ones aren't. This is no real problem, but it can be confusing for the user - especially on boards that use CONFIG_ENV_SECT_SIZE to protect the "normal" areas, while using CONFIG_ENV_SIZE_REDUND for the "redundant" area. To avoid such inconsistencies, I changed all sucn boards that I found to consistently use CONFIG_ENV_SECT_SIZE for protection. This should not cause any functional changes to the code. Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Paul Ruhland Cc: Pantelis Antoniou <panto@intracom.gr> Cc: Stefan Roese <sr@denx.de> Cc: Gary Jennejohn <garyj@denx.de> Cc: Dave Ellis <DGE@sixnetio.com> Acked-by: Stefan Roese <sr@denx.de>
2008-12-19mpc8xxx: LCRR[CLKDIV] is sometimes five bitsTrent Piepho1-1/+1
On newer CPUs, 8536, 8572, and 8610, the CLKDIV field of LCRR is five bits instead of four. In order to avoid an ifdef, LCRR_CLKDIV is set to 0x1f on all systems. It should be safe as the fifth bit was defined as reserved and set to 0. Code that was using a hard coded 0x0f is changed to use LCRR_CLKDIV. Signed-off-by: Trent Piepho <tpiepho@freescale.com> Acked-by: Kumar Gala <galak@kernel.crashing.org> Acked-by: Jon Loeliger <jdl@freescale.com>
2008-10-18rename CFG_ macros to CONFIG_SYSJean-Christophe PLAGNIOL-VILLARD1-59/+59
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-1385xx: socrates: autoprobe Lime chipu-boot@bugs.denx.de1-15/+43
This patch is an attempt to implement autoprobing for the Lime presence on the bus. Configure GPCM for Lime CS2 and try to access chip ID registers. Second read atempt delivers register values if the chip is present. Signed-off-by: Anatolij Gustschin <agust@denx.de>
2008-09-10rename CFG_ENV macros to CONFIG_ENVJean-Christophe PLAGNIOL-VILLARD1-4/+4
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-0985xx: socrates: Enable Lime support.Anatolij Gustschin1-0/+198
This patch adds Lime GDC support together with support for the PWM backlight control through the w83782d chip. The reset pin of the latter is attached to GPIO, so we need to reset it in early_board_init_r. Signed-off-by: Anatolij Gustschin <agust@denx.de>
2008-09-0985xx: Socrates: Major code update.Detlev Zundel1-33/+49
- Update the local bus ranges in the FDT for Linux for the various devices connected to the local bus via chip-select. - Set the LCRR_DBYP bit in the LCRR for local bus frequencies lower than 66 MHz and uses I/O accessor functions consequently. - UPM data update. - Update of default environment and configuration. Use I2C multibus as we do have two I2C buses. Also enable sdram and ext2 commands. Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: Sergei Poselenov <sposelenov@emcraft.com> Signed-off-by: Detlev Zundel <dzu@denx.de>
2008-06-11Socrates: Added FPGA base address update in FDT.Sergei Poselenov1-0/+10
Signed-off-by: Sergei Poselenov <sposelenov@emcraft.com>
2008-06-11Socrates: Added FPGA mapping. LAWs and TLBs cleanup.Sergei Poselenov1-1/+7
Signed-off-by: Sergei Poselenov <sposelenov@emcraft.com>
2008-06-10socrates: Fix PCI clk fix patchAndy Fleming1-1/+3
The submitted patch seems to have been more up-to-date, but an older patch was already in the repository. This patch encompasses the differences Taken entirely from Sergei Poselenov <sposelenov@emcraft.com> Signed-off-by: Andy Fleming <afleming@freescale.com>
2008-05-27Socrates: Fix PCI bus frequency reportSergei Poselenov1-2/+11
Signed-off-by: Sergei Poselenov <sposelenov@emcraft.com>
2008-05-20socrates: changes to support FDTSergei Poselenov1-0/+25
Signed-off-by: Sergei Poselenov <sposelenov@emcraft.com> Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-05-20Initial support for "Socrates" boardSergei Poselenov1-0/+186
Signed-off-by: Sergei Poselenov <sposelenov@emcraft.com>