Commit Graph

6811 Commits

Author SHA1 Message Date
Stefan Roese c034075a71 serial: Add vcth UART driver
This patch adds the UART driver for the upcoming VCTH board support.

Signed-off-by: Stefan Roese <sr@denx.de>
2008-12-10 00:28:47 +01:00
Ilya Yanok 142a80ffc3 jffs2: cache data_crc results
As we moved data_crc() invocation from jffs2_1pass_build_lists() to
jffs2_1pass_read_inode() data_crc is going to be calculated on each
inode access. This patch adds caching of data_crc() results. There
is no significant improvement in speed (because of flash access
caching added in previous patch I think, crc in RAM is really fast)
but this patch impacts memory usage -- every b_node structure uses
12 bytes instead of 8.

Signed-off-by: Alexey Neyman <avn@emcraft.com>
Signed-off-by: Ilya Yanok <yanok@emcraft.com>
2008-12-09 23:40:01 +01:00
Ilya Yanok 9b7076229e jffs2: summary support
This patch adds support for reading fs information from summary
node instead of scanning full eraseblock.

Signed-off-by: Ilya Yanok <yanok@emcraft.com>
2008-12-09 23:39:59 +01:00
Ilya Yanok 70741004dc jffs2: add buffer to cache flash accesses
With this patch JFFS2 code allocates memory buffer of max_totlen size
(size of the largest node, calculated during scan time) and uses it to
store entire node. Speeds up loading. If malloc fails we use old ways
to do things.

Signed-off-by: Alexey Neyman <avn@emcraft.com>
Signed-off-by: Ilya Yanok <yanok@emcraft.com>
2008-12-09 23:39:58 +01:00
Ilya Yanok 8a36d31f72 jffs2: rewrite jffs2 scanning code based on Linux one
Rewrites jffs2_1pass_build_lists() function in style of Linux's
jffs2_scan_medium() and jffs2_scan_eraseblock().
This includes:
 - Caching flash acceses
 - Smart dealing with free space

Signed-off-by: Alexey Neyman <avn@emcraft.com>
Signed-off-by: Ilya Yanok <yanok@emcraft.com>
2008-12-09 23:39:16 +01:00
Ilya Yanok e0b5532579 jffs2: add sector_size field to part_info structure
This patch adds sector_size field to part_info structure (used
by new JFFS2 code).

Signed-off-by: Ilya Yanok <yanok@emcraft.com>
2008-12-09 23:38:46 +01:00
Ilya Yanok f738469567 jffs2: fix searching for latest version in jffs2_1pass_list_inodes()
We need to update i_version inside cycle to find really latest version
inside jffs2_1pass_list_inodes(). With that fixed we can use isize inside
dump_inode() instead of calling expensive jffs2_1pass_read_inode().

Signed-off-by: Alexey Neyman <avn@emcraft.com>
Signed-off-by: Ilya Yanok <yanok@emcraft.com>
2008-12-09 23:38:21 +01:00
Wolfgang Denk 1113cb764b evb64260: fix "cast to pointer from integer of different size" warnings
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-12-09 23:13:51 +01:00
Wolfgang Denk f68a0c9149 Merge branch 'master' of /home/wd/git/u-boot/custodians 2008-12-09 22:30:22 +01:00
Wolfgang Denk 695a5f339a Merge branch 'master' of git://git.denx.de/u-boot-usb 2008-12-09 22:30:11 +01:00
Stefan Althoefer d277682731 USB: descriptor handling
Hi,

I found a bug when working with the u-boot USB subsystem on IXP425 processor
(big endian Xscale aka ARMv5).
I recognized that the second usb_endpoint_descriptor of the attached memory
stick was corrupted.

The reason for this are the packed structures below (either u-boot and
u-boot-usb):

--------------
/* Endpoint descriptor */
struct usb_endpoint_descriptor {
	unsigned char  bLength;
	unsigned char  bDescriptorType;
	unsigned char  bEndpointAddress;
	unsigned char  bmAttributes;
	unsigned short wMaxPacketSize;
	unsigned char  bInterval;
	unsigned char  bRefresh;
	unsigned char  bSynchAddress;

} __attribute__ ((packed));
/* Interface descriptor */
struct usb_interface_descriptor {
	unsigned char  bLength;
	unsigned char  bDescriptorType;
	unsigned char  bInterfaceNumber;
	unsigned char  bAlternateSetting;
	unsigned char  bNumEndpoints;
	unsigned char  bInterfaceClass;
	unsigned char  bInterfaceSubClass;
	unsigned char  bInterfaceProtocol;
	unsigned char  iInterface;

