oweals/u-boot.git
9 years agonet: phy: micrel: disable NAND-tree for KSZ8051
Sylvain Rochet [Wed, 7 Oct 2015 20:54:22 +0000 (22:54 +0200)]
net: phy: micrel: disable NAND-tree for KSZ8051

NAND-tree is used to check wiring between MAC and PHY using NAND gates
on the PHY side, hence the name.

NAND-tree initial status is latched at reset by probing the IRQ pin.
However some devices are sharing the PHY IRQ pin with other peripherals
such as Atmel SAMA5D[34]x-EK boards when using the optional TM7000
display module, therefore they are switching the PHY in NAND-tree test
mode depending on the current IRQ line status at reset.

This patch ensure PHY is not in NAND-tree test mode only for the Micrel
KSZ8051 PHY used by Atmel. There are other Micrel PHY affected but I
doubt they are used on such weird hardware design.

Signed-off-by: Sylvain Rochet <sylvain.rochet@finsecur.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
9 years agonet: rtl8169: Build warning fixes for 64-bit
Stephen Warren [Fri, 2 Oct 2015 23:44:34 +0000 (17:44 -0600)]
net: rtl8169: Build warning fixes for 64-bit

Casting from dev->priv to pci_dev_t changes the value's size on a 64-bit
system. This causes the compiler to complain about casting a pointer to an
integer of a different (smaller) size. To avoid this, cast to an integer
of matching size first, then perform an int->int cast to perform the size
change. This signals explicitly that we do want to change the size, and
avoids the compiler warning. This is legitimate since we know the pointer
actually stores a small integer, not a pointer value.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
9 years agonet: Increase the size of the net_boot_file_name buffer
Jacob Stiffler [Wed, 30 Sep 2015 14:12:05 +0000 (10:12 -0400)]
net: Increase the size of the net_boot_file_name buffer

The net_boot_file_name buffer is used as storage for the bootfilename
command line argument to network boot commands such as tftp and nfs.

Increase the size of this buffer to 1024 bytes as the current size of
128 bytes is restrictive for arbitrary paths on the server.

Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
9 years agonet: phy: micrel: add support for KSZ8021RNL & KSZ8031RNL
Sylvain Lemieux [Wed, 9 Sep 2015 20:29:51 +0000 (16:29 -0400)]
net: phy: micrel: add support for KSZ8021RNL & KSZ8031RNL

This patch adds support for Micrel KSZ8021RNL & KSZ8031RNL.

Signed-off-by: Sylvain Lemieux <slemieux@tycoint.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
9 years agosmsc95xx: Use zero length packets when RX fifo is empty
Stefan Brüns [Tue, 8 Sep 2015 03:12:00 +0000 (05:12 +0200)]
smsc95xx: Use zero length packets when RX fifo is empty

Using NAKs on empty RX fifo for bulk in transfers is the right choice
for a interrupt driven model, but U-Boot uses polling and expects an
immediate answer if there is no incoming packet. Using ZLP Bulk In Response
(BIR) mode avoids unexpected timeouts in the host controller driver.

As ZLP mode is reset default, there is no need to set it.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
9 years agonet: parse DHCP options from overloaded file/sname fields
Stefan Brüns [Thu, 3 Sep 2015 22:31:49 +0000 (00:31 +0200)]
net: parse DHCP options from overloaded file/sname fields

If Option 52 in the vendor option field signals overloading
of the file and/or sname fields, these field may contain
additional options. Formatting of file/sname contained options
is the same as in the vendor options field, but without the
leading magic.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
9 years agonet: Do not overwrite options found in overloaded 'file' field
Stefan Brüns [Thu, 3 Sep 2015 22:31:48 +0000 (00:31 +0200)]
net: Do not overwrite options found in overloaded 'file' field

If 'file' is overloaded, it is wrong to get or put the bootfile name
from it/to it.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
9 years agonet: change the env name to use const
Josh Wu [Tue, 1 Sep 2015 10:22:55 +0000 (18:22 +0800)]
net: change the env name to use const

As we don't modify the 'name' parameter, so change it to const.

Signed-off-by: Josh Wu <josh.wu@atmel.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
9 years agonet/eth: fix a bug in on_ethaddr()
Gong Qianyu [Mon, 31 Aug 2015 03:34:43 +0000 (11:34 +0800)]
net/eth: fix a bug in on_ethaddr()

The loop should check all ethenet devices, not only the first device,
to set each specified ethaddr, or it'll cause failure when we use other
devices.

Signed-off-by: Gong Qianyu <Qianyu.Gong@freescale.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
9 years agosmsc95xx: Fetch whole burst with 1 URB, avoid framing errors
Stefan Brüns [Sun, 30 Aug 2015 15:59:45 +0000 (17:59 +0200)]
smsc95xx: Fetch whole burst with 1 URB, avoid framing errors

smsc95xx_recv() does not reassemble bursts spread over multiple URBs.
If there is a lot of broadcast traffic, the fifo will fill up to the
burst cap limit. Lowering the burst cap to the URB size ensures no packet
spans multiple urbs.
Caveat, lower limit for working burst cap is 5/33 HS/FS packets.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
9 years agonet: cancel timeout handler after DHCPACK
Stefan Brüns [Sun, 30 Aug 2015 15:47:17 +0000 (17:47 +0200)]
net: cancel timeout handler after DHCPACK

