9
0
Fork 0
Commit Graph

1521 Commits

Author SHA1 Message Date
Jan Luebbe 419ae85d44 davinci_emac: adjust to new phylib framework
Also pass flags using platform_data and remove useless casts from void*.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-29 12:58:12 +02:00
Jan Luebbe 76c4c9e48f davinci_emac: return 0 on successful transmit
The _send function should not return the length of the transmitted packet.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-29 12:57:59 +02:00
Sascha Hauer 0dc9de2efd net/eth: fix link handling
Check link status on eth device open time and then periodically
every 5 seconds.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-27 23:55:12 +02:00
Jean-Christophe PLAGNIOL-VILLARD 2263e27814 net: introduce phylib
Adapt phylib from linux

switch all the driver to it
reimplement mii bus

This will allow to have
 - phy drivers
 - to only connect the phy at then opening of the device
 - if the phy is not ready or not up fail on open

Same behaviour as in linux and will allow to share code and simplify porting.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-09-25 08:18:58 +02:00
Sascha Hauer 26eab97b41 net fec_mpc5200: Use same platform_data as i.MX fec driver
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-23 20:35:20 +02:00
Jan Luebbe 13e657f712 drivers/net: add driver for the EMAC device found in some TI SoCs
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-17 10:54:50 +02:00
Eric Bénard 79101c609c miidev: fix 1G wrong detection
since 99e72c8bbd on an i.MX51 based board,
I get : "phy0: Link is up - 1000/Full". It seems miidev tries to probe
the PHY to early and gets 0x3ffff which leads to the wrong capabilities
setting.

Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-14 09:03:03 +02:00
Jean-Christophe PLAGNIOL-VILLARD 8b3bf5971a tap: fix missing parent setting on eth_device
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-12 17:26:26 +02:00
Jan Weitzel a685c02ebf smsc911x: Check platformdata pointer
If pdata is NULL smc911x_probe will crash. Checking the zero initialized
priv->shift results in default configuration if pdata is not set.

Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-10 18:06:21 +02:00
Jean-Christophe PLAGNIOL-VILLARD 0c4ea17225 smc911x: fix typo pn check if the device is ready before using it
the check need to be inverted

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-10 08:26:24 +02:00
Jan Luebbe 0223c3a149 mtd/mtdraw: fix format specifier for ssize_t
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-07 12:23:41 +02:00
Jan Luebbe d17aed1a07 mtd: use correct format specifier
For the size_t type the format specifier %zu or %zx must be used.
See Documentation/printk-formats.txt in the kernel for details.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-07 12:23:26 +02:00
Sascha Hauer f77269a819 Merge branch 'for-next/usb' 2012-09-05 12:59:59 +02:00
Sascha Hauer 40830caf4e Merge branch 'for-next/smc911x' 2012-09-05 12:59:59 +02:00
Sascha Hauer 6662e16dbb Merge branch 'for-next/ppc'
Conflicts:
	arch/ppc/boards/freescale-p2020rdb/p2020rdb.c
	arch/ppc/configs/p2020rdb_defconfig
	arch/ppc/mach-mpc85xx/include/mach/immap_85xx.h