	unsigned char  no_of_ep;
	unsigned char  num_altsetting;
	unsigned char  act_altsetting;
	struct usb_endpoint_descriptor ep_desc[USB_MAXENDPOINTS];
} __attribute__ ((packed));
------------

As usb_endpoint_descriptor is only 7byte in length, the start of all
odd ep_desc[] structures is not word aligned. This makes wMaxPacketSize
of these structures also not word aligned.

ARMv5 Architecture however does not support non-aligned multibyte
data type (see A2.8 of ARM Architecture Reference Manual).

Signed-off-by: Stefan Althoefer <stefan.althoefer@web.de>
Signed-off-by: Remy Böhmer <linux@bohmer.net>
2008-12-09 21:26:45 +01:00
Wolfgang Denk d5e710a397 Merge branch 'master' of /home/wd/git/u-boot/custodians 2008-12-09 21:16:38 +01:00
Kumar Gala 4c253fdb2a drivers/fsl_pci_init: Fix compile warning
fsl_pci_init.c: In function 'fsl_pci_setup_inbound_windows':
fsl_pci_init.c:122: warning: comparison is always true due to limited range of data type

The check only makes sense if we are CONFIG_PHYS_64BIT

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-12-09 21:15:03 +01:00
Jean-Christophe PLAGNIOL-VILLARD dedacc18a8 usbtty/omap: update to current API
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Remy Böhmer <linux@bohmer.net>
2008-12-09 21:12:41 +01:00
Anatolij Gustschin ee2e9ba917 video: fix FADS823 and RRvision compiling issues
Since commit 561858ee building for FADS823 and RRvision
doesn't work. Let's include version.h and timestamp.h
unconditionally to fix the problem.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
2008-12-09 17:52:05 +01:00
Stefan Roese 2d2e05727f UBI: Fix size parsing in "ubi create"
Signed-off-by: Stefan Roese <sr@denx.de>
2008-12-09 10:07:41 +01:00
Stefan Roese 2ee951ba2a UBI: Enable re-initializing of the "ubi part" command
With this patch now, the user can call "ubi part" multiple times to
re-connect the UBI device to another MTD partition.

Signed-off-by: Stefan Roese <sr@denx.de>
2008-12-09 10:07:36 +01:00
Stefan Roese 9def12cae3 MTD: Fix problem based on non-working relocation (list head mtd_partitions)
Don't use LIST_HEAD() but initialize the struct via INIT_LIST_HEAD() upon
first call of add_mtd_partitions(). Otherwise this won't work on platforms
where the relocation is broken (like MIPS or PPC).

Signed-off-by: Stefan Roese <sr@denx.de>
2008-12-09 10:07:23 +01:00
Wolfgang Denk 13d36ec849 Merge branch 'master' of git://git.denx.de/u-boot-at91 2008-12-09 01:06:14 +01:00
Wolfgang Denk c645b181a9 Merge branch 'master' of git://git.denx.de/u-boot-net 2008-12-09 01:00:24 +01:00
Trent Piepho 5e3ab68e9a Section name should be ".data", not "data"
Signed-off-by: Trent Piepho <tpiepho@freescale.com>
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-12-09 00:48:41 +01:00
Wolfgang Denk 7fa6a2f3b6 MAKEALL: Automatically use parallel builds
Add logic to the MAKEALL script to determine the number of CPU cores
on the system, and run a parallel build if there is more than one.
Usually this significantrly accelerates builds.

Allow to manually adjust the number of parallel make jobs by using
the "BUILD_NCPUS" environment variable.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-12-09 00:39:08 +01:00
Wolfgang Denk 268405fa7c vxworks.h: Fix build problem introduced by commits 29a4c24d/e9084b23
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-12-09 00:24:30 +01:00
Jean-Christophe PLAGNIOL-VILLARD 153176a941 avr32/bootm: remove unused variable 'ret'
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2008-12-08 23:23:31 +01:00
Peter Tyser 434c51a5e6 Remove unneeded CONFIG_SHELL references
Make should be using the bash shell by default which makes
CONFIG_SHELL unnecessary

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2008-12-08 23:18:23 +01:00
Peter Tyser cf7a7b9979 Use bash for default GNU Make shell application
Some Make script commands rely on bash-specific features like brace
expansion, so default to bash for the SHELL variable with a fallback
to the standard sh shell

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2008-12-08 23:11:15 +01:00
Heiko Schocher 4b53001876 jffs2: rename devices_init () in common/jffs2.c
rename devices_init () in common/jffs2.c to
jffs2_devices_init (), because there is also a
devices_init () in common/devices.c.