Timeout handler should be stopped after reception of DHCPACK. If "autoload"
is not set, the handler is immediately replaced by the TFTP handler,
otherwise it may trigger before the next boot stage begins.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
9 years agonet/arp: account for ARP delay, avoid duplicate packets on timeout
Stefan Brüns [Sun, 30 Aug 2015 15:46:54 +0000 (17:46 +0200)]
net/arp: account for ARP delay, avoid duplicate packets on timeout

eth_rx() in the main reception loop may trigger sending a packet which
is already timed out (or will immediately) upon reception of an ARP reply.
As long as the ARP reply is pending, the timeout handler of a packet
should be postponed.
Happens on TFTP with bad network (e.g. WLAN).

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
9 years agonet/arp: Do not run net_start_again() on timeout
Stefan Brüns [Sun, 30 Aug 2015 15:46:43 +0000 (17:46 +0200)]
net/arp: Do not run net_start_again() on timeout

net_start_again() will be called from net_loop() if state is NETLOOP_FAIL.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
9 years agonet: Fix parsing of Bootp/DHCP option 0 (Pad)
Stefan Brüns [Fri, 28 Aug 2015 08:15:54 +0000 (10:15 +0200)]
net: Fix parsing of Bootp/DHCP option 0 (Pad)

Pad has no len byte, so the normal parsing code fails.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
9 years agonet: send RFC1542 compliant value for bootp requests
Stefan Brüns [Thu, 27 Aug 2015 21:57:18 +0000 (23:57 +0200)]
net: send RFC1542 compliant value for bootp requests

RFC1542, 3.2:
"The 'secs' field of a BOOTREQUEST message SHOULD represent the
elapsed time, in seconds, since the client sent its first BOOTREQUEST
message.  Note that this implies that the 'secs' field of the first
BOOTREQUEST message SHOULD be set to zero."

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
9 years agonet: reject Bootp/DHCP packets with bad OP value
Stefan Brüns [Thu, 27 Aug 2015 21:53:26 +0000 (23:53 +0200)]
net: reject Bootp/DHCP packets with bad OP value

Rename check_packet to check_reply_packet to make its function more
obvious.
The check for DHCP_* values is completely off, as it should
compare against DHCP option 53 (Message Type). Only valid value for
any Bootp/DHCP reply is BOOTREPLY.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
9 years agonet: protect status led access in bootp
Thomas Chou [Tue, 25 Aug 2015 12:54:24 +0000 (20:54 +0800)]
net: protect status led access in bootp

This fixes the error when STATUS_LED_BOOT is not defined.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
9 years agonet: bootp fix vci string on SPL-Boot
Hannes Petermaier [Tue, 25 Aug 2015 10:17:59 +0000 (12:17 +0200)]
net: bootp fix vci string on SPL-Boot

If CONFIG_CMD_DHCP is enabled, the vci (vendor-class-identifier) string
isn't inserted into the bootp-packet during SPL stage because the

CONFIG_BOOTP_VCI_STRING
instead
CONFIG_SPL_NET_VCI_STRING

We fix this with testing for CONFIG_SPL_BUILD and testing for existing
CONFIG_SPL_NET_VCI_STRING.

Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agonet: TFTP: variables cleanup and addition
Albert ARIBAUD \(3ADEV\) [Sun, 11 Oct 2015 22:02:57 +0000 (00:02 +0200)]
net: TFTP: variables cleanup and addition

TFTP source and destination port variable names are
'tftpsrcp' and 'tftpdstp' in the code, but 'tftpsrcport'
and 'tftpdstport' in the README file. Fix the README.

Add environment variable 'tftptimeoutcountmax'. As per the
comments about the global variable tftp_timeout_count_max,
make sure tftptimeoutcountmax is nonnegative.

Introduce configuration option CONFIG_NET_TFTP_VARS,
which controls whether environment variables tftpblocksize,
tftptimeout, and tftptimoueoutcountmax are read by the TFTP
client code. CONFIG_NET_TFTP_VARS defaults to y but can be
set to n by targets with to tight size contraints.

Make bf527-ezkit set CONFIG_NET_TFTP_VARS to n to keep the
target size below limit.

9 years agocommon/board_f.c: modify the macro to use get_clocks() more common
Gong Qianyu [Wed, 9 Sep 2015 08:44:16 +0000 (16:44 +0800)]
common/board_f.c: modify the macro to use get_clocks() more common

get_clocks() should not be limited by ESDHC.

Signed-off-by: Gong Qianyu <Qianyu.Gong@freescale.com>
9 years agoarm, powerpc: select SYS_GENERIC_BOARD
Masahiro Yamada [Tue, 20 Oct 2015 12:09:06 +0000 (21:09 +0900)]
arm, powerpc: select SYS_GENERIC_BOARD

We have finished Generic Board conversion for ARM and PowerPC, i.e.
all the boards have been converted except OpenRISC, SuperH, SPARC,
which have not supported Generic Board framework yet.

