9
0
Fork 0
Commit Graph

8740 Commits

Author SHA1 Message Date
Sascha Hauer 7b7cf936cb mtd: Add mtd_* functions
The Kernel has mtd_read, mtd_write, mtd_erase and mtd_block_markbad.
Add these functions to barebox aswell to make future mtd synchronizations
with the kernel easier.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-14 10:31:39 +01:00
Sascha Hauer b600cb936e mtd: rename mtd file operations callback functions
These are currently named mtd_read/write/erase. Functions with
the same name exist as global functions in the kernel. Rename
them to mtd_op_* to avoid name clashes with future mtd updates.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-14 10:22:17 +01:00
Sascha Hauer 3930f38028 libmtd: rename functions from mtd_* to libmtd_*
The kernel nowadays has mtd_read/write and other functions. In
barebox we also have these functions, but with a different prototype,
namely they correspond to the libmtd userspace functions. Rename
these functions to libmtd_* to avoid name clashes with future mtd
updates.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-14 10:16:17 +01:00
Sascha Hauer 8139fa78b9 USB i.MX6: Add HSIC support
HSIC needs some special setup for i.MX6. Most ugly detail is that
the HSIC needs help of the IOMUX to configure a pullup on the strobe
line. This has to be done after the ehci controller has started.
Fortunately there is only one muxing possibility for the HSIC ports
on i.MX6, so we can simply control the iomux from the usbmisc driver.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-14 09:57:51 +01:00
Sascha Hauer 298f7fc3b6 USB i.MX chipidea: implement post init support
Some controllers need an init hook after the USB controller is
started, so implement the post init hook for i.MX.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-14 09:56:50 +01:00
Sascha Hauer 80a4c202dd USB ehci: Add platform specific init calls
Some USB cores need a platform specific init hook, add it to
the ehci driver.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-14 09:56:35 +01:00
Sascha Hauer cefcb0c281 USB chipidea i.MX: Fix PTS mask for HSIC
bit25 is part of the PTS bits, so mask it out before rewriting it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-14 09:56:30 +01:00
Sascha Hauer 1943567163 ARM i.MX6: Fix HSIC pad definitions
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-14 09:55:50 +01:00
Jean-Christophe PLAGNIOL-VILLARD 5f337b5452 ahci-generic: add oftree support
calxeda use the generic driver but have it's own compatible cf Linux kernel
Documentation

Cc: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-14 09:29:59 +01:00
Jean-Christophe PLAGNIOL-VILLARD 59cfe5905b highbank: add xgmac support
Cc: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-14 09:28:00 +01:00
Jean-Christophe PLAGNIOL-VILLARD 210bb761d8 of_add_memory: check the device_type is memory
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-14 09:27:35 +01:00
Jean-Christophe PLAGNIOL-VILLARD 9acb6113f0 of: make of_add_memory available for other board
so when the first stage booloader of firmware provide the dtb
we can use it to probe the memory

also allow to print what we probe

Cc: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-14 09:27:26 +01:00
Sascha Hauer e55f9d10b4 defenv2: move config-board out of /env/init
Having the board config file in /env/init has the problem that
the settings in /env/config are overwritten in the init sequence.

