summaryrefslogtreecommitdiffstats
path: root/board/mpl/common
Commit message (Collapse)AuthorAgeFilesLines
* stdio: Pass device pointer to stdio methodsSimon Glass2014-07-232-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* stdio: Remove redundant code around stdio_register() callsSimon Glass2014-07-231-2/+0
| | | | | | | | | | | | | There is no point in setting a structure's memory to NULL when it has already been zeroed with memset(). Also, there is no need to create a stub function for stdio to call - if the function is NULL it will not be called. This is a clean-up, with no change in functionality. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Marek Vasut <marex@denx.de>
* usb: create common header virtual root hub descriptorsStephen Warren2014-03-101-112/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many USB host controller drivers contain almost identical copies of the same virtual root hub descriptors. Put these into a common file to avoid duplication. Note that there were some very minor differences between the descriptors in the various files, such as: - USB 1.0 vs. USB 1.1 - Manufacturer/Device ID - Max packet size - String content I assume these aren't relevant. Cc: Thomas Lange <thomas@corelatus.se> Cc: Shinya Kuribayashi <skuribay@pobox.com> Cc: Gary Jennejohn <garyj@denx.de> Cc: Wolfgang Denk <wd@denx.de> Cc: Eric Millbrandt <emillbrandt@coldhaus.com> Cc: Pierre Aubert <p.aubert@staubli.com> Cc: Stefan Roese <sr@denx.de> Cc: Daniel Hellstrom <daniel@gaisler.com> Cc: Denis Peter <d.peter@mpl.ch> Cc: Rodolfo Giometti <giometti@linux.it> Cc: Zhang Wei <wei.zhang@freescale.com> Cc: Mateusz Zalega <m.zalega@samsung.com> Cc: Remy Bohmer <linux@bohmer.net> Cc: Markus Klotzbuecher <mk@denx.de> Cc: Minkyu Kang <mk7.kang@samsung.com> Cc: Gary Jennejohn <garyj@denx.de> Cc: C Nauman <cnauman@diagraph.com> Cc: David Müller <d.mueller@elsoft.ch> Cc: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Cc: Thomas Abraham <t-abraham@ti.com> Cc: Tom Rini <trini@ti.com> Cc: Andrew Murray <amurray@embedded-bits.co.uk> Cc: Matej Frančeškin <matej.franceskin@comtrade.com> Cc: Cliff Cai <cliff.cai@analog.com> Cc: Bryan Wu <cooloney@gmail.com> Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
* usb: add enum usb_init_type parameter to usb_lowlevel_initTroy Kisky2013-10-201-1/+1
| | | | | | This parameter will later be used to verify OTG ports. Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
* SPDX: fix IBM-pibs license identifierWolfgang Denk2013-09-201-1/+1
| | | | | | | | | | | | | The SPDX License List version 1.19 now contains an official entry for the IBM-pibs license. However, instead of our suggestion "ibm-pibs", the SPDX License List uses "IBM-pibs", with the following rationale: "The reason being that all other SPDX License List short identifiers tend towards using capital letters unless spelling a word. I'd prefer to be consistent to this end". Change the license IDs to use the official name. Signed-off-by: Wolfgang Denk <wd@denx.de>
* SPDX-License-Identifier: convert PIBS licensed filesWolfgang Denk2013-08-191-22/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adapts the files that were derived from PIBS (PowerPC Initialization and Boot Software) codeto using SPDX License Identifiers. So far, SPDX has not assigned an official License ID for the PIBS license yet, so this should be considered preliminary. Note that the following files contained incorrect license information: arch/powerpc/cpu/ppc4xx/4xx_uart.c arch/powerpc/cpu/ppc4xx/start.S arch/powerpc/include/asm/ppc440.h These files included, in addition to the GPL-2.0 / ibm-pibs dual license as inherited from PIBS, a GPL-2.0+ license header which was obviously incorrect. This has been removed. Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Stefan Roese <sr@denx.de> Signed-off-by: Wolfgang Denk <wd@denx.de> Conflicts: Licenses/README Acked-by: Stefan Roese <sr@denx.de>
* Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk2013-07-2410-181/+10
| | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
* Consolidate bool typeYork Sun2013-04-011-10/+3
| | | | | | | | | | | | | '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>
* usb: lowlevel interface change to support multiple controllersLucas Stach2012-10-151-2/+2
| | | | | | | | | | | Carry an index in the lowlevel usb functions to make specify the respective usb controller. Also pass through an controller struct from lowlevel_init to the creation of the root usb device of this controller. Signed-off-by: Lucas Stach <dev@lynxeye.de> Reviewed-by: Marek Vasut <marex@denx.de>
* usb: replace wait_ms() with mdelay()Mike Frysinger2012-03-191-4/+4
| | | | | | | | | | | | | | | | | | | | | | | Common code has a mdelay() func, so use that instead of the usb-specific wait_ms() func. This also fixes the build errors: ohci-hcd.c: In function 'submit_common_msg': /usr/local/src/u-boot/blackfin/include/usb.h:202:44: sorry, unimplemented: inlining failed in call to 'wait_ms': function body not available ohci-hcd.c:1519:9: sorry, unimplemented: called from here /usr/local/src/u-boot/blackfin/include/usb.h:202:44: sorry, unimplemented: inlining failed in call to 'wait_ms': function body not available ohci-hcd.c:1816:10: sorry, unimplemented: called from here /usr/local/src/u-boot/blackfin/include/usb.h:202:44: sorry, unimplemented: inlining failed in call to 'wait_ms': function body not available ohci-hcd.c:1827:10: sorry, unimplemented: called from here /usr/local/src/u-boot/blackfin/include/usb.h:202:44: sorry, unimplemented: inlining failed in call to 'wait_ms': function body not available ohci-hcd.c:1844:10: sorry, unimplemented: called from here /usr/local/src/u-boot/blackfin/include/usb.h:202:44: sorry, unimplemented: inlining failed in call to 'wait_ms': function body not available ohci-hcd.c:1563:11: sorry, unimplemented: called from here /usr/local/src/u-boot/blackfin/include/usb.h:202:44: sorry, unimplemented: inlining failed in call to 'wait_ms': function body not available ohci-hcd.c:1583:9: sorry, unimplemented: called from here make[1]: *** [ohci-hcd.o] Error 1 Signed-off-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Marek Vasut <marex@denx.de>
* board/mpl/common: remove the old legacy flashDavid Müller2012-01-093-896/+182
| | | | | Signed-off-by: David Mueller <d.mueller@elsoft.ch> Signed-off-by: Stefan Roese <sr@denx.de>
* board/mpl/common/isa.c: Fix GCC 4.6 build warningsDavid Müller (ELSOFT AG)2011-12-121-3/+3
| | | | | | | | | | | Fix: ../common/isa.c: In function 'handle_isa_int': ../common/isa.c:385:21: warning: variable 'isr2' set but not used [-Wunused-but-set-variable] ../common/isa.c:385:16: warning: variable 'isr1' set but not used [-Wunused-but-set-variable] Signed-off-by: David Mueller <d.mueller@elsoft.ch>
* board/mpl/common/flash.c: Fix GCC 4.6 build warningWolfgang Denk2011-12-021-2/+1
| | | | | | | | | | | Fix: ../common/flash.c: In function 'flash_init': ../common/flash.c:160:16: warning: variable 'size_b1' set but not used [-Wunused-but-set-variable] Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Denis Peter <d.peter@mpl.ch> Acked-by: Marek Vasut <marek.vasut@gmail.com>
* board/mpl/common/flash.c: fix GCC 4.6 build warningWolfgang Denk2011-11-071-14/+1
| | | | | | | | | | Fix: ../common/flash.c: In function 'flash_erase': ../common/flash.c:603:24: warning: variable 'l_sect' set but not used [-Wunused-but-set-variable] Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Denis Peter <d.peter@mpl.ch>
* Convert ISO-8859 files to UTF-8Albert ARIBAUD2011-08-041-1/+1
| | | | | | | | There was a mix of UTF-8 and ISO-8859 files in the U-Boot source tree, which could cause issues with the patchwork review system. This commit converts all ISO-8859 files to UTF-8. Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
* cleanup: Fix typos and misspellings in various files.Mike Williams2011-07-281-1/+1
| | | | | | | | | | | Recieve/Receive recieve/receive Interupt/Interrupt interupt/interrupt Addres/Address addres/address Signed-off-by: Mike Williams <mike@mikebwilliams.com>
* board/mpl: Remove mpl-specific memory test commandPeter Tyser2010-10-062-592/+3
| | | | | | | | | | | The mpl-specfic memory test is only documented for one board, doesn't compile cleanly, uses improper coding style, and overlaps functionality with U-Boot's common 'mtest' command, so lets get rid of it. Signed-off-by: Peter Tyser <ptyser@xes-inc.com> CC: d.peter@mpl.ch CC: d.mueller@elsoft.ch CC: wd@denx.de
* ppc4xx: Move ppc4xx headers to powerpc include directoryStefan Roese2010-09-232-2/+2
| | | | | | | | | This patch moves some ppc4xx related headers from the common include directory (include/) to the powerpc specific one (arch/powerpc/include/asm/). This way to common include directory is not so cluttered with files. Signed-off-by: Stefan Roese <sr@denx.de>
* Rename getenv_r() into getenv_f()Wolfgang Denk2010-08-042-3/+3
| | | | | | | | | | | | | | | | | | | While running from flash, i. e. before relocation, we have only a limited C runtime environment without writable data segment. In this phase, some configurations (for example with environment in EEPROM) must not use the normal getenv(), but a special function. This function had been called getenv_r(), with the idea that the "_r" suffix would mean the same as in the _r_eentrant versions of some of the C library functions (for example getdate vs. getdate_r, getgrent vs. getgrent_r, etc.). Unfortunately this was a misleading name, as in U-Boot the "_r" generally means "running from RAM", i. e. _after_ relocation. To avoid confusion, rename into getenv_f() [as "running from flash"] Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Detlev Zundel <dzu@denx.de>
* cmd_usage(): simplify return code handlingWolfgang Denk2010-07-241-2/+1
| | | | | | | | | | | | | | | | Lots of code use this construct: cmd_usage(cmdtp); return 1; Change cmd_usage() let it return 1 - then we can replace all these ocurrances by return cmd_usage(cmdtp); This fixes a few places with incorrect return code handling, too. Signed-off-by: Wolfgang Denk <wd@denx.de>
* Make sure that argv[] argument pointers are not modified.Wolfgang Denk2010-07-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The hush shell dynamically allocates (and re-allocates) memory for the argument strings in the "char *argv[]" argument vector passed to commands. Any code that modifies these pointers will cause serious corruption of the malloc data structures and crash U-Boot, so make sure the compiler can check that no such modifications are being done by changing the code into "char * const argv[]". This modification is the result of debugging a strange crash caused after adding a new command, which used the following argument processing code which has been working perfectly fine in all Unix systems since version 6 - but not so in U-Boot: int main (int argc, char **argv) { while (--argc > 0 && **++argv == '-') { /* ====> */ while (*++*argv) { switch (**argv) { case 'd': debug++; break; ... default: usage (); } } } ... } The line marked "====>" will corrupt the malloc data structures and usually cause U-Boot to crash when the next command gets executed by the shell. With the modification, the compiler will prevent this with an error: increment of read-only location '*argv' N.B.: The code above can be trivially rewritten like this: while (--argc > 0 && **++argv == '-') { char *arg = *argv; while (*++arg) { switch (*arg) { ... Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Mike Frysinger <vapier@gentoo.org>
* move prototypes for gunzip() and zunzip() to common.hWolfgang Wegner2009-12-211-1/+0
| | | | | | | | Prototype for gunzip/zunzip was only in lib_generic/gunzip.c and thus repeated in every file using it. This patch moves the prototypes to common.h and removes all prototypes distributed anywhere else. Signed-off-by: Wolfgang Wegner <w.wegner@astro-kom.de>
* mpl: Remove memory test relocation fixupsPeter Tyser2009-10-031-26/+0
| | | | Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* ppc: Remove pci config table pointer relocation fixupsPeter Tyser2009-10-031-18/+0
| | | | Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* ppc4xx: Big cleanup of PPC4xx definesStefan Roese2009-09-111-29/+29
| | | | | | | | | | | | | | | | This patch cleans up multiple issues of the 4xx register (mostly DCR, SDR, CPR, etc) definitions: - Change lower case defines to upper case (plb4_acr -> PLB4_ACR) - Change the defines to better match the names from the user's manuals (e.g. cprpllc -> CPR0_PLLC) - Removal of some unused defines Please test this patch intensive on your PPC4xx platform. Even though I tried not to break anything and tested successfully on multiple 4xx AMCC platforms, testing on custom platforms is recommended. Signed-off-by: Stefan Roese <sr@denx.de>
* Dual-license IBM code contributionsJosh Boyer2009-08-091-0/+2
| | | | | | | | | | | | | It was brought to our attention that U-Boot contains code derived from the IBM OpenBIOS source code originally provided with some of the older PowerPC 4xx development boards. As a result, the original license of this code has been carried in the various files for a number of years in the U-Boot project. IBM is dual-licensing the IBM code contributions already present in U-Boot under either the terms of the GNU General Public License version 2, or the original code license already present. Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
* PATI board: fix compiler warningsWolfgang Denk2009-07-191-3/+7
| | | | | | | | | | | | Fix these: pati.c: In function 'checkboard': pati.c:358: warning: pointer targets in passing argument 2 of 'getenv_r' differ in signedness ../common/flash.c: In function 'write_word': ../common/flash.c:824: warning: dereferencing type-punned pointer will break strict-aliasing rules cmd_pati.c: In function 'do_pati': cmd_pati.c:279: warning: 'value' may be used uninitialized in this function Signed-off-by: Wolfgang Denk <wd@denx.de>
* mpl: printing current stdio devices cleanupJean-Christophe PLAGNIOL-VILLARD2009-07-192-31/+0
| | | | | | | | | | | | Currently the mpl boards duplicate the code to print the current devices from common/console.c; use stdio_print_current_devices() instead Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Edited commit message. Signed-off-by: Wolfgang Denk <wd@denx.de>
* MIP405T: fix compile problemWolfgang Denk2009-07-181-1/+1
| | | | | | | The "stdio/device: rework function naming convention" patch (commit 52cb4d4f) broke the MIP405T board; this patch fixes it. Signed-off-by: Wolfgang Denk <wd@denx.de>
* stdio/device: rework function naming conventionJean-Christophe PLAGNIOL-VILLARD2009-07-183-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | So far the console API uses the following naming convention: ======Extract====== typedef struct device_t; int device_register (device_t * dev); int devices_init (void); int device_deregister(char *devname); struct list_head* device_get_list(void); device_t* device_get_by_name(char* name); device_t* device_clone(device_t *dev); ======= which is too generic and confusing. Instead of using device_XX and device_t we change this into stdio_XX and stdio_dev This will also allow to add later a generic device mechanism in order to have support for multiple devices and driver instances. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Edited commit message. Signed-off-by: Wolfgang Denk <wd@denx.de>
* Standardize command usage messages with cmd_usage()Peter Tyser2009-01-281-1/+1
| | | | Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* Use strmhz() to format clock frequenciesWolfgang Denk2008-10-211-5/+6
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* Merge git://git.denx.de/u-boot into x1Markus Klotzbuecher2008-10-215-47/+47
|\ | | | | | | | | | | Conflicts: drivers/usb/usb_ohci.c
| * rename CFG_ macros to CONFIG_SYSJean-Christophe PLAGNIOL-VILLARD2008-10-185-47/+47
| | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* | The PIPE_INTERRUPT flag is used wrongRemy Bohmer2008-10-141-1/+1
|/ | | | | | | | | | | | | | At a lot of places in the code the PIPE_INTERRUPT flags and friends are used wrong. The wrong bits are compared to this flag resulting in wrong conditions. Also there are macros that should be used for PIPE_* flags. This patch tries to fix them all, however, I was not able to test the changes, because I do not have any of these boards. Review required! Signed-off-by: Remy Bohmer <linux@bohmer.net> Signed-off-by: Markus Klotzbuecher <mk@denx.de>
* rename CFG_ENV macros to CONFIG_ENVJean-Christophe PLAGNIOL-VILLARD2008-09-102-7/+7
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* rename CFG_ENV_IS_IN_FLASH in CONFIG_ENV_IS_IN_FLASHJean-Christophe PLAGNIOL-VILLARD2008-09-101-1/+1
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* disk-on-chip: remove duplicate doc_probe declarationJean-Christophe PLAGNIOL-VILLARD2008-09-091-1/+0
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* Code cleanup: fix old style assignment ambiguities like "=-" etc.Wolfgang Denk2008-07-144-10/+10
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* Big white-space cleanup.Wolfgang Denk2008-05-218-165/+163
| | | | | | | | | | | This commit gets rid of a huge amount of silly white-space issues. Especially, all sequences of SPACEs followed by TAB characters get removed (unless they appear in print statements). Also remove all embedded "vim:" and "vi:" statements which hide indentation problems. Signed-off-by: Wolfgang Denk <wd@denx.de>
* [new uImage] Update naming convention for bootm/uImage related codeMarian Balakowicz2008-02-291-2/+2
| | | | | | | | | | | | | | | This patch introduces the following prefix convention for the image format handling and bootm related code: genimg_ - dual format shared code image_ - legacy uImage format specific code fit_ - new uImage format specific code boot_ - booting process related code Related routines are renamed and a few pieces of code are moved around and re-grouped. Signed-off-by: Marian Balakowicz <m8@semihalf.com>
* [new uImage] Add dual format uImage support frameworkMarian Balakowicz2008-02-251-0/+7
| | | | | | | | | | | | | | This patch adds framework for dual format images. Format detection is added and the bootm controll flow is updated to include cases for new FIT format uImages. When the legacy (image_header based) format is detected appropriate legacy specific handling is invoked. For the new (FIT based) format uImages dual boot framework has a minial support, that will only print out a corresponding debug messages. Implementation of the FIT specific handling will be added in following patches. Signed-off-by: Marian Balakowicz <m8@semihalf.com>
* [new uImage] Rename and move print_image_hdr() routineMarian Balakowicz2008-02-211-1/+1
| | | | Signed-off-by: Marian Balakowicz <m8@semihalf.com>
* [new uImage] Define a API for image handling operationsMarian Balakowicz2008-02-071-22/+15
| | | | | | | | | - Add inline helper macros for basic header processing - Move common non inline code common/image.c - Replace direct header access with the API routines - Rename IH_CPU_* to IH_ARCH_* Signed-off-by: Marian Balakowicz <m8@semihalf.com>
* ppc4xx: Consolidate some of the 405 and 440 macros/structs into 4xxStefan Roese2007-10-311-1/+1
| | | | | | | | | | This patch moves some common 4xx macros and the PPC405_SYS_INFO/ PPC440_SYS_INFO structure into the common ppc4xx.h header. Lot's of other macros are good candidates to be consolidated this way in the future. Signed-off-by: Stefan Roese <sr@denx.de>
* ppc4xx: Rename 405gp_pci to 4xx_pci since its used on all 4xx platformsStefan Roese2007-10-312-3/+3
| | | | | | | | These files were introduced with the IBM 405GP but are currently used on all 4xx PPC platforms. So the name doesn't match the content anymore. This patch renames the files to 4xx_pci.c/h. Signed-off-by: Stefan Roese <sr@denx.de>
* board/[m-p]*: Remove obsolete references to CONFIG_COMMANDSJon Loeliger2007-07-092-4/+4
| | | | Signed-off-by: Jon Loeliger <jdl@freescale.com>
* board/[k-z]*: Augment CONFIG_COMMANDS tests with defined(CONFIG_CMD_*).Jon Loeliger2007-07-042-3/+3
| | | | | | | | | | | | | | This is a compatibility step that allows both the older form and the new form to co-exist for a while until the older can be removed entirely. All transformations are of the form: Before: #if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT) After: #if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT) || defined(CONFIG_CMD_AUTOSCRIPT) Signed-off-by: Jon Loeliger <jdl@freescale.com>
* [PATCH] PPC4xx: Add support for multiple I2C bussesStefan Roese2007-02-201-1/+1
| | | | | | | | | | | | | | This patch adds support for multiple I2C busses on the PPC4xx platforms. Define CONFIG_I2C_MULTI_BUS in the board config file to make use of this feature. It also merges the 405 and 440 i2c header files into one common file 4xx_i2c.h. Also the 4xx i2c reset procedure is reworked since I experienced some problems with the first access on the 440SPe Katmai board. Signed-off-by: Stefan Roese <sr@denx.de>
* GCC-4.x fixes: clean up global data pointer initialization for all boards.Wolfgang Denk2006-03-313-6/+8
|
OpenPOWER on IntegriCloud