Select SYS_GENERIC_BOARD in arch/Kconfig and delete all the macro
defines in include/configs/*.h.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
9 years agoRevert "ARM: zynq: disable CONFIG_SYS_MALLOC_F to fix MMC boot"
Simon Glass [Mon, 19 Oct 2015 12:50:03 +0000 (06:50 -0600)]
Revert "ARM: zynq: disable CONFIG_SYS_MALLOC_F to fix MMC boot"

This reverts commit 321f86e18d6aae9f7b7ba3ef1eb0cec769481874.

The original bug has been fixed.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-on: Zedboard and ZC706 board
Tested-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Tested-on: zc702
Tested-by: Michal Simek <michal.simek@xilinx.com>
9 years agozynq: Move SPL console init out of board_init_f()
Simon Glass [Mon, 19 Oct 2015 12:50:02 +0000 (06:50 -0600)]
zynq: Move SPL console init out of board_init_f()

We should not init the console this early since it precludes using driver
model for the UART, since it is not set up at the start of board_init_f().
See the README for more information. The debug UART does not have this
restriction. If we want to do early init with the console on it can be done
in spl_board_init().

Move the preloader_console_init() call from board_init_f() to board_init_r().

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Tested-by: Michal Simek <michal.simek@xilinx.com>
9 years agomicroblaze: Add a TODO to call board_init_f_mem()
Simon Glass [Mon, 19 Oct 2015 12:50:01 +0000 (06:50 -0600)]
microblaze: Add a TODO to call board_init_f_mem()

This C function should be used to do the early memory layout and init. This
is beyond my powers, so just add a TODO for the maintainer.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Michal Simek <michal.simek@xilinx.com>
9 years agoarm: Switch 32-bit ARM to using generic global_data setup
Simon Glass [Mon, 19 Oct 2015 12:50:00 +0000 (06:50 -0600)]
arm: Switch 32-bit ARM to using generic global_data setup

There is quite a bit of assembler code that can be removed if we use the
generic global_data setup. Less arch-specific code makes it easier to add
new features and maintain the start-up code.

Drop the unneeded code and adjust the hooks in board_f.c to cope.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agoarm: Switch aarch64 to using generic global_data setup
Simon Glass [Mon, 19 Oct 2015 12:49:59 +0000 (06:49 -0600)]
arm: Switch aarch64 to using generic global_data setup

There is quite a bit of assembler code that can be removed if we use the
generic global_data setup. Less arch-specific code makes it easier to add
new features and maintain the start-up code.

Drop the unneeded code and adjust the hooks in board_f.c to cope.

Tested on LS2085ARDB and LS2085AQDS (armv8 SoC).
Tested-by: York Sun <yorksun@freescale.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agoboard_init_f_mem(): Don't create an unused early malloc() area
Simon Glass [Mon, 19 Oct 2015 12:49:58 +0000 (06:49 -0600)]
board_init_f_mem(): Don't create an unused early malloc() area

Change the #ifdef so that the early malloc() area is not set up in SPL if
CONFIG_SYS_SPL_MALLOC_START is defined. In that case it would never actually
be used, and just chews up stack space.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Masahiro Yamada <yamada.masahiro@socionext.com>
9 years agoboard_init_f_mem(): Don't require memset()
Simon Glass [Mon, 19 Oct 2015 12:49:57 +0000 (06:49 -0600)]
board_init_f_mem(): Don't require memset()

Unfortunately memset() is not always available, so provide a substitute when
needed.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agoMove board_init_f_mem() into a common location
Simon Glass [Mon, 19 Oct 2015 12:49:56 +0000 (06:49 -0600)]
Move board_init_f_mem() into a common location

This function will be used by both SPL and U-Boot proper. So move it into
a common place. Also change the #ifdef so that the early malloc() area is
not set up in SPL if CONFIG_SYS_SPL_MALLOC_START is defined. In that case
it would never actually be used, and just chews up stack space.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agofs-test.sh: fix pre-requisite detection
Stephen Warren [Sat, 3 Oct 2015 19:56:48 +0000 (13:56 -0600)]
fs-test.sh: fix pre-requisite detection

In the following snippet:

if [ ! -x `which $prereq` ]; then

When $prereq does not exist, `which $prereq` evaluates to the empty string,
which results in *no* argument being passed to the -x operator, which then
evaluates to true, which is the equivalent of the prereq having been found. In
order for this to fail as expected, we must pass an empty argument, which then
causes -x to fail. Do this by wrapping the `` in quotes so there's always an
argument to -x, even if the value of the argument is zero-length.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
9 years agotest: fat: add test of non-contiguous file reads
Stephen Warren [Sat, 3 Oct 2015 19:56:47 +0000 (13:56 -0600)]
test: fat: add test of non-contiguous file reads

In my patch series to replace fs/fat with "ff.c", I enhanced ff.c to
optimize file reading, so that reads of contiguous clusters are submitted
to the IO device as a single read. This test attempts to torture-test
edge-cases of that enhancement.

BTW, the only way I found to validate that this script actually does
create non-contiguous files was to manually inspect the FAT bitmap in a
hex dump of the FAT image. hdparm --fibmap doesn't work on loop-mounted
filesystems. filefrag -v -e seems to lie about files being contiguous
when they aren't.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
9 years agoitest: make memory access work under sandbox
Stephen Warren [Sat, 3 Oct 2015 19:56:46 +0000 (13:56 -0600)]
itest: make memory access work under sandbox

itest accesses memory, and hence must map/unmap it. Without doing so, it
accesses invalid addresses and crashes.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
9 years agodistro_bootcmd: Add support for booting from ubifs
Roy Spliet [Thu, 17 Sep 2015 22:46:59 +0000 (18:46 -0400)]
distro_bootcmd: Add support for booting from ubifs

Under the assumptions of having a UBI volume called boot, containing
a ubifs filesystem.

Signed-off-by: Roy Spliet <rspliet@eclipso.eu>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
9 years agoubifs: Add generic fs support
Hans de Goede [Thu, 17 Sep 2015 22:46:58 +0000 (18:46 -0400)]
ubifs: Add generic fs support

Add generic fs support, so that commands like ls, load and test -e can be
used on ubifs.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
9 years agoubifs: Add functions for generic fs use
Hans de Goede [Thu, 17 Sep 2015 22:46:57 +0000 (18:46 -0400)]
ubifs: Add functions for generic fs use

Implement the necessary functions for implementing generic fs support
for ubifs.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
9 years agoubifs: Modify ubifs u-boot wrapper function prototypes for generic fs use
Hans de Goede [Thu, 17 Sep 2015 22:46:56 +0000 (18:46 -0400)]
ubifs: Modify ubifs u-boot wrapper function prototypes for generic fs use

Modify the ubifs u-boot wrapper function prototypes for generic fs use,
and give them their own header file.

This is a preparation patch for adding ubifs support to the generic fs
code from fs/fs.c.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
9 years agodisk/part: Only build hostfs special handling when CONFIG_SANDBOX is set
Hans de Goede [Thu, 17 Sep 2015 22:46:55 +0000 (18:46 -0400)]
disk/part: Only build hostfs special handling when CONFIG_SANDBOX is set

This is not necessary / useful when not building with CONFIG_SANDBOX and
with the addition of ubifs support to the generic fs commands it actually
gets in the way, since both operate on a fake / NULL blkdev.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
9 years agoAllow imxtract to extract part of script image.
Pierre Aubert [Wed, 16 Sep 2015 06:29:11 +0000 (08:29 +0200)]
Allow imxtract to extract part of script image.

Scripts are multi-file images, the imxtract command should handle them
in the same manner.

Signed-off-by: Pierre Aubert <p.aubert@staubli.com>
9 years agoFix bad return value checks (detected with Coccinelle)
Thomas Huth [Tue, 25 Aug 2015 15:09:40 +0000 (17:09 +0200)]
Fix bad return value checks (detected with Coccinelle)

In the "Getting Started with Coccinelle - KVM edition" presentation that
has been held by Julia Lawall at the KVM forum 2015 (see the slides at
http://events.linuxfoundation.org/sites/events/files/slides/tutorial_kvm_0.pdf),
she pointed out some bad return value checks in U-Boot that can be
detected with Coccinelle by using the following config file:

@@
identifier x,y;
identifier f;
statement S;
@@
x = f(...);
(
 if (x < 0) S
|
 if (
-     y
+     x
 < 0) S
)

This patch now fixes these issues.

Signed-off-by: Thomas Huth <huth@tuxfamily.org>
9 years agoARM: rpi: Add CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG support
Guillaume GARDET [Tue, 25 Aug 2015 13:10:26 +0000 (15:10 +0200)]
ARM: rpi: Add CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG support

Add CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG support and enable it to set
'board_rev' and 'board_name' envs.
'board_rev' can be used in scripts to determine what board we are running on
and 'board_name' for pretty printing.

Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
9 years agoallow LED initialization without STATUS_LED_BOOT
Bernhard Nortmann [Fri, 21 Aug 2015 13:13:21 +0000 (15:13 +0200)]
allow LED initialization without STATUS_LED_BOOT

For current U-Boot to initialize status LEDs via status_led_init(), it
is required to have both CONFIG_STATUS_LED and STATUS_LED_BOOT defined.
This may be a particular concern with GPIO LEDs, where __led_init() is
required to correctly set up the GPIO (gpio_request and
gpio_direction_output). Without STATUS_LED_BOOT the initialization isn't
called, which could leave the user with a non-functional "led" command -
due to the fact that the LED routines in gpio_led.c use gpio_set_value()
just fine, but the GPIO never got set up properly in the first place.

I think having CONFIG_STATUS_LED is sufficient to justify a
corresponding call to status_led_init(), even with no STATUS_LED_BOOT
defined. To do so, common/board_r.c needs call that routine, so it now
is exposed via status_led.h.

Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
[trini: Add dummy __led_init to pca9551_led.c]
Signed-off-by: Tom Rini <trini@konsulko.com>
9 years agoadd generic stubs for GPIO LEDs
Bernhard Nortmann [Fri, 21 Aug 2015 13:13:20 +0000 (15:13 +0200)]
add generic stubs for GPIO LEDs

For boards that support LEDs driven via GPIO (CONFIG_GPIO_LED),
it may be useful to have some generic stubs (wrapper functions)
for the "colored" LEDs.

This allows defining STATUS_LED_* values directly to GPIO numbers,
e.g.: #define STATUS_LED_GREEN 248 /* = PH24 */