This moves the config-board files to /env/ and sources them explicitly
from /env/bin/init before sourcing /env/config

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-14 08:50:43 +01:00
Alexander Shiyan e0acfda5af ARM: clps711x: Update defconfig
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-13 18:34:26 +01:00
Alexander Shiyan 1009b307bd ARM: clep7212: Update default environment
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-13 18:34:26 +01:00
Alexander Shiyan 3539bb8017 ARM: clps711x: Move memory initialization in common CLPS711X location
One memory initialization will be used on any CLPS711X-target,
so move it in the common location.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-13 18:34:26 +01:00
Alexander Shiyan 7e982d545b ARM: clep7212: Fix NULL pointer exception if MMU is enabled
NOR-flash is placed at address 0x0, so if MMU is turned on, initialization
will fails. This patch fix this problem.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-13 18:34:26 +01:00
Alexander Shiyan 2f19e281f2 ARM: clps711x: Mark private functions that not will be used outside as static
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-13 18:34:26 +01:00
Alexander Shiyan 83a9067615 ARM: clps711x: Remove unused "start" declaration from reset.c
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-13 18:34:25 +01:00
Alexander Shiyan 1795947ba1 ARM: clps711x: Adds config option for CPU PLL multiplier
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-13 18:34:25 +01:00
Alexander Shiyan 86fda721e3 ARM: clps711x: Move basic lowlevel initialization in common CLPS711X location
One lowlevel initialization will be used on any CLPS711X-target,
so move it in the common location.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-13 18:34:25 +01:00
Alexander Shiyan c1a4087f5d ARM: clps711x: Rework lowlevel initialization code
This is a rework of CLPS711X low level initialization code which includes:
- Prepare for changing CPU PLL multiplier from board lowlevel code.
- Decrease initial memory size to 8MB. It is minimal known size.
- Fix SDRAM initialization comment about size.
- Turn off all peripherals on startup.
- Skip PLL initialization if CPU is running from external 13 MHz clock.
- Use correct CPU speed for older CPUs without PLL.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-13 18:34:25 +01:00
Sascha Hauer a40e76cebc Add warning above get_ram_size
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-13 18:14:38 +01:00
Rob Herring a3f74d928c ahci: handle COMINIT received during spin-up
Some Intel SSDs can send a COMINIT after the initial COMRESET. This causes
the link to go down and we need to re-initialize the link.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-13 18:09:17 +01:00
Alexander Shiyan 6a256321b8 Use new device_platform_driver() macro for drivers
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-13 09:23:28 +01:00
Alexander Shiyan 12ff763535 Introduce device_platform_driver() macro
device_platform_driver() - Helper macro for drivers that don't do
anything special in module registration. This eliminates a lot of
boilerplate. Driver registration will called on device_initcall.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-13 09:23:28 +01:00
Sascha Hauer c429c68416 console: consolidate common console code
The different console implementations share a good amount of code,
share this in console_common.c.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-13 09:22:33 +01:00
Jean-Christophe PLAGNIOL-VILLARD 64b873ccba vexpress: detect the board periph mapping and detecting the sp804 mapping
at 0x10011000 for a9 legacy otherwise at 0x1c110000

as the new board also support Cortex-A9

so this is working

qemu/arm-softmmu/qemu-system-arm -M vexpress-a15 -m 1024 -smp 1 -kernel build/vexpress/barebox -pflash build/vexpress/flash -nographic -cpu cortex-a9

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-13 09:21:44 +01:00
Jean-Christophe PLAGNIOL-VILLARD ed4da3f2de sp804: introduce amba_is_arm_sp804 to detect if the sp804 is present at the address
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-12 20:35:52 +01:00
Jean-Christophe PLAGNIOL-VILLARD a59a5acf68 amba: introduce amba_device_get_pid/cid
so we can use it on vexpress to detect the hardware mapping

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-12 20:35:52 +01:00
Jean-Christophe PLAGNIOL-VILLARD 8428a8c6e3 amba: add oftree probe support
move ARM_AMBA Kconfig to drivers/amba/Kconfig

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-12 20:31:44 +01:00
Steffen Trumtrar 2ccd4510bd ARM i.MX28: change default watchdog reset method
The default setting for the imx28 watchdog is to do a power-off reset. If the
SoC is only powered via battery, then the watchdog powers the chip down, though.
According to the datasheet it should still be possible to execute a proper POR
with battery power, but testing showed otherwise.
When the watchdog power-off reset is disabled, a software reset is executed
instead. This works with and without battery power.

Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-12 10:02:51 +01:00
Hubert Feurstein b0917935dd ARM i.MX6: Add support for SabreSD board
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-12 10:00:56 +01:00
Vicente Bergas afab6ac783 DeviceTree: add support for initrd in the DT
Add the initrd start and end address to the DT, code comes from u-boot.

