9
0
Fork 0
Commit Graph

347 Commits

Author SHA1 Message Date
Sascha Hauer 052d9ac0cf blspec: automatically append bootargs
When bootloader spec is used to boot devices it is often desirable
to boot the same image from different media. Since the fs images
need to contain the root= parameters to tell Linux where to boot
from the images can't be identical on different media.

This patch changes this by introducing a 'appendroot' option for
bootloader spec. If set to true, barebox will construct a Linux
commandline option for the device the bootloader spec entry is found
on.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-06-13 14:35:03 +02:00
Sascha Hauer 9c4cf7d3b6 Merge branch 'for-next/pci' 2015-04-13 12:57:13 +02:00
Lucas Stach da440ab859 pci: make sure to activate devices on the root bus
Commit b8a1bb1dd2 (pci: defer device registration until after bridge setup)
changed the activation order of devices, so that bridges above the devices could
be configured properly before activating the devices below. This commit failed
to acknowledge that there may be devices located directly on the root bus without
any bridge in between and so those devices would never get enabled.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
2015-04-13 08:34:28 +02:00
Sascha Hauer 025362e2cc pci: pci_regs.h: Sync with Linux
Sync the pci register definitions with Linux 4.0-rc1. Some are needed
for the upcoming designware pcie driver.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-17 07:29:55 +01:00
Sascha Hauer 5dd5884801 lib: Add hex2bin and bin2hex implementations
Taken from the Kernel, put into the same place as in the kernel,
although the hexdump.c does not actually contain hexdum functions.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-13 08:22:27 +01:00
Sascha Hauer 55ab01c7ff Merge branch 'for-next/rockchip'
Conflicts:
	arch/arm/Kconfig
2015-03-09 08:30:35 +01:00
Andrey Panov 919d4651ce CLK: Add helper defines to barebox-wrapper.h for easier porting of drivers from Linux kernel
Signed-off-by: Andrey Panov <rockford@yandex.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-05 09:11:34 +01:00
Andrey Panov e3459c10ab CLK: clk-divider: Respect CLK_DIVIDER_POWER_OF_TWO flag
Signed-off-by: Andrey Panov <rockford@yandex.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-05 09:11:34 +01:00
Andrey Panov 5a3a479dae CLK: clk-divider: Introduce clk_divider_alloc() and *_free() routines
Signed-off-by: Andrey Panov <rockford@yandex.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-05 09:11:34 +01:00
Andrey Panov 9e3ce4eee6 CLK: clk-divider: Respect CLK_DIVIDER_HIWORD_MASK flag
It is required for Rockchip SoCs where clock settings registers have
write-enable mask in high word.

Signed-off-by: Andrey Panov <rockford@yandex.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-05 09:11:34 +01:00
Andrey Panov 7baf7df9fd CLK: clk-mux: Respect CLK_MUX_HIWORD_MASK flag
It is required for Rockchip SoCs where clock settings registers have
write-enable mask in high word.

Signed-off-by: Andrey Panov <rockford@yandex.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-05 09:11:34 +01:00
Andrey Panov 22a0c31c92 CLK: Add fractional divider clock support from Linux kernel
Signed-off-by: Andrey Panov <rockford@yandex.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-05 09:11:33 +01:00
Andrey Panov 9eb9f00043 CLK: Add support for composite clock from Linux kernel
Signed-off-by: Andrey Panov <rockford@yandex.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-05 09:11:33 +01:00
Andrey Panov 78d030226d lib: Add gcd() function
It calculates greatest common divisor.

