Commit Graph

19230 Commits

Author SHA1 Message Date
Daniel Schwierzeck
4dc7412afa MIPS: start.S: remove obsolete 64 bit handling in setup_c0_status
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2013-02-12 22:22:12 +01:00
Daniel Schwierzeck
97b920dab1 MIPS: xburst: fix broken access to global_data
Fix access to global_data which is broken since commits:

commit 035cbe99cd
Author: Simon Glass <sjg@chromium.org>
Date:   Thu Dec 13 20:49:08 2012 +0000

    mips: Move per_clk and dev_clk to arch_global_data

    Move these field into arch_global_data and tidy up. The other
    CONFIG_JZSOC fields are used by various architectures, so just remove
    the #ifdef bracketing for these.

    Signed-off-by: Simon Glass <sjg@chromium.org>

commit 582601da2f
Author: Simon Glass <sjg@chromium.org>
Date:   Thu Dec 13 20:48:35 2012 +0000

    arm: Move lastinc to arch_global_data

    Move this field into arch_global_data and tidy up.

    Signed-off-by: Simon Glass <sjg@chromium.org>

commit 66ee692347
Author: Simon Glass <sjg@chromium.org>
Date:   Thu Dec 13 20:48:34 2012 +0000

    arm: Move tbl to arch_global_data

    Move this field into arch_global_data and tidy up.

    Signed-off-by: Simon Glass <sjg@chromium.org>

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: Xiangfu Liu <xiangfu@openmobilefree.net>
2013-02-12 22:22:12 +01:00
Gerald Van Baren
58864ddc72 Clean up libfdt.h includes
The libfdt.h file is the definition file for libfdt.  It is unnecessary
to include other fdt header files (the necessary ones are pulled in
by libfdt.h).

Signed-off-by: Gerald Van Baren <gvb@unssw.com>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Stefan Roese <sr@denx.de>
2013-02-08 22:32:38 -05:00
Kim Phillips
8aa5ec6e16 common/fdt_support.c: sparse fixes
trivial:

fdt_support.c:89:64: warning: Using plain integer as NULL pointer
fdt_support.c:325:65: warning: Using plain integer as NULL pointer
fdt_support.c:352:65: warning: Using plain integer as NULL pointer

For the following bad constant expression, We hardcode the max. number of
memory banks to four for the foreseeable future, and add an error with
instructions on what to do once it's exceeded:

fdt_support.c:397:22: error: bad constant expression

For the rest below, sparse found a couple of wrong endian conversions
in of_bus_default_translate() and fdt_get_base_address(), but
otherwise the rest is mostly annotation fixes:

fdt_support.c:64:24: warning: cast to restricted __be32
fdt_support.c:192:21: warning: incorrect type in assignment (different base types)
fdt_support.c:192:21:    expected unsigned int [unsigned] [usertype] tmp
fdt_support.c:192:21:    got restricted __be32 [usertype] <noident>
fdt_support.c:201:21: warning: incorrect type in assignment (different base types)
fdt_support.c:201:21:    expected unsigned int [unsigned] [addressable] [usertype] tmp
fdt_support.c:201:21:    got restricted __be32 [usertype] <noident>
fdt_support.c:304:13: warning: incorrect type in assignment (different base types)
fdt_support.c:304:13:    expected unsigned int [unsigned] [usertype] val
fdt_support.c:304:13:    got restricted __be32 [usertype] <noident>
fdt_support.c:333:13: warning: incorrect type in assignment (different base types)
fdt_support.c:333:13:    expected unsigned int [unsigned] [usertype] val
fdt_support.c:333:13:    got restricted __be32 [usertype] <noident>
fdt_support.c:359:13: warning: incorrect type in assignment (different base types)
fdt_support.c:359:13:    expected unsigned int [unsigned] [usertype] val
fdt_support.c:359:13:    got restricted __be32 [usertype] <noident>
fdt_support.c:373:21: warning: cast to restricted __be32
fdt_support.c:963:48: warning: incorrect type in argument 1 (different base types)
fdt_support.c:963:48:    expected restricted __be32 const [usertype] *p
fdt_support.c:963:48:    got unsigned int [usertype] *<noident>
fdt_support.c:971:48: warning: incorrect type in argument 1 (different base types)
fdt_support.c:971:48:    expected restricted __be32 const [usertype] *p
fdt_support.c:971:48:    got unsigned int [usertype] *<noident>
fdt_support.c:984:29: warning: incorrect type in argument 1 (different base types)
fdt_support.c:984:29:    expected restricted __be32 const [usertype] *cell
fdt_support.c:984:29:    got unsigned int [usertype] *addr
fdt_support.c:996:32: warning: incorrect type in argument 1 (different base types)
fdt_support.c:996:32:    expected restricted __be32 const [usertype] *cell
fdt_support.c:996:32:    got unsigned int [usertype] *addr
fdt_support.c:1041:41: warning: incorrect type in argument 1 (different base types)
fdt_support.c:1041:41:    expected restricted __be32 const [usertype] *cell
fdt_support.c:1041:41:    got unsigned int [usertype] *addr
fdt_support.c:1053:41: warning: incorrect type in argument 2 (different base types)
fdt_support.c:1053:41:    expected restricted __be32 const [usertype] *range
fdt_support.c:1053:41:    got unsigned int const [usertype] *[assigned] ranges
fdt_support.c:1064:53: warning: incorrect type in argument 2 (different base types)
fdt_support.c:1064:53:    expected restricted __be32 const [usertype] *addr
fdt_support.c:1064:53:    got unsigned int [usertype] *addr
fdt_support.c:1110:50: warning: incorrect type in argument 2 (different base types)
fdt_support.c:1110:50:    expected restricted __be32 const [usertype] *addr
fdt_support.c:1110:50:    got unsigned int *<noident>
fdt_support.c:1121:49: warning: incorrect type in argument 1 (different base types)
fdt_support.c:1121:49:    expected restricted __be32 const [usertype] *cell
fdt_support.c:1121:49:    got unsigned int *<noident>
fdt_support.c:1147:60: warning: incorrect type in argument 2 (different base types)
fdt_support.c:1147:60:    expected restricted __be32 const [usertype] *addr
fdt_support.c:1147:60:    got unsigned int *<noident>
fdt_support.c:1081:5: warning: symbol '__of_translate_address' was not declared. Should it be static?
fdt_support.c:1154:5: error: symbol 'fdt_translate_address' redeclared with different type (originally declared at include/fdt_support.h:95) - incompatible argument 3 (different base types)
fdt_support.c: In function 'fdt_node_offset_by_compat_reg':
fdt_support.c:1173:17: warning: initialization discards 'const' qualifier from pointer target type [enabled by default]

See also linux kernel commit 0131d897 "of/address: use proper
endianess in get_flags".

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Cc: Jerry Van Baren <gvb.uboot@gmail.com>
2013-02-07 20:38:55 -05:00
Kim Phillips
b2ba62a1aa libfdt: update from upstream dtc commit 142419e
commit 142419e "dtc/libfdt: sparse fixes", for u-boot's libfdt copy.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Cc: Jerry Van Baren <gvb.uboot@gmail.com>
2013-02-07 20:38:55 -05:00
Kim Phillips
71bbb3df90 libfdt: update fdt.h from upstream dtc
upstream dtc commit feafcd972cb744750a65728440c99526e6199a6d
"dtc/libfdt: introduce fdt types for annotation by endian checkers".

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Cc: Jerry Van Baren <gvb.uboot@gmail.com>
2013-02-07 20:38:55 -05:00
Kim Phillips
25aca0fbb5 libfdt_env.h: add fdt type definitions
fdt types are big endian.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Cc: Jerry Van Baren <gvb.uboot@gmail.com>
2013-02-07 20:38:55 -05:00
Kim Phillips
12e06fe03f treewide: include libfdt_env.h before fdt.h
and, if including libfdt.h which includes libfdt_env.h in
the correct order, don't include fdt.h before libfdt.h.