To keep those optional, it's probably best to introduce an additional
configuration setting. I've chosen CONFIG_GPIO_LED_STUBS for that.
Placing the code in drivers/misc/gpio_led.c also ensures that it
automatically depends on CONFIG_GPIO_LED too.

Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
9 years agodm: keystone: serial: Add driver model support
Lokesh Vutla [Sat, 19 Sep 2015 09:17:36 +0000 (14:47 +0530)]
dm: keystone: serial: Add driver model support

Add driver model support for keystone serial driver.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agonet: convert altera_tse to driver model and phylib
Thomas Chou [Thu, 22 Oct 2015 07:29:11 +0000 (15:29 +0800)]
net: convert altera_tse to driver model and phylib

Convert altera_tse to driver model and phylib.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Marek Vasut <marex@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
9 years agonios2: fix virt_to_phys for nios2 with MMU
Thomas Chou [Thu, 22 Oct 2015 07:38:24 +0000 (15:38 +0800)]
nios2: fix virt_to_phys for nios2 with MMU

As the virtual address and physical address mapping of nios2 with
MMU are different. Add a check of MMU, and fix the mapping.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Acked-by: Marek Vasut <marex@denx.de>
Reviewed-by: Ley Foon Tan <lftan@altera.com>
9 years agonios2: add README.nios2
Thomas Chou [Wed, 21 Oct 2015 14:37:04 +0000 (22:37 +0800)]
nios2: add README.nios2

