Commit Graph

3475 Commits

Author SHA1 Message Date
Marek Vasut 4808f106d2 serial: pxa: Make local functions static
Make functions that are local-only static, so no hairy symbols
stick out of the serial_pxa driver file.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Marek Vasut <marek.vasut@gmail.com>
Cc: Tom Rini <trini@ti.com>
2012-10-15 11:53:48 -07:00
Marek Vasut 407e6a2800 serial: pxa: Implement default_serial_console in serial_pxa.c
Implement weak default_serial_console() function in serial_pxa
driver, which gets available in case CONFIG_SERIAL_MULTI is
enabled. This will get helpful in subsequent patches, which will
encapsulate PXA's struct serial_device instances in serial_pxa
driver.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Marek Vasut <marek.vasut@gmail.com>
Cc: Tom Rini <trini@ti.com>
2012-10-15 11:53:48 -07:00
Marek Vasut 90bad891e1 serial: Properly spell out the structure member names of serial_driver
Properly spell out the whole structure member names when an initialized
varible is instantiated from the struct serial_driver. In case the
structure definition for struct serial_driver undergoes reordering,
there will be no impact on variables defined based on this structure.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Marek Vasut <marek.vasut@gmail.com>
Cc: Tom Rini <trini@ti.com>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Stefan Roese <sr@denx.de>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: C Nauman <cnauman@diagraph.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Michal Simek <monstr@monstr.eu>
2012-10-15 11:53:48 -07:00
Marek Vasut 89143fb3b0 serial: Rename .init() and .uninit() in serial_device
Rename .init() to .start() and .uninit() to .stop() in struct
serial_device. This allows aligning struct serial_device with
closer to struct stdio_dev. The real goal here is to allow
these two structures to converge together and eventually make
one to be a superset of the other.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Tom Rini <trini@ti.com>
2012-10-15 11:53:48 -07:00
Laurence Withers 633efe9c23 GPIO: pca953x: fix error reporting
Use the standard CMD_RET_* constants to clearly report errors from the
pca953x command. In addition, print error messages when I2C communication
fails.

Signed-off-by: Laurence Withers <lwithers@guralp.com>
2012-10-08 11:12:07 -07:00
Laurence Withers d75bc03f45 GPIO: pca953x: fix spelling in help
Signed-off-by: Laurence Withers <lwithers@guralp.com>
2012-10-08 11:12:07 -07:00
Wolfgang Denk d923a5d59f MPC85xx: remove support for TQM85xx boards
Due to grown code sizes the TQM85xx boards don't build any more with
some older tool chains (like ELDK 4.2).  As these boards have long
reached EOL it seems a waste of effort trying to fix them.  The vendor
has agreed to drop support for them, too.  So let's get rid of them.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Stefan Roese <sr@denx.de>
cc: Kim Phillips <kim.phillips@freescale.com>
Acked-by: Stefan Roese <sr@denx.de>
2012-10-05 11:07:42 -07:00
Michal Simek 194846f398 serial: Add Zynq serial driver
The driver is used on Xilinx Zynq platform.

Signed-off-by: Michal Simek <monstr@monstr.eu>
CC: Joe Hershberger <joe.hershberger@gmail.com>
CC: Marek Vasut <marex@denx.de>
Acked-by: Marek Vasut <marex@denx.de>
2012-10-04 16:46:18 +02:00
Gabriel Huau 5d889ae79e ARM : Add GPIO Driver and IOMUX definition for S3C2440
It's now possible to use the gpio driver interface
for s3c2440. This patch add iomux definitions too.

Signed-off-by: Gabriel Huau <contact@huau-gabriel.fr>
2012-10-03 10:50:20 +02:00
Nobuhiro Iwamatsu 96d1e0933f i2c: sh: Remove irq_wait function
irq_wait function is not referred to from anywhere.

Reported-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
2012-10-03 08:47:17 +02:00
Bastian Ruppert de57550294 da850/omap-l138: davinci_emac: Suppress auto negotiation if needed
negotiation is enabled in RMII mode. Some boards based on da850 need
to suppress this procedure.

CC: Rajashekhara, Sudhakar <sudhakar.raj@ti.com>
CC: Lad, Prabhakar <prabhakar.lad@ti.com>
CC: Hadli, Manjunath <manjunath.hadli@ti.com>
CC: sbabic@denx.de
Acked-by: Stefano Babic <sbabic@denx.de>
CC: Tom Rini <trini@ti.com>
Signed-off-by: Bastian Ruppert <Bastian.Ruppert@Sewerin.de>
Acked-by: Prabhakar Lad <prabhakar.lad@ti.com>
2012-10-01 10:02:13 -07:00
Bastian Ruppert 4b7d3a0e80 video: cfb_console: add function to plot the logo area black
Signed-off-by: Bastian Ruppert <Bastian.Ruppert@Sewerin.de>
CC: Anatolij Gustschin <agust@denx.de>
CC: Tom Rini <trini@ti.com>
CC: Stefano Babic <sbabic@denx.de>
2012-10-01 10:02:13 -07:00
Bastian Ruppert 1e681f9ad8 video: cfb_console: logo can be positioned via the splashpos variable
Extend the driver for placing the video/bmp logo as specified
by "splashpos" environment variable.