this is needed to get the fdt type definitions set from
the project environment before fdt.h uses them.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Cc: Jerry Van Baren <gvb.uboot@gmail.com>
2013-02-07 20:38:55 -05:00
Allen Martin
6487d88aaa fdt: fix dts preprocessor options
Using "-ansi" preprocessor option will cause dts lines that begin with
'#' to choke the preprocessor.  Change to "-x assembler-with-cpp"
instead which is what the kernel uses to preprocess dts files.

Signed-off-by: Allen Martin <amartin@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
2013-02-07 20:38:51 -05:00
Jagannadha Sutradharudu Teki
d62ef5619c sf: stmicro: Add support for N25Q256A
Add support for Numonyx N25Q256A SPI flash.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2013-02-06 10:10:00 -05:00
Jagannadha Sutradharudu Teki
b1431dac32 sf: stmicro: Add support for N25Q32A
Add support for Numonyx N25Q32A SPI flash.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2013-02-06 10:10:00 -05:00
Jagannadha Sutradharudu Teki
c75c92122f sf: stmicro: Add support for N25Q32
Add support for Numonyx N25Q32 SPI flash.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2013-02-06 10:10:00 -05:00
Jagannadha Sutradharudu Teki
f785fcb631 sf: stmicro: Add support for N25Q64A
Add support for Numonyx N25Q64A SPI flash.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2013-02-06 10:10:00 -05:00
Jagannadha Sutradharudu Teki
5818a09d70 sf: winbond: Add W25Q64W
Add support for Winbond's W25Q64W SPI flash.
This device is used on xilinx zynq emulation platform.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2013-02-06 10:10:00 -05:00
Jagannadha Sutradharudu Teki
4e994c168f sf: spansion: Correct the first byte of idcode1 for S25FL256S part
This patch corrected the first byte of idcode1 for S25FL256S SPI flash.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2013-02-06 10:10:00 -05:00
Tom Rini
6e787b7234 Merge branch 'master' of git://git.denx.de/u-boot-x86 2013-02-04 17:50:11 -05:00
Tom Rini
2d795c9621 Merge branch 'master' of git://www.denx.de/git/u-boot-microblaze 2013-02-04 09:14:22 -05:00
Michal Simek
10ec0f8a74 serial: arm_dcc: Fix compilation warning and remove unneeded initialization
- arm_dcc_dev is already initialized.
- Remove unused rc variable
Warning log:
arm_dcc.c: In function 'drv_arm_dcc_init':
arm_dcc.c:145:6: warning: unused variable 'rc' [-Wunused-variable]

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Marek Vasut <marex@denx.de>
2013-02-04 09:14:21 -05:00
Michal Simek
e70fb539a6 serial: arm_dcc: Remove CONFIG_ARM_DCC_MULTI option
CONFIG_ARM_DCC_MULTI should be also removed in the patch
"serial: Remove CONFIG_SERIAL_MULTI from serial drivers"
(sha1: a382725060)
Because the driver defines serial_* functions
which cause conflict with serial.c (multiple definition of serial_*)

Removing CONFIG_SERIAL_MULTI function also require to define
default_serial_console for cases where another serial driver
is not available in the system.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Marek Vasut <marex@denx.de>
2013-02-04 09:14:21 -05:00
Jagannadha Sutradharudu Teki
3981d02e0b sf: stmicro: add support for N25Q064
Add support for Numonyx N25Q064 SPI flash.

Signed-off-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
2013-02-04 09:14:21 -05:00
Richard Genoud
34765e8853 cmd_time: merge run_command_and_time_it with cmd_process
As far as every arch has a get_timer function,
run_command_and_time_it code can now disappear.

Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
Acked-By: Che-Liang Chiou <clchiou@chromium.org>
[trini: s/ulong/unsigned long/ in command.h portion]
Signed-off-by: Tom Rini <trini@ti.com>
2013-02-04 09:14:02 -05:00
Jim Lin
b2f3e0ea3e console: USB: KBD: Fix incorrect autoboot timeout
Autoboot timeout defined by CONFIG_BOOTDELAY will not be accurate if
CONFIG_USB_KEYBOARD and CONFIG_SYS_USB_EVENT_POLL are defined in
configuration file and when tstc() function for checking key pressed
takes longer time than 10 ms (e.g., 50 ms) to finish.