Add README.nios2 about how to add nios2 boards to u-boot.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Acked-by: Marek Vasut <marex@denx.de>
9 years agonios2: zap nios2-generic board dir
Thomas Chou [Fri, 23 Oct 2015 06:55:36 +0000 (14:55 +0800)]
nios2: zap nios2-generic board dir

As we use device tree to control u-boot now, the generic
board can be removed.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
9 years agonios2: convert dma_alloc_coherent to use malloc_cache_aligned
Thomas Chou [Sun, 18 Oct 2015 12:03:53 +0000 (20:03 +0800)]
nios2: convert dma_alloc_coherent to use malloc_cache_aligned

Convert dma_alloc_coherent to use memalign.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Marek Vasut <marex@denx.de>
9 years agonios2: convert copy_exception_trampoline to use dm cpu data
Thomas Chou [Tue, 6 Oct 2015 06:09:19 +0000 (14:09 +0800)]
nios2: convert copy_exception_trampoline to use dm cpu data

Convert copy_exception_trampoline() to use dm cpu data.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
9 years agonios2: convert cache flush to use dm cpu data
Thomas Chou [Thu, 22 Oct 2015 23:58:20 +0000 (07:58 +0800)]
nios2: convert cache flush to use dm cpu data

Convert cache flush to use dm cpu data.

The original cache flush functions are written in assembly
and use CONFIG_SYS_{I,D}CACHE_SIZE... macros. It is difficult
to convert to use cache configuration in dm cpu data which is
extracted from device tree.

The cacheflush.c of Linux nios2 arch uses cpuinfo structure,
which is very close to our dm cpu data. So we copy and modify
it to arch/nios2/lib/cache.c to replace the old cache.S.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
9 years agonios2: set default cache configuration in start.S
Thomas Chou [Fri, 9 Oct 2015 12:09:17 +0000 (20:09 +0800)]
nios2: set default cache configuration in start.S

Set default icache and dcache configuration for start.S.

We want to remove the CONFIG_SYS_{I,D}CACHE_SIZE...
configuration macros. As we are just barely starting from
reset, there is no luxury of device tree.

We will set some maximum cache configuration so that it will
work for most configurations. This is used only in this
start.S. The speed penalty is only once here.

After start up, during board initialization, cpu information
will be extracted from device tree. Then cache flush operations
will have correct cache configurations.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Acked-by: Marek Vasut <marex@denx.de>
9 years agonios2: zap initdram
Thomas Chou [Fri, 9 Oct 2015 03:36:01 +0000 (11:36 +0800)]
nios2: zap initdram

Zap initdram(), as it is not used.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Acked-by: Marek Vasut <marex@denx.de>
9 years agonios2: clean up comments style in start.S
Thomas Chou [Tue, 6 Oct 2015 02:12:59 +0000 (10:12 +0800)]
nios2: clean up comments style in start.S

Clean up comments style in start.S.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
9 years agonios2: convert ioremap to use dm cpu data
Thomas Chou [Mon, 5 Oct 2015 02:37:19 +0000 (10:37 +0800)]
nios2: convert ioremap to use dm cpu data

Convert ioremap() to use io_region_base in dm cpu global data.

Also remove three unused io functions, which have style issue
and are replaced by macros already.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
9 years agonios2: convert do_reset to use dm cpu data
Thomas Chou [Fri, 9 Oct 2015 01:43:52 +0000 (09:43 +0800)]
nios2: convert do_reset to use dm cpu data

Convert do_reset to use dm cpu data.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Simon Glass <sjg@chromium.org>
9 years agonios2: remove asm/psr.h
Thomas Chou [Fri, 9 Oct 2015 01:32:00 +0000 (09:32 +0800)]
nios2: remove asm/psr.h

Remove asm/psr.h, which is not used.
Also clean up asm/sections.h and unaligned.h.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Marek Vasut <marex@denx.de>
9 years agonios2: convert altera sysid to driver model
Thomas Chou [Wed, 14 Oct 2015 00:43:31 +0000 (08:43 +0800)]
nios2: convert altera sysid to driver model

Convert altera sysid to driver model with misc uclass.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Acked-by: Chin Liang See <clsee@altera.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
9 years agodm: implement a Miscellaneous uclass
Thomas Chou [Wed, 7 Oct 2015 12:20:51 +0000 (20:20 +0800)]
dm: implement a Miscellaneous uclass