Signed-off-by: Heiko Schocher <hs@denx.de>
2008-12-08 22:39:40 +01:00
Daniel Hellstrom af5eb847a1 SPARC: Fixed compiler error introduced by commit c160a95447
This patch fixes a build error for the SPARC platform. It was
introduced by commit c160a95447.

Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
2008-12-07 01:36:14 +01:00
Gary Jennejohn 4c60259899 mgsuvd add the board-specific part of the HDLC driver
Signed-off-by: Gary Jennejohn <garyj@denx.de>
2008-12-07 01:33:56 +01:00
Gary Jennejohn 534a435966 mgcoge add the board-specific part of the HDLC driver
Signed-off-by: Gary Jennejohn <garyj@denx.de>
2008-12-07 01:33:54 +01:00
Gary Jennejohn 135f553453 keymile add the common parts of the HDLC driver
This implements the ICN protocol used across the backplane and is
needed by all the keymile boards.

Signed-off-by: Gary Jennejohn <garyj@denx.de>
2008-12-07 01:33:52 +01:00
Jean-Christophe PLAGNIOL-VILLARD 1cb82a9207 drivers/bios_emulator: Move conditional compilation to Makefile
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-12-07 01:29:31 +01:00
Richard Retanubun bcdf1d2cf6 common/cmd_ide.c: Corrected endian order printing for compact flash serial number.
Corrected endian order printing for compact flash serial number.

Signed-off-by: Richard Retanubun <RichardRetanubun@RuggedCom.com>
2008-12-07 01:24:53 +01:00
Gary Jennejohn 16a28ef219 IOMUX: Add console multiplexing support.
Modifications to support console multiplexing.  This is controlled using
CONFIG_SYS_CONSOLE_MUX in the board configuration file.

This allows a user to specify multiple console devices in the environment
with a command like this: setenv stdin serial,nc.  As a result, the user can
enter text on both the serial and netconsole interfaces.

All devices - stdin, stdout and stderr - can be set in this manner.

1) common/iomux.c and include/iomux.h contain the environment setting
implementation.
2) doc/README.iomux contains a somewhat more detailed description.
3) The implementation in (1) is called from common/cmd_nvedit.c to
handle setenv and from common/console.c to handle initialization of
input/output devices at boot time.
4) common/console.c also contains the code needed to poll multiple console
devices for input and send output to all devices registered for output.
5) include/common.h includes iomux.h and common/Makefile generates iomux.o
when CONFIG_SYS_CONSOLE_MUX is set.

Signed-off-by: Gary Jennejohn <garyj@denx.de>
2008-12-07 01:23:35 +01:00
Mike Frysinger 774ce72026 strings: use puts() rather than printf()
When running `strings` on really long strings, the stack tends to get
smashed due to printf().  Switch to puts() instead since we're only passing
the data through.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2008-12-07 01:17:19 +01:00
Niklaus Giger b03150b52e Use new CONFIG_SYS_VXWORKS parameters for Netstal boards
Signed-off-by: Niklaus Giger <niklaus.giger@member.fsf.org>
2008-12-07 00:19:04 +01:00
Niklaus Giger 29a4c24de9 cmd_elf.c: Cleanup bootvx and handle new CONFIG_SYS_VXWORKS parameters
- fix size too small by one in sprintf
- changed old (pre 2004) device name ibmEmac to emac
- boot device may be overriden in board config
- servername may be defined in board config
- additional parameters may be defined in board config
- fixed some line wrappings
- replaced  redundant MAX define by max

Signed-off-by: Niklaus Giger <niklaus.giger@member.fsf.org>
2008-12-07 00:18:53 +01:00
Niklaus Giger e9084b23d1 Add vxworks.h to handle CONFIG_SYS_VXWORKS parameters
Signed-off-by: Niklaus Giger <niklaus.giger@member.fsf.org>
2008-12-07 00:17:35 +01:00
Niklaus Giger 0b2f4ecad4 README: Document CONFIG_SYS parameters for vxworks
Signed-off-by: Niklaus Giger <niklaus.giger@member.fsf.org>
2008-12-07 00:14:56 +01:00
Peter Tyser ace514837c lcd: Let the board code show board-specific info cleanup
remove unneeded version.h from lcd.c

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-12-07 00:08:33 +01:00
Peter Tyser 561858ee7d Update U-Boot's build timestamp on every compile
Use the GNU 'date' command to auto-generate a new U-Boot
timestamp on every compile.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2008-12-06 23:36:43 +01:00
Remy Bohmer 83ad179e2f Remove redundant armv4 flag from arm926ejs compile flags
Currently the arm926ejs tree has the armv4 option set during compilation.
This flag does not belong here because a arm926 CPU is always a armv5 CPU.

