9
0
Fork 0
Commit Graph

284 Commits

Author SHA1 Message Date
Sascha Hauer 45d593bc5e Merge branch 'for-next/mips' 2014-07-04 17:26:05 +02:00
Antony Pavlov a7c925bf03 net: add RealTek RTL-8139 PCI Ethernet driver
This driver is based on Linux 2.6.39 8139too driver.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-04 07:35:47 +02:00
Antony Pavlov 7420866543 PCI: initial commit
used shorten version of linux-2.6.39 pci_ids.h

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-04 07:35:47 +02:00
Antony Pavlov e829b7c0c8 linux/ioport.h: include missed <linux/list.h>
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-04 07:35:47 +02:00
Sascha Hauer 98360be0fe Documentation: remove doxygen documentation
The doxygen documentation is long outdated. Remove it. It will
be replaced with sphinx based documentation later.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-26 10:09:52 +02:00
Sascha Hauer ad9f56888f Merge branch 'for-next/tegra' 2014-06-04 21:04:28 +02:00
Sascha Hauer 75635f6926 net: phy: remove now unused of_phy_device_connect
Since barebox handles phys from devicetree transparently we no longer
need of_phy_device_connect.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-23 15:40:51 +02:00
Sascha Hauer 4778c7da37 net: phy: Support limiting phy speed in the devicetree
Even when both the ethernet controller and the phy support certain
features a board may have additional limitations. Allow specifying
it in the devicetree.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-21 14:42:17 +02:00
Lucas Stach 45b95b50cd reset: add reset controller framework
Add stripped sown version of the reset controller
framework from the Linux kernel.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-15 14:17:11 +02:00
Sascha Hauer cdfca5dccb Merge branch 'for-next/rockchip' 2014-05-05 13:33:09 +02:00
Sascha Hauer f8327af20c Merge branch 'for-next/ioresource' 2014-05-05 11:05:51 +02:00
Beniamino Galvani 298ecc5860 clk: gate: add CLK_GATE_HIWORD_MASK flag
Clock gates having the CLK_GATE_HIWORD_MASK flag set use the upper 16
bits of the register as a "write enable" mask for the value in the
lower 16 bits.

Signed-off-by: Beniamino Galvani <b.galvani@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-04-29 08:15:24 +02:00
Beniamino Galvani 32a2a673c6 clk: gate: add flags argument to clock gate constructor
This adds a clk_gate_flags argument to clock gate creation functions
to allow the introduction of new clock gate modifiers.

Signed-off-by: Beniamino Galvani <b.galvani@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-04-29 08:15:24 +02:00
Antony Pavlov a210138078 clk: move of_clk_get_parent_name() to common clk code
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-04-29 08:11:24 +02:00
Sascha Hauer 1a8800458b mtd: nand: create bb devices automatically
When a mtd device can have bad blocks we want to create a
bb device, so do this automatically. This allows us to
drop bb device creation from the environment.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-04-28 11:45:09 +02:00
Michel Stam 4d94f56c6c common: Allow for I/O mapped I/O
Rework the current framework so that I/O mapped I/O resources are
also possible.

Signed-off-by: Michel Stam <michel@reverze.net>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-04-08 08:17:55 +02:00
Sascha Hauer 149e9d8121 Merge branch 'for-next/mtd' 2014-04-04 10:06:22 +02:00
Sascha Hauer 712b555f6c Merge branch 'for-next/davinci' 2014-04-04 10:06:14 +02:00
Sascha Hauer 1184234a5e clk: Add parent round/set rate for mux and gate
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-03-28 21:03:15 +01:00
Sascha Hauer d4aaca3647 clk: clk-divider: sync with kernel code
This updates the clk-divider to Kernel code, but without power-of-two
divider support which we do not need yet. This also adds table based
divider support to the divider.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-03-28 21:03:14 +01:00
Sascha Hauer 503cc1518e clk: introduce CLK_SET_RATE_PARENT flag
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-03-28 21:03:14 +01:00
Sascha Hauer 3e9a71f78d clk: clk-divider: pass flags to initializers
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-03-28 21:03:14 +01:00
Sascha Hauer 82163afcf0 clk: clk-fixed-factor: pass flags to initializers
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-03-28 21:03:14 +01:00
Sascha Hauer f4c7536514 clk: clk-gate: pass flags to initializers
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-03-28 21:03:02 +01:00
Sascha Hauer b33e5ba246 clk: clk-mux: pass clk flags from initializers
struct clk has a flags field, let the clk-mux initializers set this
field.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-03-28 10:51:30 +01:00
Sascha Hauer b657881071 err.h: Add PTR_ERR_OR_ZERO from kernel
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-03-28 08:45:10 +01:00
Antony Pavlov 74f0803993 import _AC and UL macros from linux kernel
This macros are used in exported from linux TI DaVinci code.
Also this macros are used in MIPS cache support code.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-03-18 17:28:11 +01:00
Dmitry Lavnikevich 76a88c0227 mtd: Support for 4GB partitions
This patch implements correct way of creating partitions on mtd
devices with size >= 4GB.

Signed-off-by: Dmitry Lavnikevich <d.lavnikevich@sam-solutions.com>
Signed-off-by: Grigory Milev <g.milev@sam-solutions.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-03-12 21:26:37 +01:00
Dmitry Lavnikevich 1ee640765a mtd: Update internal API to support 64-bit device size
MTD internal API presently uses 32-bit values to represent device
size. This patch updates them to 64-bits but leaves the external API
unchanged.