Signed-off-by: Bastian Ruppert <Bastian.Ruppert@Sewerin.de>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
CC: Stefano Babic <sbabic@denx.de>
Signed-off-by: Tom Rini <trini@ti.com>
2012-10-01 10:02:13 -07:00
Albert ARIBAUD 1c27059a2f Merge remote-tracking branch 'u-boot/master' 2012-09-30 23:49:17 +02:00
Albert ARIBAUD 8f0732ac3d Merge remote-tracking branch 'u-boot-imx/master' 2012-09-29 11:12:34 +02:00
Albert ARIBAUD fa651cce4f Merge remote-tracking branch 'u-boot-atmel/master' 2012-09-29 08:34:09 +02:00
Pavel Herrmann b726a01b76 remove unnecessary code in ata_piix
We set sata_curr_device to 0 right after returning from init_sata(), so there's
no point in setting it to the last scanned driver at this point.
Note: there are more duplicities with cmd_sata, but those might be required,
as the code seems to reset the entire controller on every scan, ignoring the
requested port number.

Signed-off-by: Pavel Herrmann <morpheus.ibis@gmail.com>
2012-09-28 10:40:30 -07:00
Tom Rini cec2655c3b Merge branch 'master' of git://git.denx.de/u-boot-net 2012-09-27 12:06:07 -07:00
Tom Rini a4cc1c4877 SPL: SPI: Enhance spi_spl_load to match the other load functions
Signed-off-by: Tom Rini <trini@ti.com>
2012-09-27 11:20:27 -07:00
Tom Rini 3f7f2414ef ARM: SPL: Convert davinci to CONFIG_SPL_FRAMEWORK
- Convert the non-relocation part of board_init_f to spl_board_init, turn on CONFIG_SPL_BOARD_INIT in the configs.
- Remove duplicated code.
- Add spl_boot_device() that returns the statically chosen boot device.

Signed-off-by: Tom Rini <trini@ti.com>
2012-09-27 11:20:10 -07:00
Marek Vasut c0b5a3bbb0 FEC: Replace magic contants
Replace the magic contant 1 << 24 with properly defined bits.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
2012-09-27 12:22:10 -05:00
Marek Vasut 67449098a8 FEC: Rework the TX wait mechanism
The mechanism waiting for transmission to finish in fec_send() now
relies on the E-bit being cleared in the TX buffer descriptor. In
case of data cache being on, this means invalidation of data cache
above this TX buffer descriptor on each test for the E-bit being
cleared.

Apparently, there is another way to check if the transmission did
complete. This is by checking the TDAR bit in the X_DES_ACTIVE
register. Reading a register does not need any data cache invalidation,
which is beneficial.

Rework the sequence that wait for completion of the transmission so that
the TDAR bit is tested first and afterwards check the E-bit being clear.
This cuts down the number of cache invalidation calls to one.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
2012-09-27 12:22:10 -05:00
Marek Vasut bc1ce150b9 FEC: Remove endless loop in the FEC driver
The FEC hardware sometimes errors out on data transfer and hangs in
the tightloop adjusted by this patch. So add timeout into the tightloop
to make such a hang recoverable.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
2012-09-27 12:22:09 -05:00
Marek Vasut efe24d2e17 FEC: Properly align address over the buffers for cache ops
Align the address that's to be invalidated/flushed properly.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Benoit Thebaudeau <benoit.thebaudeau@advans>
Cc: Eric Nelson <eric.nelson@boundarydevices.com>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
2012-09-27 12:22:09 -05:00
Marek Vasut e2a66e6097 FEC: Do not pass unaligned buffer to network stack
Do not pass unaligned RX buffer to the upper layers. The upper layer,
especially in the ARP case, recycles the buffer and passes it back into
the FEC, into it's TX path. With caches enabled, the FEC hangs on this
from time to time.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Benoit Thebaudeau <benoit.thebaudeau@advans>
Cc: Eric Nelson <eric.nelson@boundarydevices.com>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Tested-by: Fabio Estevam <fabio.estevam@freescale.com>
2012-09-27 12:22:09 -05:00
Priyanka Jain f91ba0ecbc net: Add Vitesse VSC8662 PHY support
-VSC8662 is Dual Port 10/100/1000Base-T Phy,
 100Base-FX/1000/Base-X Gigabit Ethernt Transceiver Phy.