Signed-off-by: Remy Bohmer <linux@bohmer.net>
2008-12-06 20:34:12 +01:00
Nicolas Ferre 89a7a87f08 at91: Choose environment variables location within make config target
This patch adds the possiblity to choose the media where the environment will
be located. This allow to choose this fundamental configuration without editing
config files.

Documentation file added.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Stelian Pop <stelian@popies.net>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-12-06 13:11:14 +01:00
Anatolij Gustschin 1450c4a668 lwmon, tqm8xx: Fix build errors
Commit 6b59e03e02
lcd: Let the board code show board-specific info

introduced some bugs which prevent U-Boot building
for lwmon board if CONFIG_LCD_INFO_BELOW_LOGO will
be defined in the board configuration.

Also "LCD enabled" building for TQM823L doesn't work
since this commit.

This patch fixes above-mentioned issues.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
2008-12-06 00:32:58 +01:00
Mike Frysinger bfa0af6b22 ignore .gdb_history files
When using gdb, history files will often get generated.  So ignore them.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2008-12-05 23:16:27 +01:00
Jean-Christophe PLAGNIOL-VILLARD c8aa7dfc18 FPGA: move fpga drivers to drivers/fpga
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-12-05 22:41:33 +01:00
Peter Tyser 6a86bb6c25 net: Fix TftpStart() ip:filename bug
The TftpStart() function modifies the 'BootFile'
string when 'BootFile' contains both an IP address
and filename (eg 1.2.3.4:/path/file). This causes
subsequent calls to TftpStart to incorrectly parse
the TFTP filename and server IP address to use.
For example:

=> tftp 0x100000 10.52.0.62:/home/ptyser/non_existant
Speed: 100, half duplex
Using eTSEC1 device
TFTP from server 10.52.0.62; our IP address is 10.52.253.79
                 ^^^^^^^^^^ CORRECT
Filename '/home/ptyser/non_existant'.
          ^^^^^^^^^^^^^^^^^^^^^^^^^ CORRECT
Load address: 0x100000
Loading: *
TFTP error: 'File not found' (1)
Starting again

eTSEC2: No link.
Speed: 100, half duplex
Using eTSEC1 device
TFTP from server 10.52.0.33; our IP address is 10.52.253.79
                 ^^^^^^^^^^ WRONG
Filename '10.52.0.62'.
          ^^^^^^^^^^ WRONG
Load address: 0x100000
Loading: *
TFTP error: 'File not found' (1)
Starting again

TftpStart() was modified to not modify the 'BootFile' string.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-12-04 22:51:54 -08:00
Peter Tyser d32c5be50b net: Add additional IP fragmentation check
Ignore IP packets which have the "more fragments" flag bit
set.  This flag indicates the IP packet is fragmented and
must be ignored by U-Boot.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-12-04 22:51:54 -08:00
Peter Tyser e0c07b868c net: Define IP flag field values
These defines were pulled from the "Add simple
IP/UDP fragmentation support" patch from Frank
Haverkamp <haver@vnet.ibm.com>.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-12-04 22:51:54 -08:00
Anatolij Gustschin 23afaba65e net: tsec: Fix Marvell 88E1121R phy init
This patch tries to ensure that phy interrupt pin
won't be asserted after booting. We experienced
following issues with current 88E1121R phy init:

Marvell 88E1121R phy can be hardware-configured
to share MDC/MDIO and interrupt pins for both ports
P0 and P1 (e.g. as configured on socrates board).
Port 0 interrupt pin will be shared by both ports
in such configuration. After booting Linux and
configuring eth0 interface, port 0 phy interrupts
are enabled. After rebooting without proper eth0
interface shutdown port 0 phy interrupts remain
enabled so any change on port 0 (link status, etc.)
cause assertion of the interrupt. Now booting Linux
and configuring eth1 interface will cause permanent
phy interrupt storm as the registered phy 1 interrupt
handler doesn't acknowledge phy 0 interrupts. This
of course should be fixed in Linux driver too.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Acked-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-12-04 22:51:54 -08:00