Signed-off-by: Andrey Panov <rockford@yandex.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-05 09:11:33 +01:00
Sascha Hauer ed440360e6 mtd: fixup device tree partitions
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-02-12 09:33:44 +01:00
Sascha Hauer 99bed34278 mtd: Add partitions to list
So that we can iterate over the existing partitions from the master
mtd device.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-02-12 09:33:43 +01:00
Sascha Hauer 91d4a4264b Merge branch 'for-next/minmax' 2015-02-04 19:09:15 +01:00
Masahiro Yamada 41be004e8d linux/kernel.h: move some macros and prototypes
The include/common.h is still cluttered (although much better than
U-Boot).  It contains various utility macros that originates
in Linux.  Move them to the original place, include/linux/kernel.h,
to slim down include/common.h.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-29 08:48:30 +01:00
Masahiro Yamada 8960b0ff81 asm-generic/bug.h: move BUG(), BUG_ON(), WARN(), WARN_ON() macros
In Linux, these macros are defined in include/asm-generic/bug.h.
To tidy up common.h, move BUG(), BUG_ON(), WARN(), WARN_ON() there.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-29 08:48:30 +01:00
Masahiro Yamada a07a472cac linux/bug.h: move BUILD_BUG_ON*() macros
In Linux, the macros BUILD_BUG_ON* are defined in include/linux/bug.h.
To tidy up common.h, move BUILD_BUG_* there.

MAYBE_BUILD_BUG_ON is not used in barebox and it was removed from Linux
long time ago.  Drop it from barebox, too.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-29 08:48:30 +01:00
Stefan Christ a114e9b00c ARM: i.MX6: use generic calculation in nand bbu handler
The parameters ECC Strength, BadBlockMarkerByte and BadBlockMarkerStartBit in
the FCB structure depends on the nand chip's pagesize and oobsize. Instead of
hardcoding these values into the imx6 bbu handler calculate these values on the
fly. Therefore we export the necessary functions from the nand_mxs driver to
use them in the bbu handler.

Signed-off-by: Stefan Christ <s.christ@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-29 07:58:00 +01:00
Masahiro Yamada bfa1b12fed linux/kernel.h: add more *_MAX, *_MIN macros
Imported from Linux 3.19-rc5.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-21 14:58:07 +01:00
Masahiro Yamada d27077bd76 linux/kernel.h: rename USHORT_MAX, SHORT_MAX, SHORT_MIN
Linux uses SHRT_* instead of SHORT_*.  The <limits.h> of C does
the same.  Let's follow this standard.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-21 14:58:07 +01:00
Masahiro Yamada 2ce9068d85 linux/kernel.h: move *_MAX, *_MIN macros
Linux defines *_MAX, *_MIN macros in include/linux/kernel.h.
Let's follow this way to slim down the common.h.

This change should have no impact because include/common.h already
includes <linux/kernel.h>.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-21 14:58:07 +01:00
Masahiro Yamada 11f588be31 sizes.h: sync with Linux 3.19-rc3
Looks like I am also highly addicted to Linux...

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-08 14:00:34 +01:00
Masahiro Yamada d8753571b2 sizes.h: move include/sizes.h to include/linux/sizes.h
This file originates in Linux.  Linux has it under include/linux/
directory since commit dccd2304cc90.
Let's move it to the same place as well in barebox.

This commit was generated by the following commands:

  find -name '*.[chS]' | xargs sed -i -e 's:<sizes.h>:<linux/sizes.h>:'
  git mv include/sizes.h include/linux/

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-08 14:00:26 +01:00
Sascha Hauer d3933bd350 Merge branch 'for-next/marvell' 2014-12-08 14:53:59 +01:00
Lucas Stach 93b7459e1c lib: decompress_xz: fix function header to match prototype
Fixes:
lib/uncompress.c:124:10: warning: assignment from incompatible pointer type

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-24 14:04:11 +01:00
Ezequiel Garcia 2caa4bbdcc net: phy: Support Marvell 88EE1543 PHY
This commit adds support for Marvell's 88E1543 PHY chip. This chip is
almost identical to the 88EE1545, except the 88E1545 supports QSGMII
and the 88EE1543 supports SGMII.

