9
0
Fork 0
Commit Graph

10084 Commits

Author SHA1 Message Date
Sascha Hauer d85c580eeb blspec: Let scan functions return the number of entries found
So that callers can detect whether entries are found or not.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-05 08:37:54 +01:00
Sascha Hauer 6b12fb727e blspec: Allow to boot partitions
Instead of only allowing complete devices we now also allow single
partitions to look for bootloader spec entries.

Normally the bootloader spec defines a way to find a partition containing /boot
on a device.  On embedded systems it's often useful instead to have only a
single partition image which contains both the kernel and the root filesystems.
This partition image may be written to the device multiple times. With this
patch they can be booted with 'boot emmc0.<partno>'

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-05 08:37:54 +01:00
Sascha Hauer a58d8ba424 blspec: rename _hwdevice functions to _devicename
Since it's not necessarily the hardware device this seems to
be a more appropriate name.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-05 08:37:54 +01:00
Sascha Hauer 2f5d04241c blspec: Push device_detect into blspec_scan_device
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-05 08:37:54 +01:00
Sascha Hauer d00ad9572d kernel-install: Add missing error messages
In some cases kernel-install can fail without printing anything. Add
error messages for these cases.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-05 08:37:54 +01:00
Alexander Shiyan 572f03cfb0 USB: i.MX5x: Remove usage of MXC_EHCI_INTERNAL_PHY for OTG port
i.MX5x OTG port is hardwired to the internal UTMI PHY, so having
this configurable makes no sense and helps using this port with DT.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-04 15:06:14 +01:00
张忠山 183e6d8b74 mtd: nand: don't scan bbt if CONFIG_NAND_BBT not set
Signed-off-by: 张忠山 <zzs0213@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-04 09:27:23 +01:00
Jean-Christophe PLAGNIOL-VILLARD 7a305b2d8a bcm2835: move mci register at board level
not all board have a SD card.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-04 09:23:06 +01:00
Sascha Hauer 2fa5f06958 spi: Get bus_num from devicetree
Get the bus_num from devicetree if a "spi" alias exists.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-31 12:53:08 +01:00
Sascha Hauer fb40dd5157 spi: support dynamic bus ids
When probing spi bus masters from devicetree they got a bus_num
of -1. This works with a single bus master only since all bus masters
had the same bus_num. Detect this and dynamically assign a valid
bus_num.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-31 12:53:08 +01:00
Sascha Hauer fd5b82e640 spi: Call spi_of_register_slaves from core
Makes individual handling of OF spi slaves unnecessary in the bus drivers.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-31 12:53:05 +01:00
Lucas Stach 2733d47108 pinctrl: don't allow drivers to be selected by menuconfig user
There is no much sense in having the pinctrl drivers be user selectable
as all arches using on of them already selects the right one.

So to avoid presenting the user with the choice to enable unrelated
pinctrl drivers or pushing lots of dependencies into the Kconfig just
drop the configurability.

Reported-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-31 08:49:57 +01:00
Sascha Hauer 0b58452e13 blspec: Fix crash with menu disabled
blspec->menu is only valid when menu support is enabled. Check for it
before dereferencing the pointer.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-30 11:37:06 +01:00
Alexander Shiyan 77b93d7dfe USB: i.MX: Make DT dr_mode & phy_type parameters kernel compatible
Since the mainline kernel now has its own dr_mode and phy_type DT-options
for setting modes of USB ports, do these kernel parameters compatible by
removing "barebox" prefix.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-30 09:52:42 +01:00
Sascha Hauer 5f0bd3edc2 mtd: m25p80: Allow to specify devicename via devicetree alias
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-29 09:10:27 +01:00
Sascha Hauer d317b1bf85 mtd: Pass device_id to add_mtd_device
Right now we do not support persistent names for mtd devices. The
base name can be passed to add_mtd_device, but this is always appended
with a dynamic number. With this patch add_mtd_device takes a device_id
argument which can be used to create a mtd device with an exact name.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-29 09:10:21 +01:00
Sascha Hauer 865bab0347 mtd: raw: rename raw device
The name of the raw device is mtdraw<num> which is inconsistent to other
mtd devices which are named mtd<num>.<partname>. Rename it to mtd<num>.raw.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-29 09:10:17 +01:00
Sascha Hauer d58d569d0b ARM: i.MX6: Add spi aliases to devicetree
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-29 09:10:01 +01:00
Alexander Shiyan 2b4a1993c7 ARM: i.MX5x: Make IIM driver kernel-compatible
Since kernel uses "imx27-iim" compatible string in i.MX5x DTS templates,
do IIM driver compatible.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-29 08:55:01 +01:00
Eric Bénard 2826ba50ed bcb: fix compilation
this fix :
arch/arm/mach-mxs/bcb.c:268: error: too few arguments to function 'chip->ecc.read_page_raw'
arch/arm/mach-mxs/bcb.c:309: error: too few arguments to function 'chip->write_page'