2012-09-05 12:59:54 +02:00
Sascha Hauer bed1a6ffab Merge branch 'for-next/pbl' 2012-09-05 12:59:29 +02:00
Sascha Hauer b40aeb00d3 Merge branch 'for-next/omap' 2012-09-05 12:59:29 +02:00
Sascha Hauer 6cb993c0cd Merge branch 'for-next/mtd' 2012-09-05 12:59:29 +02:00
Sascha Hauer d7257236a7 Merge branch 'for-next/misc' 2012-09-05 12:59:29 +02:00
Sascha Hauer 2c8c801c67 Merge branch 'for-next/mc13xxx' 2012-09-05 12:59:29 +02:00
Sascha Hauer 62b665b644 Merge branch 'for-next/jtag' 2012-09-05 12:59:29 +02:00
Sascha Hauer 9196d727ad Merge branch 'for-next/imx' 2012-09-05 12:59:29 +02:00
Sascha Hauer 038307cb5e Merge branch 'for-next/i2c' 2012-09-05 12:59:29 +02:00
Steffen Trumtrar 61caefcf25 gpio: add driver for stmpe io-expander
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-05 11:51:50 +02:00
Steffen Trumtrar 054cef284e mfd: add stmpe-i2c driver
The stmpe mfds can be connected via i2c and spi. This driver provides the basic
infrastructure for the i2c kind. It can be added as a normal i2c-device in the
board code. To enable functions a platform_data struct has to be provided, that
describes what parts of the chip are to be used.

Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-05 11:48:16 +02:00
Sascha Hauer b395e8bfb0 ARM i.MX: switch to gpiolib support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
2012-09-04 21:01:05 +02:00
Renaud Barbier f8e0d68214 i2c: adapt the i2c-imx driver to mpc85xx machines
A function to calculate the frequency divider and digital filter sampling rate
for the 85xx processors is added to the i2c-imx driver. Hence, this driver is
usable on IMX and 85xx machines.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-04 11:16:48 +02:00
Renaud Barbier b977801ac1 IMX driver: replace imx -> fsl
The IMX i2c driver is to be used by SOCs on both the ARM and PPC architetures.
Use a more neutral name for the structure, function names and #define.
The driver name is now "i2c-fsl".

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-04 11:16:48 +02:00
Alexander Shiyan 7b6529354d mc13xxx: Fixed memory leak
A string allocated by asprintf is not freed, so change it to a sprintf
with the preallocated buffer.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-04 08:49:54 +02:00
Alexander Shiyan fe0545bbb0 mc13xxx: Hide private struct mc13xxx from other units
Board support units must use only the provided functions.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-04 08:49:54 +02:00
Sascha Hauer 2f8fe26382 add gpiolib support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
2012-09-04 08:26:49 +02:00
Alexander Aring 83f311a9bb mtd: add private data to mtddev-hook
The mtdoob and mtdraw device don't clean up correctly.
Added a private data element to hold allocated memory.
Fix remove of mtdoob and mtdraw device.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-03 11:06:01 +02:00
Alexander Aring 06e5a6a5ca mtd: fix compiler warnings
Fix some compiler warnings.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-03 11:06:01 +02:00
Jean-Christophe PLAGNIOL-VILLARD bfcd63fdc4 smc911x: check if the device is ready before using it
poll the READY bit in PMT_CTRL. Any other access to the device is
forbidden while this bit isn't set. Try for 100ms

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-03 09:49:06 +02:00
Jean-Christophe PLAGNIOL-VILLARD da9ef64678 smc911x: update chip detection
Use linux kernel chip detection from 3.5

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-03 09:49:06 +02:00
Jean-Christophe PLAGNIOL-VILLARD fb11747bfe smc911x: improve detection handle
detect if the bus is swapped and report a 32bit drivers is used on a 16bit bus

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-03 09:49:06 +02:00
Jean-Christophe PLAGNIOL-VILLARD 655dc6b8aa smc911x: add support to pass the shift via platform data
switch ipe337: to it at the same time to do not brake it

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-03 09:49:06 +02:00
Jean-Christophe PLAGNIOL-VILLARD 75880ac0ad smc911x: add 16bit bus width support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-03 09:49:06 +02:00
Jean-Christophe PLAGNIOL-VILLARD 187c55fdde smc911x: introduce read/write ops
This will allow to replace them depending on the platform data.
So we can specify shift and reg io witdh (16bit/32bit)

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-03 09:49:06 +02:00
Jean-Christophe PLAGNIOL-VILLARD c3ec0b08bf smc911x: move register define to smc911x.h
this make the driver more readable

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-03 09:49:06 +02:00
Wolfram Sang b732f178b7 net: miidev: really wait for auto negotiation
miidev_wait_aneg() polled the wrong bit, so link detection did fail on
boards where the PHY had to come out of a powerdown mode.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-03 09:43:59 +02:00
Steffen Trumtrar 7212fa7d42 usb: use ep-specific pwrgood delay
In usb_hub_configure the hub is asked for its descriptor and among other things
its bPwrOn2PwrGood time. In the actual hub_power_on function this information
was not used and a hardcoded value was used instead. For some hubs this delay
is to short. So, use the delay the hub wants.

Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-31 09:28:44 +02:00
Steffen Trumtrar af23372773 trivial: fix spelling in usb code
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-31 09:26:39 +02:00
Eric Bénard 00dfde2742 m25p80: wait for flash before returning after erase
else when we do "erase /dev/m25p0.rootfs; reset", the board
will never reboot as the flash is busy to finish the erase
command.

Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-29 09:03:18 +02:00
Eric Bénard ae22e4f2f9 i.MX35: add cspi1 support
tested with a m25p128 flash both in nand boot & spi boot.

Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-29 09:00:22 +02:00
Wjatscheslaw Stoljarski 082ee53440 Add JTAG bitbang driver
Signed-off-by: Wjatscheslaw Stoljarski <wjatscheslaw.stoljarski@kiwigrid.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-13 21:38:50 +02:00
Sascha Hauer 95423f8af2 ARM boards: Make boards pbl safe
With pbl support enabled most boards need a pbl-y for their lowlevel
stuff.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-08-12 22:23:22 +02:00
Sascha Hauer 6478566b2d ARM s3c boards: Do not hardcode image sizes
The existing nand_boot functions all do the same, so move it to
a common place. To be flexible enough for future boards the real
image size is used instead of hardcoded 256k.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Juergen Beisert <jbe@pengutronix.de>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-08-12 22:23:12 +02:00
Renaud Barbier caf788ae5a net: GIANFAR driver
This update adds the GIANFAR driver along with the configuration
and build files.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-10 21:15:36 +02:00
Alexander Shiyan e377a9d966 mc13xxx: Added mc13xxx_revision() function.
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-10 10:44:19 +02:00