Signed-off-by: Vicente Bergas <vicencb@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-12 09:04:27 +01:00
Vicente Bergas c0ba0a64ae ArchosG9: solve regression in second stage lowlevel init
On ArchosG9 the second stage low-level init was the fallback default.
 Now that the low-level init is forcibly enabled it has to be skipped
 when already executed from first stage.

Signed-off-by: Vicente Bergas <vicencb@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-12 08:49:47 +01:00
Jean-Christophe PLAGNIOL-VILLARD 2738f72352 arm: add vexpress board support
detect the cpu model to dynamise the periphs mapping

currently only tested on qemu but should work on real hardware

Cortex-A9

if you use 1GiB of ram you can run the same barebox on Cortex-A15 or Cortex-A9
otherwise use vexpress_ca9_defconfig where the TEXT_BASE is at 0x63f00000

when we will add the relocation support this defconfig will be drop

qemu/arm-softmmu/qemu-system-arm -M vexpress-a9 -m 1024 -smp 1 -kernel build/vexpress/barebox -pflash build/vexpress/flash0 -nographic

Cortex-A15

qemu/arm-softmmu/qemu-system-arm -M vexpress-a15 -m 1024 -smp 1 -kernel build/vexpress/barebox -pflash build/vexpress/flash0 -nographic

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-12 08:49:27 +01:00
Jean-Christophe PLAGNIOL-VILLARD 6e9eb68de5 oftree: fix probe support
in commit e118761c5f
oftree command: refactor

the Kconfig CMD_OFTREE_PROBE was remove

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-11 21:11:25 +01:00
Jean-Christophe PLAGNIOL-VILLARD 6061d3b3cb arm: move outercase to cpu.c as some SoC as the ux500 always need to flush the l2x0
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-11 21:08:24 +01:00
Jean-Christophe PLAGNIOL-VILLARD 489f947086 arm: cache-l2x0 update sync define with Linux 3.5
Drop copy in cache-l2x0

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-11 21:08:24 +01:00
Jean-Christophe PLAGNIOL-VILLARD 19905efac5 arm: add macro cpu_is_xxx
so we can detect

ARM920
ARM926
ARM1176

PXA250
PXA255
PXA270

Cortex-A8
Cortex-A5
Cortex-A7
Cortex-A9
Cortex-A15

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-11 21:01:24 +01:00
Jean-Christophe PLAGNIOL-VILLARD 51d9e037ab clocksource: add ARM AMBA SP804 support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-11 21:01:24 +01:00
Eric Bénard 659712cbf3 mx23-evk: update defconfig
- enable USB gadget and DFU
- enable MCI and probe at boot
- enable EXT4 and FAT filesystems

Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-11 20:58:35 +01:00
Eric Bénard fbe9a322c0 mx23-evk: add USB gadget support
- enable the USB OTG device in gadget mode
- tested on i.MX23 EVH rev B1 with DFU

Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-11 20:58:35 +01:00
Eric Bénard f850d96eb5 mx23-evk: fix MCI support
- this patch fix MCI support and enable using the SDCard to store
the environment.
- it is fully copied from imx23-olinuxino.c
- tested on i.MX23 EVK RevB1

Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-11 20:58:35 +01:00
Michael Grzeschik 43e99fa007 mx28evk: add m25p80 flash via ssp2
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-11 20:58:34 +01:00
Michael Grzeschik 86024a9f70 SPI: Add i.MX 23/28 SPI driver support
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-11 20:58:34 +01:00
Michael Grzeschik a90c32c861 ARM mxs: ssp move to common register layout
This patch moves the register defines and bit definitions
into one include file. As the defines are common for ssp
and mci devices they can be shared.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-11 20:58:34 +01:00
Alexander Aring e0946e79c9 net: fix cpsw depends on ARCH_OMAP
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-11 20:57:34 +01:00
Alexander Aring def73feeec sata-imx: fix depends on ARCH_IMX
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-11 20:57:34 +01:00
Alexander Aring 9d90e219c1 getopt: change optstring to const char*
Change getopt optstring parameter type to const char *.
Also change type to const char * of tmp variable which
pointed to optstring. This will only handle readonly.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-11 20:57:34 +01:00