caution : this is NOT runtime tested.

Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-28 14:15:14 +01:00
Antony Pavlov 597b2a2697 MIPS: qemu-malta: doc: add gxemul documentation
GXemul is another MIPS emulator with Malta board support.
As opposed to qemu GXemul supports only fixed GT64120
YAMON-compatible PCI mapping.

As now barebox uses YAMON-style mapping  we can
use GXemul for barebox run.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-28 09:01:48 +01:00
Antony Pavlov 7b29868f3e MIPS: qemu-malta: use YAMON-style GT64120 memory map
There are some reasons for using YAMON-style memory map:
* we can run Linux kernel from barebox;
* we can use GXemul for running barebox.

YAMON-style GT64120 memory map make move UART to the new position.

The files gt64120.h and mach-gt64120.h are imported from Linux.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-28 09:01:48 +01:00
Antony Pavlov 0ac73f1326 MIPS: qemu-malta: update qemu-malta.dox
Only PBL-enabled barebox-flash-image can correctly
get round BoadrID address (0x1fc00010), so let's
recommend barebox-flash-image.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-28 09:01:48 +01:00
Antony Pavlov 401225a04b MIPS: qemu-malta: don't use BoardID address for executable code
On MIPS Technologies boards 0x1fc00010 address
is reserved for BoardID. The hardware or emulator
intercepts accesses to this address and we can't use
this address for storing code.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-28 09:01:48 +01:00
Antony Pavlov 6f81bcd822 MIPS: qemu-malta: doc: drop broken mips.com link
On 8 February 2013 MIPS Technologies was acquired
by Imagination Technologies. Now the http://www.mips.com/ site
is redirected to http://www.imgtec.com/, the Malta development
board page is unreachable.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-28 09:01:48 +01:00
Markus Pargmann 5d3cb01271 net: phy: Add micrel KSZ8031
KSZ8031 is similar to KSZ8021. It can use the same functions.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-26 10:12:05 +02:00
Jean-Christophe PLAGNIOL-VILLARD a0030a8f91 vexpress: mmc support
qemu-system-arm -m 1024 -smp 1 -M vexpress-a15 -monitor pty -kernel zbarebox -drive if=sd,cache=unsafe,file=sd -nographic -tftp . -net nic -net user

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-22 16:49:48 +02:00
Jean-Christophe PLAGNIOL-VILLARD 4d2d66fe52 add: mmci drivers
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-22 16:49:48 +02:00
Jean-Christophe PLAGNIOL-VILLARD ed78b8dbbc mci: add max_req_size support
Some controller such as the ARM AMBA pl181 can not handle more than 16bits
data length request.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-22 16:49:48 +02:00
Andre Heider 607968f541 ARM: rpi: use the proper ARM memory size
Use the mailbox driver to query the size. This properly takes the
firmware's VideoCore/ARM memory split into account.

Linux can now be booted with more than 128 MiB.

Signed-off-by: Andre Heider <a.heider@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-22 15:28:59 +02:00
Andre Heider db81ebba81 mci: bcm2835: use the registered device clkdev
Switch from local mailbox code to using the newly created clock device.

Signed-off-by: Andre Heider <a.heider@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-22 15:28:59 +02:00
Andre Heider a476255682 ARM: rpi: register a clkdev for the eMMC clock
Use the mailbox driver to query the clock frequency and create
a clkdev for the bcm2835_mci driver.

Signed-off-by: Andre Heider <a.heider@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-22 15:28:59 +02:00
Andre Heider 76cb4002af ARM: bcm2835: add a mailbox driver for VideoCore
This allows exchanging data with the on-SoC GPU.

Based on U-Boot code by Stephen Warren.

Signed-off-by: Andre Heider <a.heider@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-22 15:28:59 +02:00
Andre Heider d841f42664 ARM: bcm2835: register the clocksource device earlier
RPi's mailbox driver is used early and it needs clock functions to
handle timeouts.

Register the driver straight after its clkdev.

