Commit Graph

46 Commits

Author SHA1 Message Date
Shinya Kuribayashi 14209ac13f MIPS: Fix GCC-4.2 'discards qualifiers from pointer target type' warnings
Compiling dbau1x00 and gth2 boards with GCC-4.2, you would see new warnings
like this:

skuribay@ubuntu:u-boot.git$ ./MAKEALL dbau1000
Configuring for dbau1x00 board...
au1x00_eth.c: In function 'au1x00_send':
au1x00_eth.c:158: warning: passing argument 1 of 'virt_to_phys' discards qualifiers from pointer target type
au1x00_eth.c: In function 'au1x00_recv':
au1x00_eth.c:211: warning: passing argument 1 of 'virt_to_phys' discards qualifiers from pointer target type
au1x00_eth.c: In function 'au1x00_init':
au1x00_eth.c:252: warning: passing argument 1 of 'virt_to_phys' discards qualifiers from pointer target type
au1x00_eth.c: In function 'au1x00_recv':
au1x00_eth.c:211: warning: passing argument 1 of 'virt_to_phys' discards qualifiers from pointer target type
au1x00_eth.c: In function 'au1x00_init':
au1x00_eth.c:252: warning: passing argument 1 of 'virt_to_phys' discards qualifiers from pointer target type
au1x00_eth.c: In function 'au1x00_send':
au1x00_eth.c:158: warning: passing argument 1 of 'virt_to_phys' discards qualifiers from pointer target type

We're passing a volatile pointer to a function which is expecting a non-
volatile pointer.  That's potentially dangerous, so gcc warns about it.
Confirmed with ELDK 4.2 (GCC 4.2.2) and Sourcey G++ 4.2 (GCC 4.2.3).

To fix this, we add a volatile attribute to the argument in question.
The virt_to_phys function in Linux kernel also does the same thing.

Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
2009-02-22 21:15:43 +01:00
Kumar Gala 47d41cc3a1 Add an architecture specific config.h for common defines
We have common defines that we duplicate in various ways.  Having an
arch specific config.h gives us a common location for those defines.

Eventually we should be able to replace this when we have proper
Kconfig support.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-02-10 00:43:54 +01:00
Kumar Gala 65e43a1063 Introduce virt_to_phys()
virt_to_phys() returns the physical address given a virtual. In most
cases this will be just the input value as the vast majority of
systems run in a 1:1 mode.

However in systems that are not running this way it should report the
physical address or ~0 if no mapping exists for the given virtual
address.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-12-15 22:04:29 +01:00
Jean-Christophe PLAGNIOL-VILLARD 6d0f6bcf33 rename CFG_ macros to CONFIG_SYS
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-10-18 21:54:03 +02:00
Mark Jackson f5c3ba7978 Allow console input to be disabled
Added new CONFIG_DISABLE_CONSOLE define and GD_FLG_DISABLE_CONSOLE.

When CONFIG_DISABLE_CONSOLE is defined, setting
GD_FLG_DISABLE_CONSOLE disables all console input and output.

Signed-off-by: Mark Jackson <mpfj@mimc.co.uk>
2008-09-06 22:36:54 +02:00
Becky Bruce b57ca3e128 Change bd/gd memsize/ram_size to be phys_size_t.
Currently, both are defined as an unsigned long, but
should be phys_size_t. This should result in no real change,
since phys_size_t is currently an unsigned long for all the
default configs.  Also add print_lnum to cmd_bdinfo to deal
with the potentially wider memsize.

Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
2008-06-12 00:54:53 +02:00
Shinya Kuribayashi 8bde63eb3f [MIPS] Rename Alchemy processor configs into CONFIG_SOC_*
CONFIG_SOC_AU1X00

  Common Alchemy Au1x00 stuff. All Alchemy processor based machines
  need to have this config as a system type specifier.