Implement a Miscellaneous uclass with generic read or
write operations. This class is used only for those
do not fit other more general classes.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agoserial: remove altera serial initializations
Thomas Chou [Fri, 9 Oct 2015 01:28:20 +0000 (09:28 +0800)]
serial: remove altera serial initializations

Both altera_jtag_serial_initialize() and
altera_serial_initialize() are no longer used after
they are converted to driver model.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Marek Vasut <marex@denx.de>
9 years agonios2: convert altera timer to driver model
Thomas Chou [Thu, 22 Oct 2015 14:28:53 +0000 (22:28 +0800)]
nios2: convert altera timer to driver model

Convert altera timer to driver model.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Acked-by: Chin Liang See <clsee@altera.com>
9 years agotimer: start a new timer after relocation
Thomas Chou [Fri, 9 Oct 2015 05:48:56 +0000 (13:48 +0800)]
timer: start a new timer after relocation

Start a new timer after relocation, just in case the
timer has been used in per-relocation.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agodm: implement a Timer uclass
Thomas Chou [Fri, 9 Oct 2015 05:46:34 +0000 (13:46 +0800)]
dm: implement a Timer uclass

Implement a Timer uclass to work with lib/time.c.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agonios2: convert nios2 cpu to driver model
Thomas Chou [Wed, 21 Oct 2015 13:34:57 +0000 (21:34 +0800)]
nios2: convert nios2 cpu to driver model

Convert nios2 cpu to driver model. The cpu parameters are
extracted from device tree and saved to global data structure.
We will use them to replace the custom_fpga.h .

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Simon Glass <sjg@chromium.org>
9 years agonios2 : convert altera_pio to driver model
Thomas Chou [Wed, 21 Oct 2015 13:33:45 +0000 (21:33 +0800)]
nios2 : convert altera_pio to driver model

Convert altera_pio to driver model.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Acked-by: Chin Liang See <clsee@altera.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
9 years agonios2: add clear and set bits macros
Thomas Chou [Wed, 30 Sep 2015 12:56:53 +0000 (20:56 +0800)]
nios2: add clear and set bits macros

These macros can be used to clear and set multiple bits
in a register using a single call.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Marek Vasut <marex@denx.de>
Acked-by: Chin Liang See <clsee@altera.com>
9 years agospi : convert altera_spi to driver model
Thomas Chou [Wed, 14 Oct 2015 00:33:34 +0000 (08:33 +0800)]
spi : convert altera_spi to driver model

Convert altera_spi to driver model

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Jagan Teki <jteki@openedev.com>
9 years agonios2: convert altera_uart to driver model
Thomas Chou [Wed, 21 Oct 2015 13:26:54 +0000 (21:26 +0800)]
nios2: convert altera_uart to driver model

Convert altera_uart to driver model.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Marek Vasut <marex@denx.de>
9 years agonios2: convert altera_jtag_uart to driver model
Thomas Chou [Thu, 22 Oct 2015 23:36:37 +0000 (07:36 +0800)]
nios2: convert altera_jtag_uart to driver model

Convert altera_jtag_uart to driver model.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Acked-by: Marek Vasut <marex@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
9 years agonios2: map physical address to uncached virtual address
Thomas Chou [Sat, 3 Oct 2015 13:02:30 +0000 (21:02 +0800)]
nios2: map physical address to uncached virtual address

Add ioremap() to map physical address to uncached virtual
address. We need this to convert the reg address from the
device tree.

The order of headers inclusion in interrupts.c is changed
because common.h will include board header that contains
IO_REGION_BASE.

In the future, the IO_REGION_BASE should be decided from
the device tree.
tree

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Acked-by: Marek Vasut <marex@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
9 years agonios2: enable malloc() pool before relocation
Thomas Chou [Wed, 9 Sep 2015 07:59:15 +0000 (15:59 +0800)]
nios2: enable malloc() pool before relocation

Enable malloc() pool before relocation, because this is needed
to use serial uclass.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Marek Vasut <marex@denx.de>
9 years agonios2: call board_init_f_mem
Thomas Chou [Wed, 9 Sep 2015 07:09:43 +0000 (15:09 +0800)]
nios2: call board_init_f_mem

We will need CONFIG_SYS_MALLOC_F_LEN to use serial uclass.
So we shall undefine CONFIG_SYS_GENERIC_GLOBAL_DATA, and
call board_init_f_mem() to allocates early malloc() memory
with size of CONFIG_SYS_MALLOC_F_LEN in board_f.c.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Marek Vasut <marex@denx.de>
9 years agonios2: zap version_string
Thomas Chou [Wed, 9 Sep 2015 05:41:32 +0000 (13:41 +0800)]
nios2: zap version_string

There is a weak version_string[] at common/cmd_version.c .
Remove the one in start.S.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Acked-by: Marek Vasut <marex@denx.de>
9 years agonios2: zap dly_clks
Thomas Chou [Wed, 9 Sep 2015 05:08:05 +0000 (13:08 +0800)]
nios2: zap dly_clks

The dly_clks() in start.S is no use after switching to
generic timer. Remove it.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Acked-by: Marek Vasut <marex@denx.de>
9 years agonios2: Split timer code into timer.c
Thomas Chou [Thu, 8 Oct 2015 13:23:37 +0000 (21:23 +0800)]
nios2: Split timer code into timer.c

