]> git.ipfire.org Git - u-boot.git/log
u-boot.git
13 years agomxs: timrot: Rename local macros
Fadil Berisha [Thu, 28 Feb 2013 15:03:26 +0000 (10:03 -0500)] 
mxs: timrot: Rename local macros

Local macros apply to both iMX23 and iMX28. This patch renames local
macros with attribute MX28 to MXS.

Signed-off-by: Fadil Berisha <f.koliqi@gmail.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
13 years agomx23_olinuxino: Add ethernet support
Otavio Salvador [Sat, 2 Mar 2013 05:17:30 +0000 (05:17 +0000)] 
mx23_olinuxino: Add ethernet support

This adds support to the LAN9512 chip included in the board and extend
the environment to easy netboot use.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
13 years agomx23_olinuxino: Enable USB support
Otavio Salvador [Sat, 2 Mar 2013 05:17:29 +0000 (05:17 +0000)] 
mx23_olinuxino: Enable USB support

This enabled USB support for the mx23_olinuxino board.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
13 years agomx23evk: Enable USB support
Otavio Salvador [Sat, 2 Mar 2013 05:17:28 +0000 (05:17 +0000)] 
mx23evk: Enable USB support

This enabled USB support for the mx23evk board.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
13 years agomxs: timrot: Add support to i.MX23
Fadil Berisha [Wed, 27 Feb 2013 17:00:07 +0000 (17:00 +0000)] 
mxs: timrot: Add support to i.MX23

This patch add timer support to i.MX23 and complete bit fields and values
on regs-timrot.h.
Testet on imx23-olinuxino board.

Signed-off-by: Fadil Berisha <f.koliqi@gmail.com>
Acked-by: Marek Vasut <marex@denx.de>
Cc: Marek Vasut <marex@denx.de>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
13 years agomx23_olinuxino: Add support for status LED
Otavio Salvador [Sat, 23 Feb 2013 02:43:09 +0000 (02:43 +0000)] 
mx23_olinuxino: Add support for status LED

This allow user to know if the bootloader is running, even without a
serial console.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
13 years agomxs: Fix iomux.h to not break build during assembly stage
Otavio Salvador [Sat, 23 Feb 2013 02:43:08 +0000 (02:43 +0000)] 
mxs: Fix iomux.h to not break build during assembly stage

This fixes the build failure when included in mx23_olinuxino.h board
config; the addition of "asm/types.h" is due "u32" being otherwise
undefined.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
13 years agoled: Use STATUS_LED_ON and STATUS_LED_OFF when calling __led_set
Otavio Salvador [Sat, 23 Feb 2013 02:43:07 +0000 (02:43 +0000)] 
led: Use STATUS_LED_ON and STATUS_LED_OFF when calling __led_set

This fixes the gpio_led driver which needs to compare againt a
STATUS_LED_ON to enable a led.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
13 years agomx23evk: Adjust DRAM control register to use full 128MB of RAM
Otavio Salvador [Sat, 23 Feb 2013 02:43:06 +0000 (02:43 +0000)] 
mx23evk: Adjust DRAM control register to use full 128MB of RAM

Adjust HW_DRAM_CTL14 to enable the chip selects to allow usage of full
128MB of RAM.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
13 years agomx23: Document the tRAS lockout setting in memory initialization
Otavio Salvador [Sat, 23 Feb 2013 02:43:05 +0000 (02:43 +0000)] 
mx23: Document the tRAS lockout setting in memory initialization

Add a comment about the tRAS lockout setting of HW_DRAM_CTL08 to
enable the 'Fast Auto Pre-Charge' found in the memory chip. The
setting is applied after memory initialization and it is worth
document it.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
13 years agomxs: Rename CONFIG_SPL_MX28_PSWITCH_WAIT to CONFIG_SPL_MXS_PSWITCH_WAIT
Otavio Salvador [Sat, 23 Feb 2013 02:43:04 +0000 (02:43 +0000)] 
mxs: Rename CONFIG_SPL_MX28_PSWITCH_WAIT to CONFIG_SPL_MXS_PSWITCH_WAIT

The power switch option is compatible with i.MX23 and i.MX28 so the
configration option needs to reflect it. We choose
'CONFIG_SPL_MXS_PSWITCH_WAIT' for the option name.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Acked-by: Marek Vasut <marex@denx.de>
13 years agomxs: m28: Enable power to USB port 0
Marek Vasut [Sat, 23 Feb 2013 02:43:03 +0000 (02:43 +0000)] 
mxs: m28: Enable power to USB port 0

The USB port 0 can now be used alongside the USB port 1, thus enable
power to it.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
13 years agomxs: Make ehci-mxs multiport capable
Marek Vasut [Sat, 23 Feb 2013 02:43:02 +0000 (02:43 +0000)] 
mxs: Make ehci-mxs multiport capable

Rework ehci-mxs so it supports both ports on MX28. It was necessary
to wrap the per-port configuration into struct ehci_mxs_port and pull
out the clock configuration function.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
13 years agomxs: Squash the header file usage in ehci-mxs
Marek Vasut [Sat, 23 Feb 2013 02:43:01 +0000 (02:43 +0000)] 
mxs: Squash the header file usage in ehci-mxs

