Commit Graph

11117 Commits

Author SHA1 Message Date
Stefan Roese 8a805df136 ppc4xx/fdt/flash: Change fdt_fixup_nor_flash_node() to not rely on cs size
This patch changes the behaviour of the fdt_fixup_nor_flash_node()
function. Now it doesn't patch the size of the "reg" property with the
chip-select size, but with the size returned from the new function
flash_get_bank_size(). This function will return per weak default the
flash size of the bank (bank = chip-select numer) detected by the flash
driver. If this does not fit your needs, this function may be overridden
by a board specific one.

For this the parameters needed to be changed. So I intentionally squashed
the PPC4xx stuff using this routine into this patch. Otherwise it would
not be git-bisectable anymore.

The board specific function for the AMCC/APM Ebony eval board is now
included in this patch version.

Signed-off-by: Stefan Roese <sr@denx.de>
Tested-by: Detlev Zundel <dzu@denx.de>
Cc: Gerald Van Baren <vanbaren@cideas.com>
Cc: Wolfgang Denk <wd@denx.de>
2010-09-23 08:49:49 +02:00
Stefan Roese ab25e880ca ppc4xx: POST UART: Use in/out_8() io-accessor functions
This patch fixes a problem in the PPC4xx POST UART driver. This driver
incorrectly used the in/out8() io-accessor functions. This could lead to
problems since these functions don't guarantee execution ordering. This
patch now replaces these functions with the correct ones.

Additionally the driver is converted to using the NS16550 struct instead
of macros for the register offsets.

And some common code is factored out for better maintainability.

Signed-off-by: Stefan Roese <sr@denx.de>
2010-09-23 08:43:56 +02:00
Stefan Roese 6aa9195dae ppc4xx: Fix CATcenter build
Signed-off-by: Stefan Roese <sr@denx.de>
2010-09-23 08:32:02 +02:00
Wolfgang Denk 2675244fa4 Merge branch 'master' of git://git.denx.de/u-boot-video 2010-09-22 22:37:49 +02:00
Wolfgang Denk e6e1fb3050 Merge branch 'master' of git://git.denx.de/u-boot-blackfin 2010-09-22 22:36:42 +02:00
Wolfgang Denk d1475d8aab Merge branch 'master' of /home/wd/git/u-boot/master 2010-09-22 22:35:44 +02:00
Mike Frysinger 55fed6fd0b Blackfin: bfin_spi: use same gpio cs define as Linux
Linux uses an offset of 8 to switch from hardware cs to a gpio cs,
so have u-boot use the same value.  Also make sure it is public
for boards to access.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-09-21 18:22:14 -04:00
Mike Frysinger 3d7c8cf5ec Blackfin: update some missed board config.mk files
Seems these two files were missed during the big lib shuffle.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-09-21 18:22:14 -04:00
Timur Tabi e69e520f9d fsl: refactor MPC8610 and MPC5121 DIU code to use existing bitmap and logo features
The Freescale MPC8610 and MPC5121 DIU code had re-implement two features that already
existed in U-Boot: bitmap drawing and top-of-screen logo (CONFIG_VIDEO_LOGO).
So delete the 8610-specific code and use the built-in features instead.

Signed-off-by: Timur Tabi <timur@freescale.com>
2010-09-21 22:46:02 +02:00
Timur Tabi 68f6618bcd video: cfb_console: add support for 4bpp bitmaps with GDF_32BIT_X888RGB
Add support for 4bpp bitmaps, currently only for GDF_32BIT_X888RGB
frame buffer format.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
2010-09-21 22:44:59 +02:00
Timur Tabi ef351fe1f7 logos: add Freescale logo
Add the Freescale logo and update the Makefile to build it when building
a Freescale board.

Signed-off-by: Timur Tabi <timur@freescale.com>
2010-09-21 22:44:53 +02:00
Timur Tabi c88777e09f video: cfb_console: fix definition and usage of CURSOR_xxx macros
The CURSOR_ON, CURSOR_OFF, and CURSOR_SET macros are defined incorrectly.  If
cursor support is disabled, then these macros are defined to nothing, but
then they are used like this:

	if (console_col < CONSOLE_COLS)
		CURSOR_OFF
	console_row++;

which was compiled like this:

	if (console_col < CONSOLE_COLS)
		console_row++;

This is obviously not what was intended.

