9
0
Fork 0
Commit Graph

2848 Commits

Author SHA1 Message Date
Sascha Hauer 06b5693bdc Merge branch 'for-next/arm-versatile' 2014-07-04 17:19:40 +02:00
Renaud Barbier c8890e057a mtd: delete partition erase size initialisation
Delete the partition erase size initialisation to let the code
that follows determine the biggest partition erase size.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-03 09:00:06 +02:00
Antony Pavlov daa3e125ab i2c: versatile: add devicetree support
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-23 08:45:55 +02:00
Herve Codina 3ee907d89e mtd: use long long dev param for size
Signed-off-by: Herve Codina <Herve.CODINA@celad.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-13 06:27:34 +02:00
Antony Pavlov 8e89bc594a treewide: remove address of the Free Software Foundation
The FSF address has changed; The FSF site says that
address is

  Free Software Foundation
  51 Franklin Street, Fifth Floor
  Boston, MA 02110-1301
  USA

(see http://www.fsf.org/about/contact/)

Instead of updating it each time the address changes,
just drop it completely treewide.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-11 08:35:25 +02:00
Sascha Hauer 70579ca94f mtd: partition: implement lock/unlock
CFI Nor flashes need lock/unlock which is not implemented for partitions.
Fix this.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-10 13:55:23 +02:00
Sascha Hauer 02fed023e1 mtd: partition: Fix multi eraseregion chips
The current code counts the eraseregions a new partition spans and
sets the partitions number of eraseregions accordingly, but the code
forgets to allocate and fill in the eraseregions for the partition
mtd device. This makes the erase operation crash with a NULL pointer
exception.
This patch fixes this with the same approach the kernel uses: Set
the number of eraseregions to 1 unconditionally and the eraseregion
size to the maximum of the eraseregions found in the partition.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-10 13:52:03 +02:00
Herve Codina d2d058365c mtd: fix mtd erasesize
Set mtd erasize using max erasesize from erase regions

Signed-off-by: Herve Codina <Herve.CODINA@celad.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-10 08:38:39 +02:00
Herve Codina 4d032fd6fa mtd: Fix writesize parameter value
Signed-off-by: Herve Codina <Herve.CODINA@celad.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-10 08:38:21 +02:00
Sascha Hauer 811a79e07e Merge branch 'pu/warnings' 2014-06-06 06:37:09 +02:00
Sascha Hauer 8f8a18906b fix format specifiers
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-05 09:35:31 +02:00
Lucas Stach 35a0081a83 mci: tegra: add Tegra124 compatible
The controller is similar enough to the ones found
on earlier generation SoCs to not need any additional
changes.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-05 08:01:15 +02:00
Lucas Stach dc726ec5b5 clk: tegra: add Tegra124 driver
Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-05 08:01:15 +02:00
Lucas Stach 89b062b430 clk: tegra: don't bug out on zero PLL postdiv
As the real value is 2^p a input value of 0 is
actually valid.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-05 08:01:14 +02:00
Lucas Stach d95bb6f81f clk: tegra: allow variable sized muxes
Tegra124 extended the mux by 1bit to allow for
more PLL sources.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-05 08:01:14 +02:00
Lucas Stach 8d9cbe17d3 pinctrl: tegra: add Tegra124 support
We can reuse the Tegra30 pinctrl driver, as the bit
layout is the same. Just add the pin and drivegroups
and some compile-time magic to avoid bloat.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-05 08:01:14 +02:00
Lucas Stach 6df813a691 pinctrl: tegra30: introduce drvdata
Access pin and drivegroups through a drvdata pointer.
This allows to insert other groups for SoCs with a
similar bit layout easily.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-05 08:01:14 +02:00
Sascha Hauer 0831642edc Merge branch 'for-next/usb' 2014-06-04 21:04:28 +02:00
Sascha Hauer cd667b7468 Merge branch 'for-next/uemd' 2014-06-04 21:04:28 +02:00
Sascha Hauer ad9f56888f Merge branch 'for-next/tegra' 2014-06-04 21:04:28 +02:00
Sascha Hauer 7ccfe4d3a0 Merge branch 'for-next/omap'
Conflicts:
	arch/arm/configs/am335x_beaglebone_defconfig
	arch/arm/configs/am335x_defconfig
2014-06-04 21:04:04 +02:00
Sascha Hauer 73339649ae Merge branch 'for-next/net-of-phy' 2014-06-04 21:03:49 +02:00
Sascha Hauer a3dfea9af8 Merge branch 'for-next/net'
Conflicts:
	drivers/net/dm9k.c
2014-06-04 21:03:45 +02:00
Sascha Hauer 6331e58a2c Merge branch 'for-next/misc'
Conflicts:
	commands/devinfo.c
2014-06-04 21:03:36 +02:00
Sascha Hauer 6ec2780419 Merge branch 'for-next/imx'
Conflicts:
	arch/arm/configs/tx25stk5_defconfig
2014-06-04 21:01:40 +02:00
Sascha Hauer 2d13b034a2 Merge branch 'for-next/doc' 2014-06-04 21:01:16 +02:00
Lucas Stach f20e3eb414 mci: implement non-removable property
There is no need to check the card-detect status
for non-removable devices.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-04 07:21:17 +02:00
Fabio Estevam f20bcf91f6 serial: imx: Fix buggy transmissions when baudrate mismatches
Bit 7 of UCR3 is described in the i.MX reference manuals (with the exception
of i.MX1) as follows:

ADNIMP: Autobaud Detection Not Improved-. Disables new features of
	autobaud detection (See Baud Rate Automatic Detection
	Protocol, for more details).

	0 Autobaud detection new features selected
	1 Keep old autobaud detection mechanism

The "new features" mechanism occasionally causes the receiver to get out of sync
and continuously produces received characters of '0xff'.

In order to reproduce the problem:

$ cs0.baudrate=19200
- Change the terminal baudrate to 19200
- Type in the console and it should look good
- Change the terminal baudrate back to 115200
- Type 'b' in the console, then a stream of '0xff' is transmitted in loop

Setting the ADNIMP bit avoids the transmission of '0xff' in loop.

Also rename the bit definition as per the reference manual.

Tested on mx6q.

Based on a patch from Eric Nelson for U-boot.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-03 08:41:50 +02:00
Holger Schurig 287c03267e devinfo: make the output of "devinfo DEVICE" nicer
* some output sections started with "foo: bar", some with "foo = bar". Unify this.
* there was a fixed size to the "foo =" parameters, which wasn't fitting, this
  was especially visible at "devinfo global"
* don't output "resources:", "driver:" and "bus:" lines if there are none
  resources, drivers or busses involved.
* remove some empty lines
* harmonize differentiation between headlines (e.g. "resources:") and values
  by indenting values slightly
* uppercase some texts

Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-02 09:07:11 +02:00
Antony Pavlov d43c81cd06 clocksource: add uemd clocksource
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-26 17:51:22 +02:00
Sascha Hauer c3f5ce7308 net: phy: micrel: Add support for specifying pad skew values
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-23 15:40:52 +02:00
Sascha Hauer 54bbaafcbd net: phy: micrel: Add kwz9031 support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-23 15:40:51 +02:00
Sascha Hauer 0955253ce1 net: fec_imx: Add devicetree support for mdio bus
The fec has a mdio bus. This adds support for a subnode
in which the phys on this bus can be specified.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-23 15:40:51 +02:00
Sascha Hauer 1607f679da net: phy: genphy: Make it work with of_set_phy_supported
phys start with features initialized from the phy driver
and are eventually limited by of_set_phy_supported. This
does not work with the genphy driver which starts with
no features and overwrites phydev->supported with the
values read from hardware in config_init. This overwrites
the features adjusted by of_set_phy_supported.
To fix this let the genphy driver start with full features
which are then only limited in config_init, but never
extended.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-23 15:40:51 +02:00
Sascha Hauer e2eb6e50f4 net: phy: genphy: always write MII_CTRL1000 when available
the phydev->supported field does not necessarily match the hardware
capabilities, it could be limited by the board to force the phy
to a lower speed. In this case make sure the gigabit advertise bits
are cleared on a gigabit phy.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-23 15:40:51 +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 7240f56d36 net: orion-gbe: use transparent-to-driver of mdio functions
barebox can transparently handle phys specified in the devicetree.
Use this functionality in the orion-gbe driver. This requires:

- add a device to the orion-gbe ports. This has the port device_node
  attached and is set as the parent of the ethernet device so that
  the ethernet code finds the correct device_node
- In the mdio-mvebu driver attach the device_node of the mdio device
  to the miibus device so that the phy code finds the correct node
- call phy_device_connect instead of of_phy_device_connect.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
2014-05-23 15:40:34 +02:00
Sascha Hauer d963d61c2c usb: chipidea i.MX: relax phy_type requirements
Some USB ports only have one possiblitly for the phy_type and
the type is not specified in the devicetree in this case.
Rely on the reset default instead of failing.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-22 09:11:36 +02:00
Sascha Hauer d384b5639f of: Drop devicetree merge support
I assume I am the only person knowing that barebox is able to
merge devicetrees. This feature seems broken for a while now since
trying to merge devicetress results in:

unflatten: too many end nodes

Remove this feature to save the complexity.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-22 08:09:13 +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
Sascha Hauer d4d9fc125f net: fec_imx: check return value of registration functions
We do not care about releasing the resources in the error
path, but at least check the return value of eth_register
and mdiobus_register.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-21 14:40:56 +02:00
Sascha Hauer d4f202f30e net: fec_imx: mask mii register reads correctly
mii registers are 16bit wide, so mask out the higher bits.
The higher bits confuse mii-tool.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-21 14:40:52 +02:00
Sascha Hauer 9cbfe615f9 net: phy: Support finding a phy in the devicetree
When the ethernet device has a device_node then try finding
the associated phy via the phy-handle property.

This makes the phy handling via devicetree transparent to the
ethernet drivers.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-21 14:10:44 +02:00
Sascha Hauer 9b259eb3fd net: phy: register phys specified in devicetree
When a mdio bus has a device node attached then register the phys
specified there. This makes it possible to lookup the phys using
phandles later.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-21 14:10:39 +02:00
Sascha Hauer b90dc18054 net: phy: move setting of phy_map to phy_register_device
The phy_map should be valid once a phy_device is registered. This
allows registering phys outside of mdiobus_scan.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-21 14:10:35 +02:00
Sascha Hauer 3fcb734639 net: phy: factor out phy_device_attach function
phy_device_connect combines searching for a phy with actually attaching
it to the ethernet device. Factor out a phy_device_attach function to
have a function for each purpose. This makes the logic of phy_device_connect
simpler.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-21 14:10:29 +02:00
Beniamino Galvani 15b0abce26 net: arc_emac: disable interrupts
The driver doesn't use interrupts and Linux driver crashes when emac
interrupts are enabled at boot: keep them disabled.

Signed-off-by: Beniamino Galvani <b.galvani@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-20 07:44:42 +02:00
Beniamino Galvani b158af4f08 net: arc_emac: remove delay from mdio polling loop
Avoid unneeded delay when waiting for the completion of a mdio
operation and return as soon as possible.

Signed-off-by: Beniamino Galvani <b.galvani@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-20 07:44:41 +02:00
Sascha Hauer 50147cd34d mtd: nand: mxs: Fix 2k nand with oob size of 224 bytes
The mxs nand driver has a calculation for the ecc strength.
This calculation was not used for some common nands and it
was assumed that 2k page nands always have a ecc strength
of 8. This is not true since there are devices with 224 bytes
of oob instread of 64 bytes. These allow for a greater ecc
strength. Since the kernel relies on the calculation and
we have to be consistent with the kernel use the calculcation
in barebox aswell and just remove our assumptions.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-20 07:36:03 +02:00
Michael Olbrich f104f55c04 net: dm9k: only read on packet for each call to dm9k_eth_rx()
Some users such as fs/nfs.c just save the pointer to the packet in the
handler and process it after net_poll() returns. This break when more than
one packet is received using the same buffer.

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-19 09:38:43 +02:00