The ehci-mxs driver included the register definitions directly.
Use imx-regs.h instead since it contains proper handling of the
differences between mx23 and mx28.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
13 years agomxs: spi: Remove CONFIG_MXS_SPI_DMA_ENABLE
Marek Vasut [Sat, 23 Feb 2013 02:43:00 +0000 (02:43 +0000)] 
mxs: spi: Remove CONFIG_MXS_SPI_DMA_ENABLE

The CONFIG_MXS_SPI_DMA_ENABLE is no longer relevant as the SPI DMA
has proven to work correctly. Remove this configuration option.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
13 years agomxs: spi: Fix the MXS SPI for mx23
Marek Vasut [Sat, 23 Feb 2013 02:42:59 +0000 (02:42 +0000)] 
mxs: spi: Fix the MXS SPI for mx23

The MX23 has slightly different register layout. Adjust the SPI
driver to match the layout, both the PIO and DMA part.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
13 years agomxs: mmc: spi: dma: Better wrap the MXS differences
Marek Vasut [Sat, 23 Feb 2013 02:42:58 +0000 (02:42 +0000)] 
mxs: mmc: spi: dma: Better wrap the MXS differences

This patch streamlines the differences between the MX23 and MX28 by
implementing a few helper functions to handle different DMA channel
mapping, different clock domain for SSP block and fixes a few minor
bugs.

First of all, the DMA channel mapping is now fixed in dma.h by defining
the actual channel map for both MX23 and MX28. Thus, MX23 now does no
longer use MX28 channel map which was wrong. Also, there is a fix for
MX28 DMA channel map, where the last four channels were incorrect.

Next, because correct DMA channel map is in place, the mxs_dma_init_channel()
call now bases the channel ID starting from SSP port #0. This removes the
need for DMA channel offset being added and cleans up the code. For the
same reason, the SSP0 offset can now be used in mxs_dma_desc_append(), thus
no need to adjust dma channel number in the driver either.

Lastly, the SSP clock ID is now retrieved by calling mxs_ssp_clock_by_bus()
which handles the fact that MX23 has shared SSP clock for both ports, while
MX28 has per-port SSP clock.

Finally, the mxs_ssp_bus_id_valid() pulls out two implementations of the
same functionality from MMC and SPI driver into common code.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
13 years agomxs: Reset the EMI block on mx23
Marek Vasut [Sat, 23 Feb 2013 02:42:57 +0000 (02:42 +0000)] 
mxs: Reset the EMI block on mx23

The real reason for memory instability was the fact that the EMI block
was gated and not reset throughout the boards' operation. This patch
resets the EMI block properly while also reverts the memory voltage bump.
The memory stability issues were caused by the EMI not being reset properly
and thus there is no longer need to run the memory at higher voltage than
it ought to run at.

This partly reverts 8303ed128a55519f19c5f11087032d4bc4e0537a .

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
13 years agoUSB: drop unneeded header in ehci-mx6
Stefano Babic [Sat, 23 Feb 2013 10:07:29 +0000 (11:07 +0100)] 
USB: drop unneeded header in ehci-mx6

Including header for pads is not needed and breaks board
after renaming pin definitions.

Series-to: u-boot
Series-cc: marex@denx.de,fabio.estevam@freescale.com,eric.nelson@boundarydevices.com

Signed-off-by: Stefano Babic <sbabic@denx.de>
13 years agoi.MX6: Add DDR controller registers
Eric Nelson [Tue, 19 Feb 2013 10:07:05 +0000 (10:07 +0000)] 
i.MX6: Add DDR controller registers

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
13 years agoi.MX6DL: define IOMUX pads NANDF_CS1-3 for use as GPIO
Eric Nelson [Tue, 19 Feb 2013 10:07:04 +0000 (10:07 +0000)] 
i.MX6DL: define IOMUX pads NANDF_CS1-3 for use as GPIO

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
13 years agoi.MX6: crm_regs: define IOMUXC_GPR4/6/7
Eric Nelson [Tue, 19 Feb 2013 10:07:03 +0000 (10:07 +0000)] 
i.MX6: crm_regs: define IOMUXC_GPR4/6/7

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
13 years agoi.MX6: crm_regs: define CCM_CCGRx for use in board config files
Eric Nelson [Tue, 19 Feb 2013 10:07:02 +0000 (10:07 +0000)] 
i.MX6: crm_regs: define CCM_CCGRx for use in board config files

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
13 years agoi.MX6: consolidate pad names for multi-CPU boards
Eric Nelson [Tue, 19 Feb 2013 10:07:01 +0000 (10:07 +0000)] 
i.MX6: consolidate pad names for multi-CPU boards

Rename all i.MX6 pad declarations to MX6_PAD_x, so a board
may support either i.MX6Quad/Dual (MX6Q) or i.MX6Dual-Lite/Solo
(MX6DL) by including the proper header.

Boards mx6qarm2, mx6qsabreauto, mx6qsabrelite, and mx6qsabresd
only support MX6Q, so they include mx6q_pins.h.

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
13 years agoi.MX6: mx6qsabrelite: indent with tabs
Eric Nelson [Tue, 19 Feb 2013 10:07:00 +0000 (10:07 +0000)] 
i.MX6: mx6qsabrelite: indent with tabs

