1
0
Fork 0
Commit Graph

19833 Commits (5644369450635fa5c2967bee55b1ac41f6e988d0)

Author SHA1 Message Date
Nikita Kiryanov 5964dadd03 omap_hsmmc: fix out of bounds array access
There are 3 MMC/SD/SDIO controllers in OMAP SoCs, but only 2 structs
are defined for devices. This leads to data being written outside of
array bounds on systems that use all 3 controllers.

Update hsmmc_dev array to the correct size.

Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
2013-03-08 16:41:12 -05:00
Nikita Kiryanov fa3a69289f omap: consolidate common mmc definitions
The various mmc_host_def.h files are almost identical.
Reduce code duplication by moving the similar definitions to a common
header file.

Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
2013-03-08 16:41:12 -05:00
Tom Rini 1c382ead7a am33xx: Update DDR3 EMIF configuration sequence
Based on
http://processors.wiki.ti.com/index.php/AM335x_EMIF_Configuration_tips
we need to re-work our sequence in config_sdram slightly to match what
the TRM describes as the correct sequence.  In our current (incorrect)
sequence some edge cases may fail to initalize correctly.

Signed-off-by: Tom Rini <trini@ti.com>
2013-03-08 16:41:12 -05:00
Tom Rini 98bc1228c8 am335x_evm: Add am335x_evm_usbspl build target
We add USB (RNDIS gadget) SPL support as a separate target.  We need to
pull out YMODEM support in order to be a small enough target binary.

Signed-off-by: Tom Rini <trini@ti.com>
2013-03-08 16:41:12 -05:00
Tom Rini a32f42f65d am335x_evm: Never set CONFIG_EXTRA_ENV_SETTINGS in SPL
Because of our support for network-based SPL, we don't discard all of
the environment related functions.  We however never make use of the
default CONFIG_EXTRA_ENV_SETTINGS items and as this variable grows, it
brings us closer to (or with some toolchains, over) our SPL size limit.
Never set this in the case of SPL.

Signed-off-by: Tom Rini <trini@ti.com>
2013-03-08 16:41:12 -05:00
Rajeshwari Shinde cfa6df1909 config: Snow: Enable MAX98095 codec
This patch enables MAX98095 codec required for Snow

Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2013-03-08 22:34:19 +09:00
Rajeshwari Shinde 7772bb787e EXYNOS5: FDT: Add compatible strings for MAX98095
Add required compatible information for MAX98095 codec

Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2013-03-08 22:34:19 +09:00
Rajeshwari Shinde ce07380534 EXYNOS5: GPIO to enable MAX98095
This patch sets high a GPIO to enable the codec MAX98095

Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2013-03-08 22:34:18 +09:00
Rajeshwari Shinde 14d2dfc33a Sound: Support for MAX98095 codec in driver
This patchs adds support for MAX98095 codec in
sound driver.

Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2013-03-08 22:34:18 +09:00
Rajeshwari Shinde 5febe8db91 Sound: MAX98095: Add the driver for codec
This patch adds the driver for codec MAX98095 required by Snow
Board

Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2013-03-08 22:34:18 +09:00
Rajeshwari Shinde a006076b15 EXYNOS5: Add function to enable XXTI clock source
This patch adds funtion to enable XXTI clock source
required by MAX98095 codec.

Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2013-03-08 22:34:18 +09:00
Otavio Salvador 7315e3bf2c mx23_olinuxino: Fix warning for implicit declaration
Fixes a build warning of implicit declaration of
gpio_direction_output, as bellow:

,----
| mx23_olinuxino.c: In function 'board_early_init_f':
| mx23_olinuxino.c:51:2: warning: implicit declaration
|     of function 'gpio_direction_output'
|     [-Wimplicit-function-declaration]
`----

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2013-03-07 18:29:20 +01:00
Stephen Warren 8f3937761b ARM: mx6: use common CPU errata config options
Now that U-Boot has common CONFIG_ options to work around some ARM CPU
errata, enable the relevant options on MX6, and remove the custom
lowlevel_init.S, since it's just duplicated code now.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Jason Liu <r64343@freescale.com>
2013-03-07 18:20:37 +01:00
Fabio Estevam 1b097cff51 mx6: Provide a structure for accessing HDMI registers
Provide a structure for accessing HDMI registers, so that we can use proper
read/write accessors.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Tested-by: Eric Nelson <eric.nelson@boundarydevices.com>
2013-03-07 18:03:44 +01:00
Fadil Berisha 3e9dc93051 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>
2013-03-07 17:50:55 +01:00
Otavio Salvador b8bd75af77 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>
2013-03-07 17:22:58 +01:00
Otavio Salvador ebe1d17006 mx23_olinuxino: Enable USB support
This enabled USB support for the mx23_olinuxino board.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2013-03-07 17:22:58 +01:00
Otavio Salvador e895aa45b9 mx23evk: Enable USB support
This enabled USB support for the mx23evk board.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2013-03-07 17:22:58 +01:00
Fadil Berisha 6ecd05d2f5 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>
2013-03-07 17:22:58 +01:00
Otavio Salvador 36c7c9250d 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>
2013-03-07 17:22:57 +01:00
Otavio Salvador eb2996024b 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>
2013-03-07 17:22:57 +01:00
Otavio Salvador af73034c6b 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>
2013-03-07 17:22:57 +01:00
Otavio Salvador 920178d381 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>
2013-03-07 17:22:57 +01:00
Otavio Salvador 89075d3f4f 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>
2013-03-07 17:22:57 +01:00
Otavio Salvador a74dbf2734 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>
2013-03-07 17:22:57 +01:00
Marek Vasut f94669f306 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>
2013-03-07 17:22:57 +01:00
Marek Vasut afa8721099 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>
2013-03-07 17:22:57 +01:00
Marek Vasut 47f1331506 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>
2013-03-07 17:22:57 +01:00
Marek Vasut d3f26a2700 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>
2013-03-07 17:22:56 +01:00
Marek Vasut c96e78ccfe 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>
2013-03-07 17:22:56 +01:00
Marek Vasut 3430e0bd2a 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>
2013-03-07 17:22:56 +01:00
Marek Vasut 5c2f444c9b 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 8303ed128a .

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>
2013-03-07 17:22:56 +01:00
Stefano Babic 62db0b3d62 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>
2013-03-07 16:43:47 +01:00
Eric Nelson 690417236f i.MX6: Add DDR controller registers
Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
2013-03-07 16:43:47 +01:00
Eric Nelson 828bd14c10 i.MX6DL: define IOMUX pads NANDF_CS1-3 for use as GPIO
Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
2013-03-07 16:43:46 +01:00
Eric Nelson 714afa64f3 i.MX6: crm_regs: define IOMUXC_GPR4/6/7
Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
2013-03-07 16:43:46 +01:00
Eric Nelson 4f60c49a70 i.MX6: crm_regs: define CCM_CCGRx for use in board config files
Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
2013-03-07 16:43:46 +01:00
Eric Nelson cfb8b9d335 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>
2013-03-07 16:43:46 +01:00
Eric Nelson 74cf809972 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>
2013-03-07 16:43:46 +01:00
Stefano Babic c5fea0fb7a Merge branch 'master' of git://git.denx.de/u-boot-arm 2013-03-05 14:37:31 +01:00
Simon Glass fc959081d4 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>
2013-03-04 15:57:52 -08:00
Simon Glass 26f7621d99 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>
2013-03-04 15:57:51 -08:00
Simon Glass 62f7970a5a 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>
2013-03-04 15:57:48 -08:00
Simon Glass f697d528ca 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>
2013-03-04 15:57:47 -08:00
Simon Glass f82d15ead1 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>
2013-03-04 15:57:40 -08:00
Simon Glass 4b491b8dde 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>
2013-03-04 15:57:38 -08:00
Simon Glass bc2df1afb9 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>
2013-03-04 15:57:36 -08:00
Simon Glass 8937140957 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>
2013-03-04 15:57:34 -08:00
Simon Glass 5e98947f9b 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>
2013-03-04 15:56:46 -08:00
Tom Rini 2536850d7c Prepare v2013.04-rc1
Signed-off-by: Tom Rini <trini@ti.com>
2013-03-04 16:29:17 -05:00