Move the timer code from interrupts.c into timer.c . Eliminate the
installation of timer interrupt handler, which is no longer used.

Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
9 years agonios2: Switch to generic timer
Thomas Chou [Thu, 8 Oct 2015 13:17:42 +0000 (21:17 +0800)]
nios2: Switch to generic timer

Zap almost all of the ad-hoc timer code from interrupts.c and
use the code in lib/time.c instead.

Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
9 years agonios2: enable Driver Model
Thomas Chou [Mon, 7 Sep 2015 11:19:31 +0000 (19:19 +0800)]
nios2: enable Driver Model

Enable the Driver Model config. The driver subsystems
are not enabled until we enable each of them.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Acked-by: Marek Vasut <marex@denx.de>
9 years agonios2: enable device tree control of U-Boot
Thomas Chou [Sun, 18 Oct 2015 11:42:09 +0000 (19:42 +0800)]
nios2: enable device tree control of U-Boot

This patch adds device tree control of U-Boot to nios2 boards.
The example dts is taken from Linux kernel.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Marek Vasut <marex@denx.de>
9 years agonios2: define _end in link script
Thomas Chou [Sun, 6 Sep 2015 12:13:34 +0000 (20:13 +0800)]
nios2: define _end in link script

Since commit 44c6e6591cb451ae606f8bde71dd5fb7b4002544
"rename _end to __bss_end__" , the _end was removed.
But we need it now for separated device tree control,
ie, CONFIG_OF_SEPARATE .

The _end is used by fdtdec_setup() to find the blob.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Acked-by: Marek Vasut <marex@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
9 years agonios2: remove gp assignments in link script
Thomas Chou [Sun, 6 Sep 2015 12:18:10 +0000 (20:18 +0800)]
nios2: remove gp assignments in link script

Since we don't use gp for small data with option "-G0",
we use gp as global data pointer. The _gp location is
not needed.

The ALIGN(16) was for gp only. It is removed, so that we
can get correct address of dtb in u-boot-dtb.bin image.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Marek Vasut <marex@denx.de>
9 years agonios2: enlarge the code relocation range
Thomas Chou [Fri, 4 Sep 2015 08:39:16 +0000 (16:39 +0800)]
nios2: enlarge the code relocation range

As we will use u-boot-dtb.bin, the code relocation range
should be adjusted to accommodate the additional dtb.
It might be overkilled to look into dtb header to find the
dtb size, so we will simply use CONFIG_SYS_MONITOR_LEN.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
9 years agonios2: BSS should be cleared only after board_init_f
Thomas Chou [Mon, 7 Sep 2015 00:57:14 +0000 (08:57 +0800)]
nios2: BSS should be cleared only after board_init_f

As dtb in u-boot-dtb.bin overlapped the BSS section,
we should delay the clearing of BSS until dtb is relocated
in board_init_f().

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Acked-by: Marek Vasut <marex@denx.de>
9 years agonios2: move altera_pio_init to board_early_init_r
Thomas Chou [Fri, 4 Sep 2015 08:19:16 +0000 (16:19 +0800)]
nios2: move altera_pio_init to board_early_init_r

As altera_pio_init() uses BSS, it should be moved to
board_early_init_r().

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Acked-by: Marek Vasut <marex@denx.de>
9 years agonios2: permit device tree control of U-Boot
Thomas Chou [Fri, 4 Sep 2015 05:18:00 +0000 (13:18 +0800)]
nios2: permit device tree control of U-Boot

Enable this in the Kconfig so that nios2 boards can use device
tree to configure U-Boot.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Marek Vasut <marex@denx.de>
9 years agonios2: enable CONFIG_NET_RANDOM_ETHADDR
Thomas Chou [Sat, 29 Aug 2015 07:24:01 +0000 (15:24 +0800)]
nios2: enable CONFIG_NET_RANDOM_ETHADDR

Enable CONFIG_NET_RANDOM_ETHADDR to generate a random MAC address
when ETHADDR is not set.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Cc: Joe Hershberger <joe.hershberger@ni.com>
9 years agonios2: move command line configuration to Kconfig
Thomas Chou [Wed, 26 Aug 2015 13:24:35 +0000 (21:24 +0800)]
nios2: move command line configuration to Kconfig

This patch moves command line configuration from board header
file to board defconfig in the way of Kconfig. The change passed
savedefconfig.

This fixes warnings such as : "CONFIG_SYS_HUSH_PARSER" redefined,
when "Use hush shell" is selected with menuconfig, etc.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
9 years agoARM: AM335x: mux: change mmc0 cd pinmux from mmc0_sdcd to gpio
Mugunthan V N [Tue, 13 Oct 2015 08:32:29 +0000 (14:02 +0530)]
ARM: AM335x: mux: change mmc0 cd pinmux from mmc0_sdcd to gpio

Currently omap_hsmmc driver doesn't use sdcd pin to detect
whether the card is present or not. Instead the same pin is used
as GPIO to detect card presence. So change the pin mux mode from
mmc0_sdcd to gpio0_6.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agodrivers: gpio: omap: add support for parsing additional gpio parameters
Mugunthan V N [Tue, 13 Oct 2015 08:27:16 +0000 (13:57 +0530)]
drivers: gpio: omap: add support for parsing additional gpio parameters