This patch has no functional changes and simply replaces
leading spaces with tabs.

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
13 years agoMerge branch 'master' of git://git.denx.de/u-boot-arm
Stefano Babic [Tue, 5 Mar 2013 13:37:31 +0000 (14:37 +0100)] 
Merge branch 'master' of git://git.denx.de/u-boot-arm

13 years agox86: Enable CONFIG_OF_CONTROL on coreboot
Simon Glass [Thu, 28 Feb 2013 19:26:18 +0000 (19:26 +0000)] 
x86: Enable CONFIG_OF_CONTROL on coreboot

Make use of a device tree on coreboot boards, and set the default
to link.

Signed-off-by: Simon Glass <sjg@chromium.org>
13 years agox86: Adjust link device tree include file
Simon Glass [Thu, 28 Feb 2013 19:26:17 +0000 (19:26 +0000)] 
x86: Adjust link device tree include file

This is currently set to coreboot.dtsi, but we cannot support this on
old device tree compilers (dtc <= 1.3), so adjust to use ARCH_CPU_DTS
to let the Makefile preprocessor sort this out.

Signed-off-by: Simon Glass <sjg@chromium.org>
13 years agox86: Add error checking to x86 relocation code
Simon Glass [Thu, 28 Feb 2013 19:26:16 +0000 (19:26 +0000)] 
x86: Add error checking to x86 relocation code

This does not actually change normal behaviour, but adds a check that
should detect corruption of relocation data (e.g. by using BSS data
prior to relocation).

Also add additional debugging output when enabled.

During this investigation, two situations have been seen:
1. calculate_relocation_address():
uintptr_t size = (uintptr_t)&__bss_end - (uintptr_t)&__text_start;

turns into
     111166f: b8 83 c4 17 01        mov    $0x117c483,%eax

whih is beyond the end of bss:

0117b484 g       .bss 00000000 __bss_end

Somehow the __bss_end here is 255 bytes ahead.

2. do_elf_reloc_fixups():

uintptr_t size = (uintptr_t)&__bss_end - (uintptr_t)&__text_start;

Here the __text_start is 0 in the file:

 1111d9f: bb a0 e0 13 01        mov    $0x113e0a0,%ebx
1111da4: 81 ef 00 00 00 00     sub    $0x0,%edi

As it happens, both of these are in pre-relocation code.

For these reasons we silent check and ignore bad relocations.

Signed-off-by: Simon Glass <sjg@chromium.org>
13 years agox86: Support relocation of FDT on start-up
Simon Glass [Thu, 28 Feb 2013 19:26:15 +0000 (19:26 +0000)] 
x86: Support relocation of FDT on start-up

With CONFIG_OF_CONTROL we may have an FDT in the BSS region. Relocate
it up with the rest of U-Boot to keep the rest of memory free.

Signed-off-by: Simon Glass <sjg@chromium.org>
13 years agox86: Rearrange the output input to remove BSS
Simon Glass [Thu, 28 Feb 2013 19:26:14 +0000 (19:26 +0000)] 
x86: Rearrange the output input to remove BSS

At present BSS data is including in the image, which wastes binary space.
Remove it by rearranging the sections so that BSS is last.

Signed-off-by: Simon Glass <sjg@chromium.org>
13 years agox86: Add an __end symbol to signal the end of the U-Boot binary
Simon Glass [Thu, 28 Feb 2013 19:26:13 +0000 (19:26 +0000)] 
x86: Add an __end symbol to signal the end of the U-Boot binary

With this symbol we can easy append something (e.g. an FDT) to the U-Boot
binary and access it from within U-Boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
13 years agox86: Permit bootstage and timer data to be used prior to relocation
Simon Glass [Thu, 28 Feb 2013 19:26:12 +0000 (19:26 +0000)] 
x86: Permit bootstage and timer data to be used prior to relocation

It is useful to be able to access the timer before U-Boot has relocated
so that we can fully support bootstage.

Add new global_data members to support this.

Signed-off-by: Simon Glass <sjg@chromium.org>
13 years agox86: Add basic cache operations
Simon Glass [Thu, 28 Feb 2013 19:26:11 +0000 (19:26 +0000)] 
x86: Add basic cache operations

At present most x86 cache operations are undefined. Add a basic
implementation for these.

Signed-off-by: Simon Glass <sjg@chromium.org>
13 years agox86: Add function to get top of usable ram
Simon Glass [Thu, 28 Feb 2013 19:26:10 +0000 (19:26 +0000)] 
x86: Add function to get top of usable ram

The memory layout calculations are done in calculate_relocation_address(),
and coreboot has its own version of this function. But in fact all we
really need is to set the top of usable RAM, and then the base version
will work as is.

So instead of allowing the whole calculate_relocation_address() function
to be replaced, create board_get_usable_ram_top() which can be used by
a board to specify the top of the area where U-Boot relocations to.

Signed-off-by: Simon Glass <sjg@chromium.org>
13 years agoPrepare v2013.04-rc1
Tom Rini [Mon, 4 Mar 2013 21:29:17 +0000 (16:29 -0500)] 
Prepare v2013.04-rc1