Signed-off-by: Timur Tabi <timur@freescale.com>
Acked-by: Detlev Zundel <dzu@denx.de>
2010-09-21 22:27:43 +02:00
Kim Phillips d70d8ccc20 silence config step commands display during MAKEALL builds
[u-boot next]$ ./MAKEALL 83xx
awk '(NF && $1 !~ /^#/) { print $1 ": " $1 "_config; $(MAKE)" }' boards.cfg > .boards.depend
Configuring for ve8313 board...

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2010-09-21 21:46:49 +02:00
Matthias Weisser b9d74b4810 arm: Make jadecpu board use relocation
This patch modifies jadecpu board so that it is usable
with the relocation patches by Heiko Schocher

Signed-off-by: Matthias Weisser <weisserm@arcor.de>
2010-09-21 21:42:01 +02:00
Michael Zaidman 800eb09641 POST cleanup.
- Revives POST for blackfin arch;
- Removes redundant code:
     arch/blackfin/lib/post.c
     arch/powerpc/cpu/ppc4xx/commproc.c
     arch/powerpc/cpu/mpc512x/common.c
- fixes up the post_word_{load|store} usage.

Signed-off-by: Michael Zaidman <michael.zaidman@gmail.com>
Acked-by: Detlev Zundel <dzu@denx.de>
Tested-by: Anatolij Gustschin <agust@denx.de>

List of the maintainers of the affected by patch boards:
Cc: Stephan Linz <linz@li-pro.net>
Cc: Denis Peter <d.peter@mpl.ch>
Cc: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
Cc: Peter Tyser <ptyser@xes-inc.com>
Cc: Stefan Roese <sr@denx.de>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: Niklaus Giger <niklaus.giger@netstal.com>
Cc: Larry Johnson <lrj@acm.org>
Cc: Feng Kan <fkan@amcc.com>
2010-09-21 21:39:31 +02:00
Mike Frysinger e2fad3fce9 cmd_mmc: use common usage function
Rather than using a custom "Usage:", use the common cmd_usage() function,
and tail into it now that it returns 1 for us.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-09-21 21:37:08 +02:00
Mike Frysinger 16e66cf194 setlocalversion: add some more fallbacks for git describe
If working out of a custom git tree that lacks annotated tags, the
'git describe' operation spews "fatal: cannot describe" errors all
over the place.  So add some fallback code in case the best naming
was unable to locate something useful.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-09-21 21:33:16 +02:00
Wolfgang Denk 696f6cc9ba Merge branch 'next' of ../custodians into next 2010-09-21 09:34:37 +02:00
Wolfgang Denk 0cc89de8ef Merge branch 'master' of /home/wd/git/u-boot/master 2010-09-21 09:34:16 +02:00
Wolfgang Denk e7eb046a24 Merge branch 'next' of git://git.denx.de/u-boot-usb into next 2010-09-21 09:34:02 +02:00
Wolfgang Denk b65e86d8d8 Merge branch 'next' of ../custodians into next 2010-09-21 09:22:17 +02:00
Vitaly Kuzmichev 6142e0ae0f USB-CDC: Fix coding style issues
Fixes most of checkpatch warnings and errors in USB gadget stack.