With DM_GPIO, gpio parameters like ACTIVE_(LOW/HIGH) are to be
parsed in xlate gpio drivers-ops. Since xlate is not implemented
in omap_gpio driver, the driver considers all gpio to be
ACTIVE_HIGH which is the default case and fails to return actual
gpio status for ACTIVE_LOW gpios. So adding .xlate ops to
omap_gpio.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
9 years agoam437x: Add am57xx_evm_defconfig using CONFIG_DM
Mugunthan V N [Tue, 29 Sep 2015 09:12:27 +0000 (14:42 +0530)]
am437x: Add am57xx_evm_defconfig using CONFIG_DM

Import various DT files for am57xx-beagle-x15 from
Linux Kernel v4.2
Add config file for this board, enable DM, DM_GPIO,
DM_SERIAL and DM_MMC.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
9 years agoti_omap5_common: mmc: do not define DM_MMC for spl
Mugunthan V N [Tue, 29 Sep 2015 09:12:26 +0000 (14:42 +0530)]
ti_omap5_common: mmc: do not define DM_MMC for spl

Since spl doesn't support DM currently, do not define DM_MMC
for spl build.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
asdfsadf

9 years agoam437x: Add am437x_sk_evm_defconfig using CONFIG_DM
Mugunthan V N [Mon, 28 Sep 2015 10:47:52 +0000 (16:17 +0530)]
am437x: Add am437x_sk_evm_defconfig using CONFIG_DM

Import various DT files for am437x-sk-evm from Linux Kernel v4.2
Add config file for this board, enable DM, DM_GPIO, DM_SERIAL
and DM_MMC.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
9 years agoam437x: Add am437x_gp_evm_defconfig using CONFIG_DM
Mugunthan V N [Mon, 28 Sep 2015 10:47:51 +0000 (16:17 +0530)]
am437x: Add am437x_gp_evm_defconfig using CONFIG_DM

Import various DT files for am4372, an43xx pinctrl and
am437x-gp-evm from Linux Kernel v4.2
Add config file for this board, enable DM, DM_GPIO, DM_SERIAL
and DM_MMC.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
9 years agoam43xx_evm: mmc: do not define DM_MMC for spl
Mugunthan V N [Mon, 28 Sep 2015 10:47:50 +0000 (16:17 +0530)]
am43xx_evm: mmc: do not define DM_MMC for spl

Since spl doesn't support DM currently, do not define DM_MMC
for spl build.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
9 years agoam43xx_evm.h: : switch to CONFIG_OMAP_SERIAL for non-SPL DM_SERIAL
Mugunthan V N [Mon, 28 Sep 2015 10:47:49 +0000 (16:17 +0530)]
am43xx_evm.h: : switch to CONFIG_OMAP_SERIAL for non-SPL DM_SERIAL

Tested on am437x gp evm and am437x sk evm

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
9 years agodrivers: serial: serial_omap: add comaptibles for all ti platforms
Mugunthan V N [Mon, 28 Sep 2015 10:47:48 +0000 (16:17 +0530)]
drivers: serial: serial_omap: add comaptibles for all ti platforms

Adding compatibles for am335x, am437x and dra7 platforms.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
9 years agodrivers: serial: serial_omap: populate default clock frequency when not found in dt
Mugunthan V N [Mon, 28 Sep 2015 10:47:47 +0000 (16:17 +0530)]
drivers: serial: serial_omap: populate default clock frequency when not found in dt

In some platforms like am437x, serial node is not populated with
clock-frequency node. So in that case have a default clock-clock
frequency.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
9 years agodefconfig: am335x: gp_evm: enable mmc driver model
Mugunthan V N [Mon, 28 Sep 2015 07:26:32 +0000 (12:56 +0530)]
defconfig: am335x: gp_evm: enable mmc driver model

enable mmc driver model for am335x gp_evm as omap_hsmmc
supports driver model

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agodefconfig: am335x: bbb: enable mmc driver model
Mugunthan V N [Mon, 28 Sep 2015 07:26:31 +0000 (12:56 +0530)]
defconfig: am335x: bbb: enable mmc driver model

enable mmc driver model for am335x bbb as omap_hsmmc
supports driver model

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agodrivers: mmc: omap_hsmmc: convert driver to adopt device driver model
Mugunthan V N [Mon, 28 Sep 2015 07:26:30 +0000 (12:56 +0530)]
drivers: mmc: omap_hsmmc: convert driver to adopt device driver model

adopt omap_hsmmc driver to device driver model

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
9 years agoam335x_evm: mmc: do not define DM_MMC for spl
Mugunthan V N [Mon, 28 Sep 2015 07:26:29 +0000 (12:56 +0530)]
am335x_evm: mmc: do not define DM_MMC for spl

Since spl doesn't support DM currently, do not define DM_MMC
for spl build.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agoomap_hsmmc: update struct hsmmc to accomodate base address from DT
Mugunthan V N [Mon, 28 Sep 2015 07:26:28 +0000 (12:56 +0530)]
omap_hsmmc: update struct hsmmc to accomodate base address from DT

Existing driver gets the actual omap hammc base address + 0x100
bytes as the first 0x100 bytes is not used by the driver. But
with DM conversion the base address from DT is different, to
accommodate the offset adding res0[0x100] to struct hsmmc.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>