Signed-off-by: Tom Rini <trini@ti.com>
13 years agokerneldoc: Add Sonic Zhang to alias bfin in git-mailrc.
Sonic Zhang [Thu, 28 Feb 2013 20:21:13 +0000 (20:21 +0000)] 
kerneldoc: Add Sonic Zhang to alias bfin in git-mailrc.

Signed-off-by: Sonic Zhang <sonic.adi@gmail.com>
13 years agobootm: fix conditional compilation for bootm ramdisk subcommand
Daniel Schwierzeck [Tue, 26 Feb 2013 04:54:19 +0000 (04:54 +0000)] 
bootm: fix conditional compilation for bootm ramdisk subcommand

All code related to the bootm ramdisk subcommand is conditionally
enabled by CONFIG_SYS_BOOT_RAMDISK_HIGH except for the help message.
Replace the CONFIG_ARCH defines by CONFIG_SYS_BOOT_RAMDISK_HIGH
to fix this.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
13 years agoenv: Avoid clobbering an edited variable on ctrl-c
Joe Hershberger [Fri, 8 Feb 2013 10:12:34 +0000 (10:12 +0000)] 
env: Avoid clobbering an edited variable on ctrl-c

If readline says there was an error, don't write to the variable!

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
13 years agoubifs: Allow ubifsmount volume reference by number
Joe Hershberger [Thu, 1 Nov 2012 16:54:18 +0000 (16:54 +0000)] 
ubifs: Allow ubifsmount volume reference by number

UBI can mount volumes by name or number  The current code forces you
to name the volume by prepending every name with "ubi:".

>From fs/ubifs/super.c
 * There are several ways to specify UBI volumes when mounting UBIFS:
 * o ubiX_Y    - UBI device number X, volume Y;
 * o ubiY      - UBI device number 0, volume Y;
 * o ubiX:NAME - mount UBI device X, volume with name NAME;
 * o ubi:NAME  - mount UBI device 0, volume with name NAME.

Now any name passed in any of the above forms are allowed.

Also update the configs that referenced ubifsmount.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
13 years agosandbox: config: Enable sandbox command
Simon Glass [Wed, 26 Dec 2012 09:53:38 +0000 (09:53 +0000)] 
sandbox: config: Enable sandbox command

The 'sb' command allows loading files from the host, and listing
directories.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@ti.com>
13 years agosandbox: Enable ext4 and fat filesystems
Simon Glass [Wed, 26 Dec 2012 09:53:37 +0000 (09:53 +0000)] 
sandbox: Enable ext4 and fat filesystems

These are useful for build-testing code, at least.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@ti.com>
13 years agosandbox: Add 'sb' command to access filesystem features
Simon Glass [Wed, 26 Dec 2012 09:53:36 +0000 (09:53 +0000)] 
sandbox: Add 'sb' command to access filesystem features

The new 'sb' command is intended to deal with sandbox-specific features
that have no parallel in other archs. This commit adds two sub-commands
to list a directory and read a file from the host filesystem.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@ti.com>
13 years agosandbox: Add host filesystem
Simon Glass [Wed, 26 Dec 2012 09:53:35 +0000 (09:53 +0000)] 
sandbox: Add host filesystem

This allows reading of files from the host filesystem in sandbox.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@ti.com>
13 years agosandbox: Add a way of obtaining directory listings
Simon Glass [Wed, 26 Dec 2012 09:53:34 +0000 (09:53 +0000)] 
sandbox: Add a way of obtaining directory listings

This implementation uses opendir()/readdir() to access the directory
information and then puts it in a linked list for the caller's use.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@ti.com>
13 years agofs: Move ls and read methods into ext4, fat
Simon Glass [Wed, 26 Dec 2012 09:53:33 +0000 (09:53 +0000)] 
fs: Move ls and read methods into ext4, fat

It doesn't make a lot of sense to have these methods in fs.c. They are
filesystem-specific, not generic code. Add each to the relevant
filesystem and remove the associated #ifdefs in fs.c.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@ti.com>
13 years agofs: Use map_sysmem() on read
Simon Glass [Wed, 26 Dec 2012 09:53:32 +0000 (09:53 +0000)] 
fs: Use map_sysmem() on read

This allows us to use filesystems on sandbox. It has no effect on other
architectures.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@ti.com>
13 years agofs: Tell probe functions where to put their results
Simon Glass [Wed, 26 Dec 2012 09:53:31 +0000 (09:53 +0000)] 
fs: Tell probe functions where to put their results

Rather than rely on global variables for the probe functions, pass in
the information that we need filled in. This allows us to potentially
keep the variables private to fs.c in the future, and the meaning of
the probe function is clearer.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@ti.com>
13 years agofs: Use filesystem methods instead of switch()
Simon Glass [Wed, 26 Dec 2012 09:53:30 +0000 (09:53 +0000)] 
fs: Use filesystem methods instead of switch()

We can use the available methods and avoid using switch(). When the
filesystem is not supported, we fall through to the 'unsupported'
methods: fs_probe_unsupported() prints an error, so the others do
not need to.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@ti.com>
13 years agofs: Fully populate the filesystem method struct
Simon Glass [Wed, 26 Dec 2012 09:53:29 +0000 (09:53 +0000)] 
fs: Fully populate the filesystem method struct