Signed-off-by: Jim Lin <jilin@nvidia.com>
2013-02-04 09:07:21 -05:00
Jeroen Hofstee
3fd1e85aaa board sc3: fix warning about nested comment
cc: Heiko Schocher <hs@denx.de>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
2013-02-04 09:07:21 -05:00
Fabio Estevam
b56540801f common: env_mmc: Use __weak annotation to simplify code
Using the __weak annotation can make the code cleaner.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Marek Vasut <marex@denx.de>
2013-02-04 09:07:21 -05:00
Gabor Juhos
0f3073433c common/cmd_bootm.c: prevent running of subcommands before 'bootm start'
The execution order of the bootm subcommands is fixed.
Although here is a sanity check in the state machine
which should prevent running the subcommands in wrong
order but it does not catch all possible errors.

It is possible to run any subcommand without running
'bootm start' first which leads to unexpected behaviour.
For example, running 'bootm loados' without 'bootm start'
causes a hang:

    U-Boot> bootm loados
       XIP Invalid Image ... OK
    OK

Add a sanity check to 'do_bootm_subcommand' in order
to ensure that no subcommands can be executed before
'bootm start'.

After the patch running of any subcommand without running
'bootm start' will cause an error like this:

    U-Boot> bootm loados
    Trying to execute a command out of order
    bootm - boot application image from memory

    Usage:
    bootm [addr [arg ...]]
        - boot application image stored in memory
    ...

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
2013-02-04 09:07:21 -05:00
Alexey Brodkin
ac1048ae1c drivers/block/systemace - fixed data type in "systemace_read" to match prototype in "block_dev_desc_t"
Currently we have "unsigned long blkcnt" which is fine with
CONFIG_SYS_64BIT_LBA undefined because "lbaint_t" is basically the same
"unsigned long".
If CONFIG_SYS_64BIT_LBA gets defined "lbaint_t" is defined as "unsigned
long long".

Even though not many embedded systems have CONFIG_SYS_64BIT_LBA defined
it's good to have types in function implementation that match exactly
with prototypes.

Signed-off-by: Alexey Brodkin <alexey.brodkin@gmail.com>
2013-02-04 09:07:20 -05:00
Richard Genoud
cb940c7ede FAT: remove ifdefs to make the code more readable
ifdefs in the code are making it harder to read.
The use of simple if(vfat_enabled) makes no more code and is cleaner.
(the code is discarded by the compiler instead of the preprocessor.)
NB: if -O0 is used, the code won't be discarded

and bonus, now the code compiles even if CONFIG_SUPPORT_VFAT is not
defined.

Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
2013-02-04 09:05:47 -05:00
Richard Genoud
fb7e16cc1c FAT: use toupper/tolower instead of recoding them
toupper/tolower function are already declared, so use them.

Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Stefano Babic <sbabic@denx.de>
2013-02-04 09:05:46 -05:00
Ashok
c7db645a6b configs:Remove unused macro CONFIG_DISCOVER_PHY
Remove unused macro CONFIG_DISCOVER_PHY from configs.

Signed-off-by: Ashok Kumar Reddy <ashokkourla2000@gmail.com>
Acked-by: Stefano Babic <sbabic@denx.de>
2013-02-04 09:05:46 -05:00
Simon Glass
43cff66e03 x86: Use generic global_data
Move x86 over to use generic global_data.

Signed-off-by: Simon Glass <sjg@chromium.org>
2013-02-04 09:05:46 -05:00
Simon Glass
1e5f8bd0bc sparc: Use generic global_data
Move sparc over to use generic global_data.

Signed-off-by: Simon Glass <sjg@chromium.org>
2013-02-04 09:05:46 -05:00
Simon Glass
a987902753 sh: Use generic global_data
Move sh over to use generic global_data.

Signed-off-by: Simon Glass <sjg@chromium.org>
2013-02-04 09:05:46 -05:00
Simon Glass
07d59bb243 sandbox: Use generic global_data
Move sandbox over to use generic global_data.