The most frequently encountered problems are:
1) "(foo*)", "foo * bar", "foo* bar"
2) C99 // comments
3) No spaces before/after/around '?', ':', '=', '==', ',', '&', '('
4) Spaces before '['
5) Spaces between function names and '('
6) Block braces in wrong places
7) Spaces before tabs
8) Macros with complex values not enclosed in parenthesis
9) Multiline comments start just after /*

Signed-off-by: Vitaly Kuzmichev <vkuzmichev@mvista.com>
2010-09-20 21:57:17 +02:00
Stefano Babic a170f2c797 USB-CDC: called handle_interrupts inside usb_eth_send
The patch removes an endless loop  in the usb_eth_send
if the tx_complete is not called before going
in the loop. The driver interrupt routine is called
allowing the driver to check if the TX is completed.

Signed-off-by: Stefano Babic <sbabic@denx.de>
2010-09-20 21:57:17 +02:00
Stefano Babic 8046077219 USB-CDC: correct wrong alignment in ether.c
The buffer for the status request must be word aligned
because it is accessed with 32 bit pointer in the
eth_status_complete function.

Signed-off-by: Stefano Babic <sbabic@denx.de>
2010-09-20 21:57:17 +02:00
Vitaly Kuzmichev c0ef513188 USB-CDC: change simple_strtol to simple_strtoul
The patch is based on commit bb9496c6f7e853e5d4edd5397c9d45f1968d623c
(done by Julia Lawall <julia@diku.dk>) from linux-2.6.git.

Since num is unsigned, it would seem better to use simple_strtoul that
simple_strtol.

Signed-off-by: Vitaly Kuzmichev <vkuzmichev@mvista.com>
2010-09-20 21:57:17 +02:00
Vitaly Kuzmichev d5292c1647 USB-CDC: ethernet error path potential oops fix
Fix potential oops on rare error path.
The patch is based on commit e7b13ec9235b9fded90f826ceeb8c34548631351
(done by David Brownell <david-b@pacbell.net>) from linux-2.6.git.

Description of the issue taken from linux kernel bugzilla:
(https://bugzilla.kernel.org/show_bug.cgi?id=9594)

The potential error can be tracked down as follows:

(1) line 807: let the second conjunct on the "if" statment be false
    meaning "dev->status_ep" is null. This means the "if" evaluates
    to false.

follow thru the code until...

(2) line 808: usb_ep_disable(dev->status_ep) passes in a null argument,
    however "usb_ep_disable" cannot handle that:

(from include/linux/usb/gadget.h)
191 static inline int
192 usb_ep_disable (struct usb_ep *ep)
193 {
194         return ep->ops->disable (ep);
195 }

--

Signed-off-by: Vitaly Kuzmichev <vkuzmichev@mvista.com>
2010-09-20 21:57:17 +02:00
Vitaly Kuzmichev df559c1d21 USB-CDC: Correct stat_req initialization
Fix possible oops on stat_req->buf initialization and fix ep0 and
status_ep confusion (last one is just intended for stat_req keeping).

Signed-off-by: Vitaly Kuzmichev <vkuzmichev@mvista.com>
Signed-off-by: Stefano Babic <sbabic@denx.de>
2010-09-20 21:57:17 +02:00
Vitaly Kuzmichev 2e12abe654 USB-CDC: Replace 'strcpy' by 'strlcpy'
Replace 'strcpy' by more safe 'strlcpy' that is implemented in ether.c

Signed-off-by: Vitaly Kuzmichev <vkuzmichev@mvista.com>
2010-09-20 21:57:17 +02:00
Vitaly Kuzmichev 0129e327f4 USB-CDC: Correct freeing usb requests
Fix in_ep and out_ep confusion (rx_req was allocated from out_ep, not
from in_ep) and add lost dev->req freeing.

Signed-off-by: Vitaly Kuzmichev <vkuzmichev@mvista.com>
2010-09-20 21:57:17 +02:00
Vitaly Kuzmichev 7de7318591 USB-CDC: Use native debug printout macros
Replace Linux-like debug printout macros by native ones.

Signed-off-by: Vitaly Kuzmichev <vkuzmichev@mvista.com>

Applied after removing dead code like '#define DEBUG/#undef DEBUG'
2010-09-20 21:57:17 +02:00
Vitaly Kuzmichev 2721dbf1dd USB-CDC: Add lost 'qmult' definition
Add lost 'qmult' definition for High Speed devices and make it
configurable through CONFIG_USB_ETH_QMULT.

Signed-off-by: Vitaly Kuzmichev <vkuzmichev@mvista.com>
2010-09-20 21:57:16 +02:00
Vitaly Kuzmichev 7b2f390611 USB-CDC: Restuct USB gadget Makefile
Prohibit simultaneous usage of both old and new gadget stacks and
allow UDC drivers to be dependent on CONFIG_USB_ETHER.

Signed-off-by: Vitaly Kuzmichev <vkuzmichev@mvista.com>
2010-09-20 21:57:16 +02:00
Remy Bohmer 23cd138503 Integrate USB gadget layer and USB CDC driver layer
Derived from Linux kernel 2.6.27

Signed-off-by: Thomas Smits <ts.smits@gmail.com>
Signed-off-by: Remy Bohmer <linux@bohmer.net>
2010-09-20 21:57:16 +02:00
Mike Frysinger 70fccb3f24 usb: musb: stub out MUSB_TXCSR_MODE for Blackfin parts
The MUSB_TXCSR_MODE register setting isn't supported on Blackfin musb
parts, so stub it out to 0.  This matches Linux behavior.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-09-20 21:56:42 +02:00
Stefan Roese 3c29975e94 cfi_flash: Remove uneccessary #ifdef CONFIG_SYS_MAX_FLASH_BANKS_DETECT
Now that the defines are moved to header files we don't need this
conditional compilation any more. Remove it.

Signed-off-by: Stefan Roese <sr@denx.de>
2010-09-20 15:09:00 +02:00
Stefan Roese ca5def3f30 cfi_flash: Simplify dynamic flash bank number detection
This patch simplifies the use of CONFIG_SYS_MAX_FLASH_BANKS_DETECT. By
moving these optional variables and defines into the common code, board
specific code is minimized. Currently only the following board use
this feature:

APC405, IDS8247, TQM834x

And IDS8247 doesn't seem to really need this feature, since its not
updating the bank number variable at all. So this patch removes the
definition of CONFIG_SYS_MAX_FLASH_BANKS_DETECT from this board port.

This new framework will be used by the upcoming lwmon5 update as well.

Signed-off-by: Stefan Roese <sr@denx.de>
Acked-by: Heiko Schocher <hs@denx.de>
Cc: Matthias Fuchs <matthias.fuchs@esd.eu>
2010-09-20 15:08:51 +02:00
Stefan Roese b00e19cc6b cfi_flash: Add weak default for cfi_flash_bank_addr()
cfi_flash_bank_addr(int bank_nr) returns the base addresses of the
requested bank. Introducing this weak default enables boards to override
this functions with a board specific version when required.

This feature will be used in the lwmon5 board update, supporting runtime
detection of 2 board revisions with different flash layouts.

Signed-off-by: Stefan Roese <sr@denx.de>
2010-09-20 15:08:43 +02:00
Stefan Roese cba34aafde cfi_flash: Simplify flash_get_info()
This patch removes an unecessary check in the return statement. This is
not needed, since "info" is initializes to NULL. And "info" will not be
written to again, if the flash address is not found.

Additionally "info" is not initialized to "0" but to "NULL".

Signed-off-by: Stefan Roese <sr@denx.de>
2010-09-20 15:08:33 +02:00
Wolfgang Denk 69434e4c94 Remove spieval board support
Recent changes caused that the spieval board now is included in the
boards built by MAKEALL, which revealed that compilation for this
board has been broken for a long time:

mpc5xxx_fec.c:899:2: error: #error fec->xcv_type not initialized.
mpc5xxx_fec.c:899:2: error: #error fec->xcv_type not initialized.

The board is orphaned.  Drop support for it.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-09-19 21:34:31 +02:00
Wolfgang Denk 9ddc3af8a1 Remove smmaco4 board support
Recent changes caused that the smmaco4 board now is included in the
boards built by MAKEALL, which revealed that compilation for this
board has been broken for a long time:

mpc5xxx_fec.c:899:2: error: #error fec->xcv_type not initialized.

The board is orphaned.  Drop support for it.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-09-19 21:32:37 +02:00
Wolfgang Denk 77efe35fec Remove HMI10 board support
Recent changes caused that the HMI10 board now is included in the
boards built by MAKEALL, which revealed that compilation for this
board has been broken for a long time:

ps2ser.c: In function 'ps2ser_init':
ps2ser.c:155: error: 'UART_LCR' undeclared (first use in this function)
ps2ser.c:155: error: (Each undeclared identifier is reported only once
ps2ser.c:155: error: for each function it appears in.)
ps2ser.c:156: error: 'UART_DLL' undeclared (first use in this function)
ps2ser.c:157: error: 'UART_DLM' undeclared (first use in this function)
ps2ser.c:159: error: 'UART_IER' undeclared (first use in this function)
ps2ser.c:160: error: 'UART_MCR' undeclared (first use in this function)
ps2ser.c:161: error: 'UART_FCR' undeclared (first use in this function)
ps2ser.c:162: error: 'UART_FCR_ENABLE_FIFO' undeclared (first use in this function)
ps2ser.c:166: error: 'UART_LSR' undeclared (first use in this function)
ps2ser.c: In function 'ps2ser_putc':
ps2ser.c:198: error: 'UART_LSR' undeclared (first use in this function)
ps2ser.c:200: error: 'UART_TX' undeclared (first use in this function)
ps2ser.c: In function 'ps2ser_getc_hw':
ps2ser.c:224: error: 'UART_LSR' undeclared (first use in this function)
ps2ser.c:225: error: 'UART_RX' undeclared (first use in this function)
ps2ser.c: In function 'ps2ser_interrupt':
ps2ser.c:293: error: 'UART_IIR' undeclared (first use in this function)

The board is orphaned, and AFAICT has reached EOL.
Drop support for it.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-09-19 21:28:25 +02:00
Wolfgang Denk ff377b1c0e canmb board: Fix compiler warnings
Recent changes caused thatthe aev board now is included in the boards
built by MAKEALL, which revealed that compilation for this board
has been broken for a long time:

canmb.c: In function 'initdram':
canmb.c:109: warning: pointer targets in passing argument 1 of 'get_ram_size' differ in signedness
canmb.c:111: warning: pointer targets in passing argument 1 of 'get_ram_size' differ in signedness
canmb.c:137: warning: pointer targets in passing argument 1 of 'get_ram_size' differ in signedness
canmb.c:140: warning: pointer targets in passing argument 1 of 'get_ram_size' differ in signedness

Fix these.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-09-19 19:29:57 +02:00
Wolfgang Denk 90964353ff aev board: Fix compile problems
Recent changes caused thatthe aev board now is included in the boards
built by MAKEALL, which revealed that compilation for this board has
been broken for a long time:

mpc5xxx_fec.c:899:2: error: #error fec->xcv_type not initialized.
mpc5xxx_fec.c:899:2: error: #error fec->xcv_type not initialized.

Fix it.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-09-19 19:29:57 +02:00
Ben Gardiner 9700375624 da8xx: fixup ARM relocation support
Split the existing dram_init for da8xx when ARM reloc is enabled, like the
changes to arch/arm/cpu/arm926ejs/orion5x/dram.c in
0f234d263b17ccf1b8fd776eb8c15b7cdb27a887 by Heiko Schocher <hs@denx.de>.

Without these changes gd->ram_size is '0' which leads to incorrect relocation
when CONFIG_SYS_ARM_WITHOUT_RELOC is defined and the board does not boot.

We use get_ram_size to dynamically calculate the available RAM because it runs
on different board version with different ram, as suggested by Heiko in private
communication.

Tested on a da850evm with 128M of DDR2 installed; with both
CONFIG_SYS_ARM_WITHOUT_RELOC defined and undefined.

Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Reviewed-by: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
CC: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
CC: Heiko Schocher <hs@denx.de>
2010-09-19 19:29:56 +02:00
Heiko Schocher a51dd67a03 ARM: implement relocation for arm1176
Change the implementation for arm1176 to relocate the code to
an arbitrary address in RAM.

Portions of this work were supported by funding from
the CE Linux Forum.

Signed-off-by: Heiko Schocher <hs@denx.de>
2010-09-19 19:29:56 +02:00
Heiko Schocher abef7b859d ARM: implement relocation for arm720t
Change the implementation for arm720t to relocate the code to
an arbitrary address in RAM.

Portions of this work were supported by funding from
the CE Linux Forum.

Signed-off-by: Heiko Schocher <hs@denx.de>
2010-09-19 19:29:56 +02:00
Heiko Schocher c6c2ceb124 ARM: implement relocation for arm_intcm
Change the implementation for arm_intcm to relocate the code to
an arbitrary address in RAM.

Portions of this work were supported by funding from
the CE Linux Forum.

Signed-off-by: Heiko Schocher <hs@denx.de>
2010-09-19 19:29:56 +02:00
Heiko Schocher ec985e94a2 ARM: implement relocation for lh7a40x
Change the implementation for lh7a40x to relocate the code to
an arbitrary address in RAM.

Portions of this work were supported by funding from
the CE Linux Forum.

Signed-off-by: Heiko Schocher <hs@denx.de>
2010-09-19 19:29:55 +02:00
Heiko Schocher 0110955a79 ARM: implement relocation for s3c44b0
Change the implementation for s3c44b0 to relocate the code to
an arbitrary address in RAM.

Portions of this work were supported by funding from
the CE Linux Forum.

Signed-off-by: Heiko Schocher <hs@denx.de>
2010-09-19 19:29:55 +02:00
Heiko Schocher e30ceca21f ARM: implement relocation for sa1100
Change the implementation for sa1100 to relocate the code to
an arbitrary address in RAM.

Portions of this work were supported by funding from
the CE Linux Forum.

Signed-off-by: Heiko Schocher <hs@denx.de>
2010-09-19 19:29:55 +02:00