There is a structure in fs.c with just a probe method. By adding methods
for other operations, we can avoid lots of #ifdefs and switch()s. As a
first step, create the structure ready for use.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@ti.com>
13 years agoext4: Split write support into its own file
Simon Glass [Wed, 26 Dec 2012 09:53:28 +0000 (09:53 +0000)] 
ext4: Split write support into its own file

This code seems to be entirely othogonal, so remove the #ifdef and put
the condition in the Makefile instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
13 years agoMerge branch 'mem' of git://git.denx.de/u-boot-x86
Tom Rini [Mon, 4 Mar 2013 16:14:27 +0000 (11:14 -0500)] 
Merge branch 'mem' of git://git.denx.de/u-boot-x86

13 years agoMerge branch 'master' of git://git.denx.de/u-boot-blackfin
Tom Rini [Mon, 4 Mar 2013 14:44:42 +0000 (09:44 -0500)] 
Merge branch 'master' of git://git.denx.de/u-boot-blackfin

13 years agoblackfin: bf60x: add resume from hibernate
Steven Miao [Sat, 31 Mar 2012 08:01:50 +0000 (16:01 +0800)] 
blackfin: bf60x: add resume from hibernate

Add Bf60x resume from hibernate support

Signed-off-by: Steven Miao <realmz6@gmail.com>
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
Signed-off-by: Sonic Zhang <sonic.adi@gmail.com>
13 years agoblackfin: bf60x: add hw watchdog support
Bob Liu [Tue, 27 Dec 2011 07:05:53 +0000 (15:05 +0800)] 
blackfin: bf60x: add hw watchdog support

Signed-off-by: Bob Liu <lliubbo@gmail.com>
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Sonic Zhang <sonic.adi@gmail.com>
13 years agoblackfin: add bf6xx spi driver
Scott Jiang [Tue, 29 Nov 2011 23:03:26 +0000 (18:03 -0500)] 
blackfin: add bf6xx spi driver

Spi driver for bf60x is different from old one, so implement a new
driver for it.

Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com>
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
Signed-off-by: Sonic Zhang <sonic.adi@gmail.com>
13 years agoblackfin: bf60x: add rsi/sdh support
Sonic Zhang [Thu, 16 Aug 2012 03:26:00 +0000 (11:26 +0800)] 
blackfin: bf60x: add rsi/sdh support

Add rsi/sdh support for bf60x.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
Signed-off-by: Sonic Zhang <sonic.adi@gmail.com>
13 years agoblackfin: bf60x: add board and headers files to support bf609
Sonic Zhang [Thu, 16 Aug 2012 04:08:31 +0000 (12:08 +0800)] 
blackfin: bf60x: add board and headers files to support bf609

Board and config header files for bf609-ezkit support.

Signed-off-by: Bob Liu <lliubbo@gmail.com>
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Sonic Zhang <sonic.adi@gmail.com>
13 years agoblackfin: bf60x: add gpio support
Bob Liu [Thu, 16 Aug 2012 03:40:30 +0000 (11:40 +0800)] 
blackfin: bf60x: add gpio support

Signed-off-by: Bob Liu <lliubbo@gmail.com>
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Sonic Zhang <sonic.adi@gmail.com>
13 years agoblackfin: bf60x: support big cplb page
Bob Liu [Tue, 25 Oct 2011 10:07:58 +0000 (18:07 +0800)] 
blackfin: bf60x: support big cplb page

BF60x support 16K, 64K, 16M and 64M cplb pages, this patch add support for them.
So that bf609-ezkit can use it's 128M memory.

Signed-off-by: Bob Liu <lliubbo@gmail.com>
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Sonic Zhang <sonic.adi@gmail.com>
13 years agoblackfin: bf60x: add dma support
Bob Liu [Thu, 16 Aug 2012 03:19:08 +0000 (11:19 +0800)] 
blackfin: bf60x: add dma support

Add dma support for bf60x.

Signed-off-by: Bob Liu <lliubbo@gmail.com>
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Sonic Zhang <sonic.adi@gmail.com>
13 years agoblackfin: bf60x: add serial support
Sonic Zhang [Thu, 16 Aug 2012 03:16:02 +0000 (11:16 +0800)] 
blackfin: bf60x: add serial support

Add serial for bf60x.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
Signed-off-by: Sonic Zhang <sonic.adi@gmail.com>
13 years agoblackfin: bf60x: Port blackfin core architecture code to boot on bf60x.
Sonic Zhang [Thu, 16 Aug 2012 03:56:14 +0000 (11:56 +0800)] 
blackfin: bf60x: Port blackfin core architecture code to boot on bf60x.

Set up clocks, DDR controller, Nor flash controller, reboot,
serial port. Add new SPI boot modes.

Signed-off-by: Bob Liu <lliubbo@gmail.com>
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Sonic Zhang <sonic.adi@gmail.com>
13 years agoblackfin: bf60x: new processor header files
Bob Liu [Thu, 16 Aug 2012 03:10:41 +0000 (11:10 +0800)] 
blackfin: bf60x: new processor header files