Signed-off-by: Simon Glass <sjg@chromium.org>
2013-02-04 09:05:46 -05:00
Simon Glass
2ab575e05d powerpc: Use generic global_data
Move powerpc over to use generic global_data.

Signed-off-by: Simon Glass <sjg@chromium.org>
2013-02-04 09:05:46 -05:00
Simon Glass
6f8b28520d openrisc: Use generic global_data
Move openrisc over to use generic global_data.

Signed-off-by: Simon Glass <sjg@chromium.org>
2013-02-04 09:05:46 -05:00
Simon Glass
1f7559ec38 nios2: Use generic global_data
Move nios2 over to use generic global_data.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Thomas Chou <thomas@wytron.com.tw>
2013-02-04 09:05:46 -05:00
Simon Glass
ee22c1a214 nds32: Use generic global_data
Move nds32 over to use generic global_data.

Signed-off-by: Simon Glass <sjg@chromium.org>
2013-02-04 09:05:46 -05:00
Simon Glass
9572202026 mips: Use generic global_data
Move mips over to use generic global_data.

Signed-off-by: Simon Glass <sjg@chromium.org>
2013-02-04 09:05:45 -05:00
Simon Glass
eef5415036 microblaze: Use generic global_data
Move microblaze over to use generic global_data.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Michal Simek <monstr@monstr.eu>
2013-02-04 09:05:45 -05:00
Simon Glass
e56b250735 m68k: Use generic global_data
Move m68k over to use generic global_data.

Signed-off-by: Simon Glass <sjg@chromium.org>
2013-02-04 09:05:45 -05:00
Simon Glass
06b507b85c blackfin: Use generic global_data
Move blackfin over to use generic global_data.

Signed-off-by: Simon Glass <sjg@chromium.org>
2013-02-04 09:05:45 -05:00
Simon Glass
47a9789f25 avr32: Use generic global_data
Move avr32 over to use generic global_data.

Signed-off-by: Simon Glass <sjg@chromium.org>
2013-02-04 09:05:45 -05:00
Simon Glass
baa1e53683 arm: Use generic global_data
Signed-off-by: Simon Glass <sjg@chromium.org>
2013-02-04 09:05:45 -05:00
Simon Glass
c8fcd0f279 Only use fb_base if we have a display
The ideal of having a frame buffer when there isn't a display is not
that useful. Change the bdinfo command to expect this only when we
have an lcd or video display.

Signed-off-by: Simon Glass <sjg@chromium.org>
2013-02-04 09:05:45 -05:00
Simon Glass
50b1fa3996 Add generic global_data
Add a generic global_data structure which all archs will eventually
use.

Signed-off-by: Simon Glass <sjg@chromium.org>
2013-02-04 09:05:45 -05:00
Simon Glass
8ee666a76f sandbox: Move ram_buf to arch_global_data
Move this field into arch_global_data and tidy up.

Signed-off-by: Simon Glass <sjg@chromium.org>
2013-02-04 09:05:45 -05:00
Simon Glass
3d0f8c8f80 avr32: Move cpu_hz to arch_global_data
Move this field into arch_global_data and tidy up.

Signed-off-by: Simon Glass <sjg@chromium.org>
2013-02-04 09:05:45 -05:00
Simon Glass
1c865d5897 avr32: Move stack_end to arch_global_data
Move this field into arch_global_data and tidy up.

Signed-off-by: Simon Glass <sjg@chromium.org>
2013-02-04 09:05:44 -05:00
Simon Glass
035cbe99cd mips: Move per_clk and dev_clk to arch_global_data
Move these field into arch_global_data and tidy up. The other
CONFIG_JZSOC fields are used by various architectures, so just remove
the #ifdef bracketing for these.

Signed-off-by: Simon Glass <sjg@chromium.org>
2013-02-04 09:05:44 -05:00
Simon Glass
7e2592fd5a m68k: Move CONFIG_EXTRA_CLOCK to arch_global_data
Move inp_clk, vco_clk and flb_clk into arch_global_data and tidy up.

Signed-off-by: Simon Glass <sjg@chromium.org>
2013-02-04 09:05:44 -05:00