CONFIG_SOC_AU1000, CONFIG_SOC_AU1100, CONFIG_SOC_AU1200,
CONFIG_SOC_AU1500, CONFIG_SOC_AU1550

  Machine type specifiers. Each port should have one of aboves.

Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
2008-06-07 20:51:56 +09:00
Shinya Kuribayashi 7daf2ebe91 [MIPS] Update <asm/addrspace.h> header
- Fix traditional KSEG names
- Replace PHYSADDR with CPHYSADDR

Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
2008-06-05 22:29:00 +09:00
Jason McMullan 1a9fcc4b76 mips: Add an 'include/asm/errno.h', like all other architectures
All other u-boot architectures have an include/asm/errno.h, so
this change adds it to the mips include/asm-mips headers also.

Stolen from Linux 2.6.25.

Signed-off-by: Jason McMullan <mcmullan@netapp.com>
2008-05-30 00:53:38 +09:00
Shinya Kuribayashi e2ad842662 [MIPS] <asm/mipsregs.h>: Update coprocessor register access macros
Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
2008-05-30 00:53:38 +09:00
Shinya Kuribayashi 1a3adac81c [MIPS] <asm/mipsregs.h>: Update register / bit field definitions
Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
2008-05-30 00:53:38 +09:00
Shinya Kuribayashi bf462ae450 [MIPS] <asm/mipsregs.h>: CodinygStyle cleanups
No functional changes.

Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
2008-05-30 00:53:37 +09:00
Wolfgang Denk eddc7c46c6 Merge branch 'lwmon5' of /home/wd/git/u-boot/projects 2008-05-21 01:13:39 +02:00
Wolfgang Denk 53677ef18e Big white-space cleanup.
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>
2008-05-21 00:14:08 +02:00
Yuri Tikhonov 0e15ddd11f POST: replace the LOGBUFF_INITIALIZED flag in gd->post_log_word (1 << 31) with the GD_FLG_LOGINIT flag in gd->flags.
This way we become able to utilize the full post_log_word for POST
activities (overwise, POST ECC, which has 0x8000 ID, could be
erroneously treated as started in post_output_backlog() even if there
was actually no POST ECC run (because of OCM POST failure, for
example).

Signed-off-by: Yuri Tikhonov <yur@emcraft.com>
2008-05-20 23:24:38 +02:00
Yuri Tikhonov 28a3850658 POST: add POST_STOP flag
Don't run futher tests in case of a test fails that is marked as
POST_STOP.

Signed-off-by: Ilya Yanok <yanok@emcraft.com>
Signed-off-by: Yuri Tikhonov <yur@emcraft.com>
2008-05-20 23:24:37 +02:00
Kumar Gala e99ccb4881 Introduce phys_size_t and move phys_addr_t into asm/types.h
Also add CONFIG_PHYS_64BIT on powerpc to deal with 32-bit ppc's
that have larger physical addresses like 44x, 85xx, and 86xx.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-04-13 17:13:46 -07:00
Shinya Kuribayashi b0c66af53e [MIPS] Introduce _machine_restart
Handles machine specific functions by using weak functions.

Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
2008-03-25 21:30:07 +09:00
Shinya Kuribayashi 2f5d414ccb [MIPS] cpu/mips/cache.S: Introduce NESTED/LEAF/END macros
This patch replaces the current function definitions with NESTED, LEAF
and END macro. They specify some more additional information about the
function; an alignment of symbol, type of symbol, stack frame usage, etc.
These information explicitly tells the assembler and the debugger about
the types of code we want to generate.

Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
2008-03-25 21:30:06 +09:00
Shinya Kuribayashi 282223a607 [MIPS] asm headers' updates
Make some asm headers adjusted to the latest Linux kernel.

Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
2008-03-25 11:43:17 +09:00
Yuri Tikhonov b428f6a8c6 The patch introduces the CRITICAL feature of POST tests. If the test marked as POST_CRITICAL fails then the alternative, post_critical, boot-command is used. If this command is not defined then U-Boot enters into interactive mode.
Signed-off-by: Dmitry Rakhchev <rda@emcraft.com>
Signed-off-by: Yuri Tikhonov <yur@emcraft.com>
2008-03-18 22:24:48 +01:00
Shinya Kuribayashi b075d74efb Remove the __STRICT_ANSI__ check from the __u64/__s64 declaration on 32bit targets.
----------------------------------------------------------------
Olaf Hering [Wed, 17 Oct 2007 06:27:13 +0000 (23:27 -0700)]

Remove the __STRICT_ANSI__ check from the __u64/__s64 declaration on
32bit targets.

GCC can be made to warn about usage of long long types with ISO C90
(-ansi), but only with -pedantic.  You can write this in a way that even
then it doesn't cause warnings, namely by:

#ifdef __GNUC__
__extension__ typedef __signed__ long long __s64;
__extension__ typedef unsigned long long __u64;
#endif

The __extension__ keyword in front of this switches off any pedantic
warnings for this expression.

Signed-off-by: Olaf Hering <olh@suse.de>
Cc: <linux-arch@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
----------------------------------------------------------------

Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
2008-02-23 09:49:48 +01:00
Haavard Skinnemoen 4d7d6936eb Introduce map_physmem() and unmap_physmem()
map_physmem() returns a virtual address which can be used to access a
given physical address without involving the cache. unmap_physmem()
should be called when the virtual address returned by map_physmem() is
no longer needed.

This patch adds a stub implementation which simply returns the
physical address cast to a uchar * for all architectures except AVR32,
which converts the physical address to an uncached virtual mapping.
unmap_physmem() is a no-op on all architectures, but if any
architecture needs to do such mappings through the TLB, this is the
hook where those TLB entries can be invalidated.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-12-13 13:15:16 +01:00
Jean-Christophe PLAGNIOL-VILLARD 5c15010efa Fixed mips_io_port_base build errors.
This patch has been sent on:
- 29 Sep 2007

Although mips_io_port_base is currently a part of IDE command, it is quite
fundamental for MIPS I/O port access such as in[bwl] and out[bwl]. So move
it to MIPS general part, and introduce `set_io_port_base()' from Linux.

This patch is triggered by multiple definition of `mips_io_port_base' build
error on gth2 (and tb0229 also needs this fix.)

board/gth2/libgth2.a(gth2.o): In function `log_serial_char':
/home/skuribay/devel/u-boot.git/board/gth2/gth2.c:47: multiple definition of `mips_io_port_base'
common/libcommon.a(cmd_ide.o):/home/skuribay/devel/u-boot.git/common/cmd_ide.c:712: first defined here
make: *** [u-boot] Error 1

Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2007-11-17 01:37:44 +01:00
Wolfgang Denk 5b746c3ea8 Merge branch 'master' of /home/wd/git/u-boot/custodians 2007-11-01 22:55:23 +01:00
Jean-Christophe PLAGNIOL-VILLARD 7b0a42219f Mips: Fix string functions differ prototype declaration
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2007-10-24 00:29:31 +02:00
Vlad Lungu de9a738faa [MIPS] Fix UNCACHED_SDRAM
PHYSADDR is for physical address, KSEG1ADDR is for uncached.

Signed-off-by: Vlad Lungu <vlad@comsys.ro>
Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi@necel.com>
2007-10-21 22:10:10 +09:00
Shinya Kuribayashi b4d8a55145 [MIPS] Remove inline asm string functions
Stop using inline string functions on MIPS as other ARCHs do so,
since the optimized inline asm versions are not small.

This change is triggered by a following MIPS build error:
common/libcommon.a(exports.o)(.text+0xdc): In function `jumptable_init':
common/exports.c:32: undefined reference to `strcmp'
make: *** [u-boot] Error 1

Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi@necel.com>
2007-09-07 00:44:45 +02:00
Shinya Kuribayashi 8ea2c4e548 [MIPS] Update asm string header
This patches contains several bugfixes and cleanups in the latest upstream:

 - Don't include linux/config.h
 - Remove buggy inline version of memscan.
 - Merge with Linux 2.6.11-rc3.
 - Fix undefined reference to strcpy in binfmt_misc caused by gcc 3.4.
 - Goodbye mips64.  31704 lines of code bite the dust.
 - Replace extern inline with static inline.
 - Fix return value of strncpy.
 - Remove a bunch more "$1" clobbers.

Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi@necel.com>
2007-09-07 00:43:01 +02:00
Haiying Wang 3a197b2fe4 [PATCH v3] Add sync to ensure flash_write_cmd is fully finished
Some CPUs like PPC, BLACKFIN need sync() to ensure cfi flash write command
is fully finished. The sync() is defined in each CPU's io.h file. For
those CPUs which do not need sync for now, a dummy sync() is defined in
their io.h as well.

Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com>
2007-02-21 16:52:31 +01:00
Wolfgang Denk 0c32d96ddd Add support for gth2 board
Patch by Thomas Lange, Aug 11 2005
2006-06-16 17:32:31 +02:00
Wolfgang Denk f08abe311b Remove unnnecessary #include <linux/types.h> from include/asm-*/u-boot.h 2005-11-25 16:38:03 +01:00
wdenk ff36fd8591 * Patch by Leif Lindholm, 23 Sep 2004:
add support for the AMD db1550 board

* Patch by Travis Sawyer, 15 Sep 2004:
  Add CONFIG_SERIAL_MULTI support for ppc4xx,
  update README.serial_multi
2005-01-09 22:28:56 +00:00
wdenk f4863a7aec * Patch by liang a lei, 9 Jan 2004:
Fix Intel 28F128J3 ID in include/flash.h

* Patch by Masami Komiya, 09 Jan 2004:
  add support for TB0229 board (NEC VR4131 MIPS processor)

* Patch by Leon Kukovec, 12 Dec 2003:
  changed extern __inline__ into static __inline__ in
  include/linux/byteorder/swab.h
2004-02-07 01:27:10 +00:00
wdenk a522fa0e7c * Make BMS2003 use a separate config file to avoid #ifdef mess;
add I2C support; add support for DS1337 RTC

* Add CompactFlash support  for BMS2003 board

* Add support for status LED on BMS2003 board
2004-01-04 22:51:12 +00:00
wdenk d4ca31c40e * Cleanup lowboot code for MPC5200
* Minor code cleanup (coding style)

* Patch by Reinhard Meyer, 30 Dec 2003:
  - cpu/mpc5xxx/fec.c: added CONFIG_PHY_ADDR, added CONFIG_PHY_TYPE,
  - added CONFIG_PHY_ADDR to include/configs/IceCube.h,
  - turned debug print of PHY registers into a function (called in two places)
  - added support for EMK MPC5200 based modules

* Fix MPC8xx PLPRCR_MFD_SHIFT typo

* Add support for TQM866M modules

* Fixes for TQM855M with 4 MB flash (Am29DL163 = _no_ mirror bit flash)

* Fix a few compiler warnings
2004-01-02 14:00:00 +00:00
wdenk a2663ea4fc * Patches by David Müller, 14 Nov 2003:
- board/mpl/common/common_util.c
    * implement support for BZIP2 compressed images
    * various cleanups (printf -> puts, ...)
  - board/mpl/common/flash.c
    * report correct errors to upper layers
    * check the erase fail and VPP low bits in status reg
  - board/mpl/vcma9/cmd_vcma9.c
  - board/mpl/vcma9/flash.c
    * various cleanups (printf -> puts, ...)
  - common/cmd_usb.c
    * fix typo in comment
  - cpu/arm920t/usb_ohci.c
    * support for S3C2410 is missing in #if line
  - drivers/cs8900.c
    * reinit some registers in case of error (cable missing, ...)
  - fs/fat/fat.c
    * support for USB/MMC devices is missing in #if line
  - include/configs/MIP405.h
  - include/configs/PIP405.h
    * enable BZIP2 support
    * enlarge malloc space to 1MiB because of BZIP2 support
  - include/configs/VCMA9.h
    * enable BZIP2 support
    * enlarge malloc space to 1MiB because of BZIP2 support
    * enable USB support
  - lib_arm/armlinux.c
    * change calling convention of ARM Linux kernel as
      described on http://www.arm.linux.org.uk/developer/booting.php

* Patch by Thomas Lange, 14 Nov 2003:
  Split dbau1x00 into dbau1000, dbau1100 and dbau1500 configs to
  support all these AMD boards.

* Patch by Thomas Lange, 14 Nov 2003:
  Workaround for mips au1x00 physical memory accesses (the au1x00
  uses a 36 bit bus internally and cannot access physical memory
  directly. Use the uncached SDRAM address instead of the physical
  one.)
2003-12-07 18:32:37 +00:00
wdenk 42d1f0394b * Patches by Xianghua Xiao, 15 Oct 2003:
- Added Motorola CPU 8540/8560 support (cpu/85xx)
  - Added Motorola MPC8540ADS board support (board/mpc8540ads)
  - Added Motorola MPC8560ADS board support (board/mpc8560ads)

* Minor code cleanup
2003-10-15 23:53:47 +00:00
wdenk f72da3406b Added config option CONFIG_SILENT_CONSOLE. See doc/README.silent
for more information
2003-10-10 10:05:42 +00:00
wdenk 5da627a424 * Patch by Steven Scholz, 10 Oct 2003
- Add support for Altera FPGA ACEX1K

* Patches by Thomas Lange, 09 Oct 2003:
  - Endian swap ATA identity for all big endian CPUs, not just PPC
  - MIPS only: New option CONFIG_MEMSIZE_IN_BYTES for passing memsize
    args to linux
  - add support for dbau1x00 board (MIPS32)
2003-10-09 20:09:04 +00:00
wdenk 27b207fd0a * Implement new mechanism to export U-Boot's functions to standalone
applications: instead of using (PPC-specific) system calls we now
  use a jump table; please see doc/README.standalone for details

* Patch by Dave Westwood, 24 Jul 2003:
  added support for Unity OS (a proprietary OS)
2003-07-24 23:38:38 +00:00
wdenk 8bde7f776c * Code cleanup:
- remove trailing white space, trailing empty lines, C++ comments, etc.
  - split cmd_boot.c (separate cmd_bdinfo.c and cmd_load.c)

* Patches by Kenneth Johansson, 25 Jun 2003:
  - major rework of command structure
    (work done mostly by Michal Cendrowski and Joakim Kristiansen)
2003-06-27 21:31:46 +00:00
wdenk 3e38691e8f * Patch by Arun Dharankar, 4 Apr 2003:
Add IDMA example code (tested on 8260 only)

* Add support for Purple Board (MIPS64 5Kc)

* Add support for MIPS64 5Kc CPUs

* Fix missing setting of "loadaddr" and "bootfile" on ARM and MIPS

* Patch by Denis Peter, 04 Apr 2003:
  - update MIP405-4 board

* Patches by Denis Peter, 03 April 2003:
  - fix PCI IRQs on MPL boards
  - fix two more un-relocated pointer problems

* Fix behaviour of "run" command:
  - print error message iv variable does not exist
  - terminate processing of arguments in case of error

* Patches by Peter Figuli, 10 Mar 2003
  - Add support for BTUART on PXA platform
  - Add support for WEP EP250 (PXA) board

* Fix flash problems on INCA-IP; add tool to allow bruning images  to
  flash using a BDI2000

* Implement fix for I2C Edge Conditions problem for all boards that
  use the bit-banging driver (common/soft_i2c.c)

* Add patches by Robert Schwebel, 31 Mar 2003:
  - csb226 board: bring in sync with innokom/memsetup.S
  - csb226 board: fix MDREFR handling
  - misc doc fixes / extensions
  - innokom board: cleanup, MDREFR fix in memsetup.S, config update
  - add BOOT_PROGRESS to armlinux.c
2003-04-05 00:53:31 +00:00
wdenk c021880ac5 * Add support for MIPS32 4Kc CPUs
* Add support for INCA-IP Board
2003-03-27 12:09:35 +00:00
wdenk 4d75a504d0 Add PCI support for MPC8250 Boards (PM825 module) 2003-03-25 16:50:56 +00:00
wdenk 6069ff2653 * Add support for 16 MB flash configuration of TRAB board
* Patch by Erwin Rol, 27 Feb 2003:
  Add support for RTEMS

* Add image information to README

* Fix dual PCMCIA slot support (when running with just one
  slot populated)

* Add VFD type detection to trab board

* extend drivers/cs8900.c driver to synchronize  ethaddr  environment
  variable with value in the EEPROM

* Start adding MIPS support files
2003-02-28 00:49:47 +00:00