Therefore, the same configuration function is used for both PHYs. For now,
the only initialization provided for the 88EE1543 is the LED setup.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-11 14:59:43 +01:00
Ezequiel Garcia 9a026a2efa net: phy: Support Marvell 88EE1545 PHY
This commit adds support for Marvell's 88E1545 PHY chip. In particular, this
allows to support QSGMII interfaces.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-11 14:59:43 +01:00
Sascha Hauer 592d35a47c Merge branch 'for-next/xz' 2014-11-05 15:47:39 +01:00
Sascha Hauer ccb2816477 Add xz decompression support
This adds xz decompression support from the kernel. Both compressing
the barebox binary with xz and decompressing xz files on the commandline
is supported.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-04 12:18:55 +01:00
Lucas Stach 9d1fbc5d12 add generic PHY framework
This brings in the generix PHY framework from Linux.
I tried to strip it down as much as possible while
keeping it useful.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-04 09:50:44 +01:00
Lucas Stach 490d4fe417 pci: track parent<->child relationship
So that PCI devices hang down from bridges and root
bridges down from the PCI host controller when
calling devinfo.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-10-08 08:39:01 +02:00
Lucas Stach 687ceb7716 pci: setup bridges and traverse buses behind them
Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-10-08 08:39:01 +02:00
Lucas Stach beb6469992 pci: properly populate prefetchable BARs
Some host controllers provide a prefetchable
memory area and devices will prefer this for
some of their BARs.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-10-08 08:39:01 +02:00
Lucas Stach 06ac5b551e pci: add resource enum
Makes things way clearer than juggling numbers.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-10-08 08:39:00 +02:00
Sascha Hauer 815288c598 Merge branch 'for-next/net-phy' 2014-10-02 08:54:42 +02:00
Sascha Hauer a65334019b Merge branch 'for-next/musb' 2014-10-02 08:54:42 +02:00
Sascha Hauer 0846940668 Merge branch 'for-next/marvell' 2014-10-02 08:54:41 +02:00
Sascha Hauer 6850ccff66 USB: MUSB: Add barebox specific changes
This changes the MUSB support from the original Kernel state to
be usable with barebox. Tested on a custom board and the Beaglebone
Black. The host port on the Beaglebone works, the OTG port works
in device mode, but not yet in host mode.

Based on the initial MUSB port from Rolf Evers Fischer.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-26 21:36:58 +02:00
Sebastian Hesselbarth 561dfebb4b ARM: mvebu: Add machine compatible to mbus ranges
Multi-SoC support for MVEBU will add mbus ranges for all compiled
SoCs. To protect the mbus node of the SoC barebox is executed on
from others ranges, pass machine's compatible to mvebu_mbus_add_range
and check before applying the fixup.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-19 09:47:35 +02:00
Sascha Hauer e209158d5a net: phy: introduce phy_aneg_done
phy_wait_aneg_done() is directly called by the network code, so it
should not read phy registers directly. Introduce phy_aneg_done to
give phy drivers the chance to do something different to poll for
autonegotiation completion.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-17 15:12:56 +02:00
Lucas Stach 1dbf849de7 phy: marvell: move IDs to own header
So they can be used in board files to register
fixups.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-17 11:16:44 +02:00
Sascha Hauer 45615e3ec1 Merge branch 'for-next/usb-host'
Conflicts:
	drivers/usb/core/Makefile
2014-08-07 20:34:39 +02:00
Sascha Hauer 9cce00617b Merge branch 'for-next/rtc'
Conflicts:
	arch/mips/dts/jz4755.dtsi
	commands/Makefile
2014-08-07 13:13:45 +02:00
Sascha Hauer 80779337ef Merge branch 'for-next/net' 2014-08-07 13:13:35 +02:00
Sascha Hauer 38c3b2455e Merge branch 'for-next/misc'
Conflicts:
	lib/Makefile
2014-08-07 13:13:31 +02:00
Sascha Hauer f1ee4e8b73 Merge branch 'for-next/marvell' 2014-08-07 06:14:59 +02:00
Antony Pavlov 287e085fa9 rtc-lib: import rtc_time_to_tm() from linux-3.15
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-08-02 06:45:43 +02:00