Add header files for blackfin new processor bf60x.

Signed-off-by: Bob Liu <lliubbo@gmail.com>
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Sonic Zhang <sonic.adi@gmail.com>
13 years agoSPL: Change description for spl command
Stefano Babic [Sat, 23 Feb 2013 00:53:27 +0000 (00:53 +0000)] 
SPL: Change description for spl command

Add a more descriptive text to the help of the spl
command.

Signed-off-by: Stefano Babic <sbabic@denx.de>
Reviewed-by: Tom Rini <trini@ti.com>
13 years agoOMAP3: drop CONFIG_SPL_OS_BOOT_KEY and use local define
Stefano Babic [Sat, 23 Feb 2013 00:53:26 +0000 (00:53 +0000)] 
OMAP3: drop CONFIG_SPL_OS_BOOT_KEY and use local define

CONFIG_SPL_OS_BOOT_KEY is used only in board files. It is
not required to have a general CONFIG_ option. Rename it and
define it in board directory.

Signed-off-by: Stefano Babic <sbabic@denx.de>
Reviewed-by: Tom Rini <trini@ti.com>
13 years agoAdd README for the "Falcon" mode
Stefano Babic [Sat, 23 Feb 2013 00:53:25 +0000 (00:53 +0000)] 
Add README for the "Falcon" mode

Simple howto to add support to a board
for booting the kernel from SPL ("Falcon" mode).

Signed-off-by: Stefano Babic <sbabic@denx.de>
Reviewed-by: Tom Rini <trini@ti.com>
13 years agohash: Use lower case for hash algorithm names
Simon Glass [Sun, 24 Feb 2013 17:33:32 +0000 (17:33 +0000)] 
hash: Use lower case for hash algorithm names

Rather than use strcasecmp() in the hash algorithm search, require the
caller to do this first. Most of U-Boot can use lower case anyway, and
the hash command can convert to lower case before calling hash_command().
This saves needing strcasecmp() for boards that use hashing but not
the hash command.

Signed-off-by: Simon Glass <sjg@chromium.org>
13 years agosandbox: Allow hash functions to work correctly
Simon Glass [Sun, 24 Feb 2013 17:33:31 +0000 (17:33 +0000)] 
sandbox: Allow hash functions to work correctly

Use map_sysmem() so that hashing is possible on sandbox.

Signed-off-by: Simon Glass <sjg@chromium.org>
13 years agosandbox: Update mtest to fix crashes
Simon Glass [Thu, 28 Feb 2013 17:47:14 +0000 (17:47 +0000)] 
sandbox: Update mtest to fix crashes

Use map_sysmem() in the memory tester so that it works as expected on
sandbox.

Signed-off-by: Simon Glass <sjg@chromium.org>
13 years agoMove CONFIG_SYS_MEMTEST_SCRATCH #ifdef to top of file
Simon Glass [Sun, 24 Feb 2013 17:33:29 +0000 (17:33 +0000)] 
Move CONFIG_SYS_MEMTEST_SCRATCH #ifdef to top of file

This config effectively has a default value of 0, so add this setting
at the top of the code to remove an #ifdef in the C function.

Signed-off-by: Simon Glass <sjg@chromium.org>
13 years agosandbox: config: Enable hash functions and mtest
Simon Glass [Sun, 24 Feb 2013 20:29:23 +0000 (20:29 +0000)] 
sandbox: config: Enable hash functions and mtest

Enable the hash command and sha1/256 hashing for sandbox. Also use a
better address for memory testing (since the existing one is set up
for linux host memory space).

Signed-off-by: Simon Glass <sjg@chromium.org>
13 years agoRoll crc32 into hash infrastructure
Simon Glass [Sun, 24 Feb 2013 20:30:22 +0000 (20:30 +0000)] 
Roll crc32 into hash infrastructure

Add the CRC32 algorithm to the list of available hashes, and make
the crc32 command use hash_command(). Add a new crc32_wd_buf() to
make this possible, which puts its result in a buffer rather than
returning it as a 32-bit value.

Note: For some boards the hash command is not enabled, neither
are sha1, sha256 or the verify option. In this case the full
hash implementation adds about 500 bytes of overhead. So as a
special case, we use #ifdef to select very simple bahaviour in
that case. The justification for this is that it is currently
a very common case (virtually all boards enable crc32 but only
some enable more advanced features).

Signed-off-by: Simon Glass <sjg@chromium.org>
13 years agohash: Add a flag to support saving hashes in the environment
Simon Glass [Sun, 24 Feb 2013 17:33:26 +0000 (17:33 +0000)] 
hash: Add a flag to support saving hashes in the environment

Some hashing commands permit saving the hash in an environment variable,
and verifying a hash from there. But the crc32 command does not support
this. In order to permit crc32 to use the generic hashing infrastructure,
add a flag to select which behaviour to use.

Signed-off-by: Simon Glass <sjg@chromium.org>
13 years agoimage: Use crc header file instead of C prototypes
Simon Glass [Sun, 24 Feb 2013 17:33:25 +0000 (17:33 +0000)] 
image: Use crc header file instead of C prototypes

We have an existing header which the crc32 definitions, so use it.