-Its register set and features are similar to
 other Vitesse Phys

Signed-off-by: Priyanka Jain <Priyanka.Jain@freescale.com>
Signed-off-by: York Sun <yorksun@freescale.com>
2012-09-27 12:21:59 -05:00
Valentin Longchamp b737337aaf net/phy: support the mv88e6352 switch
This patch add support for the configuration of an external switch from
the 88E6xxx series from Marvell trough an MDIO link using indirect
adressing. This can be used if we do not want to use an EEPROM for the
configuration.

This driver is not generic and was not tested on other switches than the
88e6352. This is proposed as a first implementation that is somewhat
limited but works and that can be used as a basis for further
developments for this switch family.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Holger Brunck <holger.brunck@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
cc: Joe Hershberger <joe.hershberger@gmail.com>
2012-09-27 12:21:56 -05:00
Tom Rini 47f7bcae8c SPL: Move the omap SPL framework to common/spl
Add a new flag, CONFIG_SPL_FRAMEWORK to opt into the common/spl SPL
framework, enable on all of the previously using boards.  We move the
spl_ymodem.c portion to common/ and spl_mmc.c to drivers/mmc/.  We leave
the NAND one in-place as we plan to replace it later in this series.

We use common/spl to avoid linker problems with respect to merging
constant strings in objects.   Otherwise all strings in common/ will be
linked in and kept which grows SPL in size too much.

Signed-off-by: Tom Rini <trini@ti.com>
2012-09-27 09:49:59 -07:00
Michal Simek 185f7d9afc net: Add driver for Zynq Gem IP
Device driver for Zynq Gem IP.

Signed-off-by: Michal Simek <monstr@monstr.eu>
CC: Joe Hershberger <joe.hershberger@gmail.com>
CC: Marek Vasut <marex@denx.de>
Acked-by: Marek Vasut <marex@denx.de>
2012-09-26 12:36:32 -05:00
Lucas Stach 1dff9d0f54 net: asix: add AX88772B support
Add AX88772B ID together with two fixes needed to make this work.

1. The packet length check has to be adjusted, as all ASIX chips
only use 11 bits to indicate the length. AX88772B uses the other
bits to indicate unrelated things, which cause the check to fail.
This fix is based on a fix for the Linux kernel by Marek Vasut.
Linux upstream commit: bca0beb9363f8487ac902931a50eb00180a2d14a

2. AX88772B provides several bulk endpoints. Only the first
IN/OUT endpoints work in the default configuration. So stop
enumeration after we found them to avoid overwriting the
endpoint config with a non-working one.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Reviewed-by: Marek Vasut <marex@denx.de>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2012-09-26 12:36:31 -05:00
Lucas Stach 02c8d8cc6e net: asix: add read_mac function
Initial device MAC should be read while getting info about the
device, so it's wrong to only read it in asix_init().

Add a dedicated function to read the initial MAC, which is also
able to handle devices that have their initial MAC stored in
EEPROM. Call this function inasix_eth_get_info().

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Reviewed-by: Marek Vasut <marex@denx.de>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2012-09-26 12:36:31 -05:00
Lucas Stach 58f8fab8a4 net: asix: add write_hwaddr function
All ASIX chipsets aside from AX88172 are able to set the MAC
address on the hardware level. Add a function to expose this
ability.

To differentiate between chip types we now carry flags as driver
private data. Also while touching the asix_dongles array
constify this.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2012-09-26 12:36:30 -05:00
Lucas Stach 5fae53d0f1 net: asix: split out basic reset function
The basic device reset ensures that the device is ready to
service commands and does not need to get redone before each
network operation.

Split out the basic reset from asix_init() and instead call it
from asix_eth_get_info(), so that it only gets called once.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2012-09-26 12:36:30 -05:00
Lucas Stach e1dbdf9109 net: introduce transparent driver private in ueth_data
Avoid clutter in ueth_data. Individual drivers should not mess
with structures belonging to the core like this.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Reviewed-by: Marek Vasut <marex@denx.de>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2012-09-26 12:36:29 -05:00
Tom Rini b3873d3f4c Merge branch 'master' of git://git.denx.de/u-boot-video 2012-09-25 16:18:22 -07:00
Tom Rini 5675b50916 Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx 2012-09-25 12:23:55 -07:00
Joe Hershberger 8a0eccb105 net: Filter incoming netconsole packets by IP
Check the incoming packets' source IP address... if ncip isn't set to a
broadcast address, only listen to the client at ncip.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2012-09-24 13:55:44 -05:00
Joe Hershberger e827fec2b2 net: Allow netconsole settings to change after nc_start
Refresh the netconsole settings from the env before each packet instead
of only on netconsole init.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2012-09-24 13:55:43 -05:00
Joe Hershberger f8be7d659c net: Improve the speed of netconsole
Previously u-boot would initialize the network interface for every
network operation and then shut it down again.  This makes sense for
most operations where the network in not known to be needed soon after
the operation is complete.  In the case of netconsole, it will use the
network for every interaction with the shell or every printf.  This
means that the network is being reinitialized very often.  On many
devices, this intialization is very slow.