In general, changing from 32-bit to 64-bit values cause little
or no changes to the majority of the code with the following
exceptions:
  - printk message formats;
  - division and modulus of 64-bit values (mtd_div_by_wb,
    mtd_div_by_eb may be used in some of such cases).

Was tested on phyFLEX i.MX6.

Signed-off-by: Dmitry Lavnikevich <d.lavnikevich@sam-solutions.com>
Signed-off-by: Grigory Milev <g.milev@sam-solutions.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-03-12 21:26:37 +01:00
Sascha Hauer e358922a74 Merge branch 'for-next/mtd'
Conflicts:
	drivers/mtd/core.c
	net/eth.c
2014-03-07 09:25:18 +01:00
Sascha Hauer 2331b1d8e8 Merge branch 'for-next/marvell'
Conflicts:
	arch/arm/dts/Makefile
2014-03-07 09:25:02 +01:00
Sascha Hauer 49d9b9bea7 mtd: nand: disable subpage reads
The default nand_read_subpage implementation returns -ENOSUPP, so we have
to make sure that barebox never uses this implementation. By setting the
NAND_SUBPAGE_READ flag to 0x0 we ensure NAND_HAS_SUBPAGE_READ() never returns
true and also give the compiler a chance to optimize away some unused code.

subpage reads are a rather exotic feature even in Linux. It is only used on
largepage NANDs with soft ecc. Even if we have this case it needs non page
aligned reads to actually profit from this feature.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Hattink, Tjalling [FINT] <T.Hattink@fugro.nl>
2014-03-03 08:45:32 +01:00
Sascha Hauer 29ea8bcd94 mtd: Simplify partitions
Embed the partition information in struct mtd_info. This makes the
mtd partition code simpler.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-13 19:39:08 +01:00
Sebastian Hesselbarth 695060fb1a bus: mvebu: add mbus driver
This imports the Marvell mbus driver from Linux. The mbus is the
main downstream bus found on all Marvell Orion SoCs. The driver
deals with re-configurable address windows which are currently
parsed from DT. Also enable the driver as default on all MVEBU
SoCs. While at it, also reorder drivers/bus/{Kconfig,Makefile}
alphabetically.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-10 09:08:51 +01:00
Sebastian Hesselbarth 29af281cb1 net: phy: add of_phy_device_connect
This implements a of_phy_device_connect to allow DT enabled drivers
to connect to a PHY device by using the PHY's DT node only. It
currently assumes that each PHY node is a child of the corresponding
mdio bus.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-10 09:08:51 +01:00
Sascha Hauer 601bf0fcc6 Merge branch 'for-next/misc' 2014-02-03 09:55:54 +01:00
Sascha Hauer c1c2e56fb3 net: phy: Add static inline wrapper for phy_register_fixup_for_uid
Boards register a fixup for a phy without checking if phy support
is enabled. To fix compilation without phy support add a static
inline wrapper for phy_register_fixup_for_uid.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-27 09:27:04 +01:00
Sascha Hauer f1025bbf32 list: add list_first_entry_or_null()
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-10 11:52:04 +01:00
Sascha Hauer c56fdbbc37 Merge branch 'for-next/miiphy' 2014-01-07 11:57:51 +01:00
Antony Pavlov 8ffd4f8c74 miitool: change behaviour closer to linux' mii-tool
miitool without arguments will try to show status for all phys.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-06 09:42:29 +01:00
Sascha Hauer d7fe5e2263 mtd: Add subpagesize to mtd_info_user
ubiformat needs the subpagesize to work correctly. The kernel uses
sysfs to pass the subpagesize, but in barebox we have the possibility
to extend struct mtd_info_user. Add a corresponding field and use it
in ubiformat.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-12-20 15:04:30 +01:00
Sascha Hauer 6cb2b2f29f net: phy: implement detect callback for miibus devices
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-12-11 12:33:05 +01:00
Sascha Hauer bfc9a6985c net: phy: Track mii buses on a list
To be able to iterate over registered mii buses

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-12-11 12:32:20 +01:00
Sascha Hauer 33790253da net: phy: track registered state of a phy device
With this phy_device_connect only registers a phy device if it wasn't
registered already. This allows us to register phy devices outside
of ethernet drivers. phy_device_connect will now pick up an already
registered phy given that it's not attached to another ethernet device.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-12-11 10:58:02 +01:00
Sascha Hauer 58f9167a04 net: phy: bail out early in phy_device_connect
If an ethernet device already has a phy in phy_device_connect all we
have to do is to start autonegotiation. Do this early and bail out
so that for the rest of the code it's clear that we have to search for
a phy device.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-12-11 10:46:50 +01:00
Sascha Hauer e9ea6eeaab Merge branch 'for-next/misc'
Conflicts:
	scripts/Makefile
2013-12-06 08:23:24 +01:00
Sascha Hauer 18aa86831e Merge branch 'for-next/mips' 2013-12-06 08:22:48 +01:00
Antony Pavlov ddac4f3ea2 MIPS: add asm-offsets.h generation
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-12-04 17:01:11 +01:00
Sebastian Hesselbarth feb1e38b43 clk: add of_clk_init and CLK_OF_DECLARE macro
This add barebox versions of of_clk_init for parsing and registering
clock providers from DT. Also, a macro CLK_OF_DECLARE is added, that
allows to put init callbacks into its own section that can be linked
in the binary.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-11 09:26:59 +01:00
Sascha Hauer b67b2671c2 treewide: Add missing includes
A lot of files rely on include/driver.h including include/of.h (and
this including include/errno.h. include the files explicitly so we can
eventually get rid of including of.h from driver.h

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-08 15:42:04 +01:00