Signed-off-by: Simon Glass <sjg@chromium.org>
13 years agonet: Use new numeric setenv functions
Simon Glass [Sun, 24 Feb 2013 17:33:24 +0000 (17:33 +0000)] 
net: Use new numeric setenv functions

Use setenv_ulong(), setenv_hex() and setenv_addr() in net/

Signed-off-by: Simon Glass <sjg@chromium.org>
13 years agofs: Use new numeric setenv functions
Simon Glass [Sun, 24 Feb 2013 17:33:23 +0000 (17:33 +0000)] 
fs: Use new numeric setenv functions

Use setenv_ulong(), setenv_hex() and setenv_addr() in fs/

Signed-off-by: Simon Glass <sjg@chromium.org>
13 years agocommon: Use new numeric setenv functions
Simon Glass [Sun, 24 Feb 2013 17:33:22 +0000 (17:33 +0000)] 
common: Use new numeric setenv functions

Use setenv_ulong(), setenv_hex() and setenv_addr() in common/

Signed-off-by: Simon Glass <sjg@chromium.org>
13 years agoUpdate set_working_fdt_addr() to use setenv_addr()
Simon Glass [Sun, 24 Feb 2013 17:33:21 +0000 (17:33 +0000)] 
Update set_working_fdt_addr() to use setenv_addr()

We might as well use this common function instead of repeating the same
code.

Signed-off-by: Simon Glass <sjg@chromium.org>
13 years agoReduce casting in mtest
Simon Glass [Sun, 24 Feb 2013 17:33:20 +0000 (17:33 +0000)] 
Reduce casting in mtest

Use a ulong for the command arguments, and only cast to an address when
needed. This fixes warnings in sandbox where pointers are typically 64 bits
long.

Signed-off-by: Simon Glass <sjg@chromium.org>
13 years agoBring mtest putc() into common code
Simon Glass [Sun, 24 Feb 2013 17:33:19 +0000 (17:33 +0000)] 
Bring mtest putc() into common code

If we get a Ctrl-C abort, we always print a newline. Move this repeated
code out of the functions and into a single place in the caller.

Signed-off-by: Simon Glass <sjg@chromium.org>
13 years agoFix mtest indenting
Simon Glass [Sun, 24 Feb 2013 17:33:18 +0000 (17:33 +0000)] 
Fix mtest indenting

Some of the inner loops are not indented correctly. Fix this.

Signed-off-by: Simon Glass <sjg@chromium.org>
13 years agoUse common mtest iteration counting
Simon Glass [Sun, 24 Feb 2013 17:33:17 +0000 (17:33 +0000)] 
Use common mtest iteration counting

The iteration code is the same for each version of the memory test, so
pull it out into the common function.

Signed-off-by: Simon Glass <sjg@chromium.org>
13 years agoSplit out the memory tests into separate functions
Simon Glass [Sun, 24 Feb 2013 17:33:16 +0000 (17:33 +0000)] 
Split out the memory tests into separate functions

Half of the code is currently hidden behind an #ifdef. Move the two
memory tests into their own functions and use the compiler to eliminate
the unused code.

Signed-off-by: Simon Glass <sjg@chromium.org>
13 years agosandbox: Change memory commands to use map_physmem
Simon Glass [Sun, 24 Feb 2013 17:33:15 +0000 (17:33 +0000)] 
sandbox: Change memory commands to use map_physmem

Sandbox wants to support commands which use memory. The map_sysmen()
call provides this feature, so use this in the memory commands.

Signed-off-by: Simon Glass <sjg@chromium.org>
13 years agosandbox: Add un/map_sysmen() to deal with sandbox's ram_buf
Simon Glass [Sun, 24 Feb 2013 17:33:14 +0000 (17:33 +0000)] 
sandbox: Add un/map_sysmen() to deal with sandbox's ram_buf

Sandbox doesn't actually provide U-Boot access to the machine's physical
memory. Instead it provides a RAM buffer of configurable size, and all
memory accesses are within that buffer. Sandbox memory starts at 0 and
is CONFIG_DRAM_SIZE bytes in size. Allowing access outside this buffer
might produce unpredictable results in the event of an error, and would
expose the host machine's memory architecture to the sandbox U-Boot.

Most U-Boot functions assume that they can just access memory at given
address. For sandbox this is not true.

Add a map_sysmem() call which converts a U-Boot address to a system
address. In most cases this is a NOP, but for sandbox it returns a
pointer to that memory inside the RAM buffer.

To get a U-Boot feature to work correctly within sandbox, you should call
map_sysmem() to get a pointer to the address, and then use that address for
any U-Boot memory accesses.

Signed-off-by: Simon Glass <sjg@chromium.org>
13 years agosandbox: Improve sandbox serial port keyboard interface
Taylor Hutt [Sun, 24 Feb 2013 17:33:13 +0000 (17:33 +0000)] 
sandbox: Improve sandbox serial port keyboard interface

Implements the tstc() interface for the serial driver.  Multiplexing
the console between the serial port and a keyboard uses a polling
method of checking if characters are available; this means that the
serial console must be non-blocking when attempting to read
characters.