This patch checks for consecutive netconsole actions and leaves the
ethernet hardware initialized between them.  It will still behave the
same old way for all other network operations and any time another
network operation happens between netconsole operations.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Cc: Stefano Babic <sbabic@denx.de>
Acked-by: Stefano Babic <sbabic@denx.de>
2012-09-24 13:55:43 -05:00
Joe Hershberger 2c8fe5120f net: Make the netconsole buffer size configurable
Allow a board to configure a larger buffer for netconsole, but leave
the default.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Cc: Mike Frysinger <vapier@gentoo.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
2012-09-24 13:55:43 -05:00
Nobuhiro Iwamatsu dcd5a593f5 net: sh_eth: Add support R8A7740 of rmobile (arm core)
R8A7740 of rmobile has ethernet device, and this is same IP of
sh-ether. This support R8A7740 of rmobile.

Signed-off-by: Hideyuki Sano <hideyuki.sano.dn@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
2012-09-24 13:55:42 -05:00
Marek Vasut 905b3b00a1 dm: net: Fixup the armada100 FEC driver
Apply the following questionable adjustment to silence GCC.

armada100_fec.c: In function ‘armdfec_send’:
armada100_fec.c:589:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Prafulla Wadaskar <prafulla@marvell.com>
2012-09-24 13:55:20 -05:00
Michal Simek 7fd7082024 net: emaclite: Support OF initialization
Support new CONFIG_OF_CONTROL option where device
probing is done based on device tree description.

Signed-off-by: Michal Simek <monstr@monstr.eu>
CC: Joe Hershberger <joe.hershberger@gmail.com>
2012-09-24 13:17:25 -05:00
Marek Vasut 61e129885a dm: net: Move IXP NPE to drivers/net/
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Bryan Hundven <bryanhundven@gmail.com>
Cc: Michael Schwingen <rincewind@discworld.dascon.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: U-Boot DM <u-boot-dm@lists.denx.de>
Cc: Joe Hershberger <joe.hershberger@ni.com>
2012-09-24 13:17:24 -05:00
Joe Hershberger 7f51898c1b net: Make netconsole src and dest ports configurable
It is desirable to use different port numbers for sending and receiving
packets with netconsole in the case where you have more than one device
on the local subnet with netconsole enabled for broadcast.  When they
use the same port for both, any output from one will look like input to
the other.  This is typlically not desirable.

This patch allows the input and output ports to be specified separately
in the environment.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Cc: Mike Frysinger <vapier@gentoo.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
2012-09-24 13:17:24 -05:00
Eric Nelson 5f8e17ce15 i.MX: mxc_ipuv3_fb: add ipuv3_fb_shutdown() routine to stop IPU frame buffer
Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
Tested-by: Fabio Estevam <fabio.estevam@freescale.com>
2012-09-24 10:48:19 +02:00
Tom Rini 9fe2cfb43a Merge branch 'agust@denx.de' of git://git.denx.de/u-boot-staging 2012-09-21 16:22:18 -07:00
Kumar Gala cf5787f2a4 pci: fix some warnings related to assumptions about
The following commit introduced some warnings associated with using
pci_addr_t instead of a proper 32-bit data type.

commit af778c6d9e
Author: Andrew Sharp <andywyse6@gmail.com>
Date:   Wed Aug 1 12:27:16 2012 +0000

    pci: fix errant data types and corresponding access functions

On some platforms pci_addr_t is defined as a 64-bit data type so its not
proper to use with pci_{read,write}_config_dword.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2012-09-22 00:24:34 +02:00
Tom Rini 495dbd72dd Merge branch 'master' of git://git.denx.de/u-boot-arm 2012-09-21 14:53:13 -07:00
Timur Tabi 15b83386aa video/powerpc: don't touch DIU registers that we don't need
Several DIU registers were being initialized either unnecessarily or to
wrong values.

1) All interrupts were enabled even though there's no interrupt handler.
   Interrupts were left enabled when booting Linux.

2) Don't configure a dummy area descriptor, since we don't support ADs
   in U-Boot.

3) Don't configure any write-back buffer registers, since we don't use
   that mode.

4) The default values for the THRESHOLDS, SYN_POL, and PLUT registers
   should be used, so don't touch those registers either.

Signed-off-by: Timur Tabi <timur@freescale.com>
2012-09-21 23:51:29 +02:00