Signed-off-by: Andre Heider <a.heider@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-22 15:28:58 +02:00
Andre Heider 233718d8c5 ARM: bcm2835: register the clocksource driver earlier
RPi's mailbox driver is used early and it needs clock functions to
handle timeouts.

Promote to a core_initcall().

Signed-off-by: Andre Heider <a.heider@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-22 15:28:58 +02:00
Andre Heider 4754cc79f6 ARM: bcm2835: cleanup clock registering
Sync exposed names while at it.

Signed-off-by: Andre Heider <a.heider@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-22 15:28:58 +02:00
Andre Heider 55f6869c33 common: add a macro to align an array on the stack
The macro can be used for temporary stack buffers which need to meet
a minimum alignment requirement.

This will be used by bcm2835 mailbox users, where all buffers need to
be aligned.

Signed-off-by: Andre Heider <a.heider@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-22 15:28:58 +02:00
Andre Heider 0fdd91d92b ARM: cache: do not crash when the MMU isn't yet setup
Drivers currently cannot implement explicit cache handling and rely on
running the same code before and after mmu_initcall() without crashing.

Depending on the chosen config options, the cache functions are not yet
setup and using them early on ends in a null pointer dereference.

The RPi's mailbox driver is such a case; it requires cache handling once
the MMU is fully set up and yet the RPi setup needs to use the driver to
get the memory size before mem_initcall() and hence mmu_initcall().

Fix this by checking the cache_fns pointer before dereferencing it.

Signed-off-by: Andre Heider <a.heider@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-22 15:28:58 +02:00
Andre Heider 5611ccb042 ARM: cache: restore cache functions from the PBL
When using CONFIG_MMU_EARLY combined with CONFIG_PBL_IMAGE, the barebox
setup reuses the MMU setup from the PBL, but doesn't setup the cache
functions.

Set these up to guarantee proper early cache handing before mmu_initcall().

Signed-off-by: Andre Heider <a.heider@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-22 15:28:58 +02:00
Alexander Shiyan 377250baea ARM: i.MX51: Update DTS template
Update i.MX51 DT template from kernel.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-22 08:59:48 +02:00
Sascha Hauer 9101c2d02f of: simplify phandle lookup
Instead of populating an extra list containing all phandles just iterate
over the whole tree. This is done as preparation for more dynamic devicetrees
where parts are loaded at runtime. Here we don't want to keep the list of
phandles in sync.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-22 08:55:08 +02:00
Alexander Shiyan 139a88a337 USB: Check init/post_init errors
Host with inoperable ULPI able to bring the system into an
infinite loop. The patch adds error checking during initialization
to avoid this.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-22 08:53:23 +02:00
Alexander Shiyan cf9b0c6927 ubifs: Remove redundant assignment
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-22 08:51:44 +02:00
Alexander Shiyan bbef610b0f gadget: at91: Fix uninitialized variable
Variable udc is used unitialized for DBG(xxx).

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-22 08:51:44 +02:00
Alexander Shiyan 5643fdce0f calloc: Fix possible memory leak
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-22 08:51:44 +02:00
Sascha Hauer 6b8b04c0ab blspec: Fix once/default booting
The default/once files contain the full path to the entries, not
only the filename. This fixes booting the once and default entries.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-21 09:15:45 +02:00
Jean-Christophe PLAGNIOL-VILLARD 0d09ccdf75 fs: bpkfs: add missing include
was not include when applying bpkfs patch

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-21 09:13:51 +02:00
Sascha Hauer 42cb98c6ae fs: ignore O_TRUNC open flag for devices
The O_TRUNC flag has to be ignored when opening devices. Otherwise
cp /somefile /dev/somedev fails. This is broken since:

| commit d4f5bb1e01
| Author: Sascha Hauer <s.hauer@pengutronix.de>
| Date:   Sat Sep 28 13:12:50 2013 +0200
|
|     copy_file: Add missing O_TRUNC
|
|     Without it, when copying a smaller file over a larger file the
|     resulting file still has the remaining space from the larger file.
|
|     Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-16 10:59:25 +02:00
Sascha Hauer 2976617635 ARM: rpi: add SD card environment support
Similar to the OMAP boards mount the SD card to /boot and expect
the environment as /boot/barebox.env

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-16 09:45:31 +02:00
Sascha Hauer 16dd5e5603 ARM: rpi: Update defconfig
Enable MMU, stack dumps and a lot of other features

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-16 09:39:30 +02:00