9
0
Fork 0
Commit Graph

8748 Commits

Author SHA1 Message Date
Sascha Hauer 0a643b3d42 USB i.MX: Add chipidea gadget support
This adds USB gadget support to the i.MX chipidea driver. Basically
we have to add a register function to the fsl udc driver and call
this from the chipidea driver if device mode is selected.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-15 16:19:56 +01:00
Alexander Shiyan f3feb8d4ad Add missing SZ_xx defines
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-15 09:38:54 +01:00
Sascha Hauer 2749fbac48 nor flash: integrate into mtd
CFI Flash is currently handled outside the mtd layer which makes it
a special case. Integrate it into mtd so that we get rid of this
special status.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-14 23:37:53 +01:00
Jean-Christophe PLAGNIOL-VILLARD d8da8c23e9 highbank: use the provided dtb by the firmware to probe barebox device and mem size
the dtb is at 0x1000

if no dtb present use C code device

keep in C the timer/gpio/uart

have a nice tree

barebox 2013.02.0-00294-g6802ddf #124 Wed Feb 13 02:31:01 CST 2013

Board: Calxeda Highbank
memory: ram0: 0xff900000@0x0
highbank: dtb probed memory size
registered netconsole as cs1
malloc space: 0x03500000 -> 0x03efffff (size 10 MiB)
Open /dev/env0 No such file or directory
no valid environment found on /dev/env0. Using default environment
running /env/bin/init...
ahci ffe08000.sata: port 0: SATA link ok
ahci ffe08000.sata: port 0: Spinning up device...
ahci ffe08000.sata: port 0: ok.
ahci ffe08000.sata: registered /dev/ata0
eth0: got preset MAC address: 52:54:00:12:34:56
eth1: got preset MAC address: 52:54:00:12:34:57

Hit any key to stop autoboot:  3
[barebox@Calxeda Highbank]:/
 # devinfo
devices:
`---- platform
     `---- mem0
          `---- 0x00000000-0x3fffffff: /dev/ram0
          `---- 0x00001000-0x00010fff: /dev/dtb
     `---- mem1
          `---- 0x00000000-0x000051af: /dev/defaultenv
     `---- mem2
          `---- 0x00000000-0xfffffffe: /dev/mem
     `---- cs1
     `---- fff10600.timer
     `---- fff10620.watchdog
     `---- fff11000.interrupt-controller
     `---- l2-cache
     `---- ffe08000.sata
          `---- 0x00000000-0x3fffffff: /dev/ata0
          `---- 0x00100000-0x014fffff: /dev/ata0.0
          `---- 0x01500000-0x3fffffff: /dev/ata0.1
     `---- ffe0e000.sdhci
     `---- fff00000.memory-controller
     `---- mem3
     `---- fff3c000.sregs
     `---- fff3c200.sregs
     `---- fff50000.ethernet
          `---- eth0
     `---- fff51000.ethernet
          `---- eth1
`---- amba
     `---- sp804
     `---- uart-pl011
          `---- cs0
     `---- fff30000.gpio
     `---- fff31000.gpio
     `---- fff32000.gpio
     `---- fff33000.gpio
     `---- fff35000.rtc
`---- fs
     `---- ramfs0
     `---- devfs0
`---- net
`---- global

drivers:
uart-pl011
sp804
pl061_gpio
ramfs
devfs
tftp
hb-xgmac
ahci
mem
[barebox@Calxeda Highbank]:/
 #

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 13:09:10 +01:00
Jean-Christophe PLAGNIOL-VILLARD 2a6e668821 highbank: add l2x0 support
not enable as on qemu this generate a undefined instruction exception

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 13:09:09 +01:00
Jean-Christophe PLAGNIOL-VILLARD f6b23059c9 arm: add highbank support
currently only tested under qemu

qemu-system-arm -M highbank -nographic -m 4089 -kernel build/highbank/arch/arm/pbl/zbarebox -tftp "." -drive id=disk,if=ide,file=disk.img -device ide-drive,drive=disk,bus=ide.0

with:
 - timer (AMBA SP804)
 - uart (AMBA PL011)
 - gpio (AMBA PL061)
 - ahci
 - net (XGMAC)

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 13:09:09 +01:00
Sascha Hauer 1bd90ff5a1 mtd: implement mtd_lock and mtd_unlock
Needed for NOR flashes.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-14 10:44:41 +01:00
Sascha Hauer bdd58b17eb mtd: Use mtd_* functions where appropriate
Instead of dereferencing struct mtd_info members directly use
the wrapper functions which have an additional check if the
callback exists if it is optional, like mark_bad or is_bad.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-14 10:38:23 +01:00
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