Signed-off-by: Taylor Hutt <thutt@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
13 years agoUpdate print_buffer() to use const
Simon Glass [Sun, 24 Feb 2013 17:33:12 +0000 (17:33 +0000)] 
Update print_buffer() to use const

The buffer cannot be changed by this function, so change the buffer
pointer to a const. This allows callers with const pointer to use the
function without a cast.

Signed-off-by: Simon Glass <sjg@chromium.org>
13 years agoTidy up error checking and fix bug in hash command
Simon Glass [Sun, 24 Feb 2013 17:33:11 +0000 (17:33 +0000)] 
Tidy up error checking and fix bug in hash command

There are two problems:

1. The argument count needs to be checked before argv is used
2. When verify is not enabled, we need to define a constant zero value

Signed-off-by: Simon Glass <sjg@chromium.org>
13 years agosandbox: fix compiler warning
Allen Martin [Tue, 22 Jan 2013 13:11:21 +0000 (13:11 +0000)] 
sandbox: fix compiler warning

Add back return statement to fix compiler warning about control flow
reaching end of non void function that was introduced with:

e05e5de arm: move C runtime setup code in crt0.S

Signed-off-by: Allen Martin <amartin@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
13 years agoARM: ns9750dev: remove remainders of dead board
Wolfgang Denk [Thu, 29 Nov 2012 02:53:29 +0000 (02:53 +0000)] 
ARM: ns9750dev: remove remainders of dead board

Commit 8b710b1 started removing code for the unmaintained "ns9750dev"
board; the board support is still broken, and not included anywhere in
the Makefile or boards.cfg.  Remove the remaining dead code.

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agoREADME.scrapyard: add missing commit IDs
Wolfgang Denk [Thu, 29 Nov 2012 02:53:28 +0000 (02:53 +0000)] 
README.scrapyard: add missing commit IDs

Now that the patches have made it into mainline, we can also add the
commit IDs.

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agocommon: cmd_sata: Fix usage text for 'sata init'
Fabio Estevam [Wed, 20 Feb 2013 14:35:35 +0000 (14:35 +0000)] 
common: cmd_sata: Fix usage text for 'sata init'

Currently sata usage text prints a double 'sata' for the init command.

MX53LOCO U-Boot > sata
sata - SATA sub system

Usage:
sata sata init - init SATA sub system
sata info - show available SATA devices
sata device [dev] - show or set current device
sata part [dev] - print partition table
sata read addr blk# cnt
sata write addr blk# cnt

Remove the extra 'sata' from the 'sata init' line.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
13 years agoMerge branch 'master' of git://git.denx.de/u-boot-arm
Stefano Babic [Sat, 23 Feb 2013 09:13:40 +0000 (10:13 +0100)] 
Merge branch 'master' of git://git.denx.de/u-boot-arm

13 years agocommon/env_nand.c: calculate crc only when readenv was OK
Phil Sutter [Thu, 21 Feb 2013 17:21:56 +0000 (18:21 +0100)] 
common/env_nand.c: calculate crc only when readenv was OK

Calculating the checksum of incompletely read data is useless.

Signed-off-by: Phil Sutter <phil.sutter@viprinet.com>
[scottwood@freescale.com: minor formatting fix]
Signed-off-by: Scott Wood <scottwood@freescale.com>
13 years agoenv_nand.c: clarify log messages when env reading fails
Phil Sutter [Thu, 21 Feb 2013 17:21:55 +0000 (18:21 +0100)] 
env_nand.c: clarify log messages when env reading fails

The single message is misleading, since there is no equivalent success
note when reading the other copy succeeds. Instead, warn if one of the
redundant copies could not be loaded and emphasise on the error when
reading both fails.

Signed-off-by: Phil Sutter <phil.sutter@viprinet.com>
13 years agomtd: nand: Check if NAND is locked tight before lock cmds
Joe Hershberger [Fri, 8 Feb 2013 09:27:19 +0000 (09:27 +0000)] 
mtd: nand: Check if NAND is locked tight before lock cmds

If the NAND is locked tight, commands such as lock and unlock will not
work, but the NAND chip may not report an error.  Check the lock tight
status before attempting such operations so that an error status can be
reported if we know the operation will not succeed.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
13 years agonand: fix nand read.option parsing
Harvey Chapman [Thu, 7 Feb 2013 11:34:44 +0000 (11:34 +0000)] 
nand: fix nand read.option parsing

"nand read.part addr off size" would be treated as "nand read.raw addr off 1"
It now fails as intended stating "Unknown nand command suffix '.part'"

Signed-off-by: Harvey Chapman <hchapman@3gfp.com>
13 years agoimls: Add support to list images in NAND device
Vipin Kumar [Sun, 16 Dec 2012 22:32:48 +0000 (22:32 +0000)] 
imls: Add support to list images in NAND device

This patch adds support to list images in NAND flash through imls

Signed-off-by: Vipin Kumar <vipin.kumar@st.com>
13 years agoMerge branch 'u-boot-ti/master' into 'u-boot-arm/master'
Albert ARIBAUD [Thu, 21 Feb 2013 20:30:47 +0000 (21:30 +0100)] 
Merge branch 'u-boot-ti/master' into 'u-boot-arm/master'