Tom Rini [Sun, 26 Oct 2014 18:03:08 +0000 (14:03 -0400)]
Merge git://git.denx.de/u-boot-dm
Fix a trivial conflict over adding <dm.h>
Conflicts:
arch/arm/cpu/armv7/omap3/board.c
Signed-off-by: Tom Rini <trini@ti.com>
Jeroen Hofstee [Wed, 8 Oct 2014 20:58:09 +0000 (22:58 +0200)]
i2c: designware: add an implement i2c protos
Include the i2c header and change the non confirming
functions to do so.
Cc: Heiko Schocher <hs@denx.de>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Acked-by: Heiko Schocher <hs@denx.de>
[trini: Fix i2c_get_bus_num prototype]
Signed-off-by: Tom Rini <trini@ti.com>
Jeroen Hofstee [Wed, 8 Oct 2014 20:58:08 +0000 (22:58 +0200)]
tegra: add proto for pin_mux_mmc
while at it, fix a typo
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Jeroen Hofstee [Wed, 8 Oct 2014 20:58:07 +0000 (22:58 +0200)]
spl: add prototype for jump_to_image_no_args
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Jeroen Hofstee [Wed, 8 Oct 2014 20:58:05 +0000 (22:58 +0200)]
mmc: add prototype for mmc_get_env_addr
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Jeroen Hofstee [Wed, 8 Oct 2014 20:58:04 +0000 (22:58 +0200)]
ide: add missing prototype
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Jeroen Hofstee [Wed, 8 Oct 2014 20:58:03 +0000 (22:58 +0200)]
gpio: add protype for name_to_gpio
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Jeroen Hofstee [Wed, 8 Oct 2014 20:58:02 +0000 (22:58 +0200)]
fdt_support: add prototypes for __weak functions
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Jeroen Hofstee [Wed, 8 Oct 2014 20:58:01 +0000 (22:58 +0200)]
elf: add prototype for valid_elf_image
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Jeroen Hofstee [Wed, 8 Oct 2014 20:58:00 +0000 (22:58 +0200)]
bootm: add prototype for arch_preboot_os
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:59 +0000 (22:57 +0200)]
arm: vectors: provide protypes from vectors.S
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Acked-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:58 +0000 (22:57 +0200)]
twister: add missing includes
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:57 +0000 (22:57 +0200)]
omap3: board: add missing include and proto
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:56 +0000 (22:57 +0200)]
net: davince: add missing include
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:55 +0000 (22:57 +0200)]
mmc: bcm2835_sdhci: add missing include
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:54 +0000 (22:57 +0200)]
lib: bootm: add missing include
since the vxworks weaks are reimplement make
sure their prototypes are visible.
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:53 +0000 (22:57 +0200)]
leds: missing include
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:52 +0000 (22:57 +0200)]
imx: add missing includes
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:51 +0000 (22:57 +0200)]
common/cmd_elf.c: add missing include
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
[trini: bootm.h must come after common.h]
Signed-off-by: Tom Rini <trini@ti.com>
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:50 +0000 (22:57 +0200)]
arch-mx: add missing include
mxs_wait_mask_set and friends need a declaration
of struct mxs_register_32.
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:49 +0000 (22:57 +0200)]
string.h: add missing prototypes
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:48 +0000 (22:57 +0200)]
common:console: add missing include
search_device is declared in iomux, but console only
had the definition. This prevents a warning.
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Tom Rini [Sat, 25 Oct 2014 00:26:19 +0000 (20:26 -0400)]
modem.c: Switch to debug() from dbg found in common/console.c
Signed-off-by: Tom Rini <trini@ti.com>
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:47 +0000 (22:57 +0200)]
video: ipu: prevent warnings with W=1
- make local functions static
- remove unused is_interlaced function
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:46 +0000 (22:57 +0200)]
tegra: make local functions static
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:44 +0000 (22:57 +0200)]
serial: make local functions static
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:43 +0000 (22:57 +0200)]
sdhci: make local functions static
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:42 +0000 (22:57 +0200)]
omap_gpmc: fix warnigs with W=1
- make omap_spl_dev_ready static
- make omap_reverse_list static, move to under CONFIG_NAND_OMAP_ELM
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Signed-off-by: Tom Rini <trini@ti.com>
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:41 +0000 (22:57 +0200)]
omap3: make local functions static
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:40 +0000 (22:57 +0200)]
net: fec_mxc: make local functions static
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:39 +0000 (22:57 +0200)]
lmb: make local functions static
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:38 +0000 (22:57 +0200)]
image-fit: make local function static
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:37 +0000 (22:57 +0200)]
gpio: make local functions static
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:36 +0000 (22:57 +0200)]
eth: make eth_address_set static
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:35 +0000 (22:57 +0200)]
env_nand: make local functions static
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:34 +0000 (22:57 +0200)]
ehci-hcd.c: make local functions static
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:33 +0000 (22:57 +0200)]
disk/part.c: make local function static
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:32 +0000 (22:57 +0200)]
common: board_r: make local functions static
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:31 +0000 (22:57 +0200)]
common: cmd_elf: make do_bootelf_exec static
do_bootelf_exec was a weak function without a prototype nor
and strong version. Just make it static.
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:30 +0000 (22:57 +0200)]
video: use __weak
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:29 +0000 (22:57 +0200)]
usb: use __weak
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:28 +0000 (22:57 +0200)]
samsung: board: use __weak
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:27 +0000 (22:57 +0200)]
pci: use __weak
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:26 +0000 (22:57 +0200)]
net: phy: fix warnings with W=1
get_phy_id is marked weak but has no protype nor a
strong version, just make it static. Use __weak for
board_phy_config.
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:25 +0000 (22:57 +0200)]
misc: use __weak
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:23 +0000 (22:57 +0200)]
cti_flash.c: use __weak when requested for flash_(read|write){8,16,32,64}
For various reasons (design, errata) boards may need to implement their
own versions of these accessors. So in the case of
CONFIG_CFI_FLASH_USE_WEAK_ACCESSOR mark the functions as weak. In the
normal case mark them as static to allow for better optimization.
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
[trini: Reword commit message]
Signed-off-by: Tom Rini <trini@ti.com>
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:22 +0000 (22:57 +0200)]
common: board: use __weak
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Jeroen Hofstee [Wed, 8 Oct 2014 20:57:21 +0000 (22:57 +0200)]
arm: board: use __weak
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Acked-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
Masahiro Yamada [Thu, 23 Oct 2014 13:26:12 +0000 (22:26 +0900)]
serial: remove uniphier_serial_initialize() call
The UniPhier serial driver has been converted to driver model.
Let's remove uniphier_serial_initialize() call from the old
serial driver framework.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
Masahiro Yamada [Thu, 23 Oct 2014 13:26:11 +0000 (22:26 +0900)]
serial: uniphier: move CONFIG_UNIPHIER_SERIAL to Kconfig
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
Masahiro Yamada [Thu, 23 Oct 2014 13:26:10 +0000 (22:26 +0900)]
dm: serial: use Driver Model for UniPhier serial driver
This commit converts UniPhier on-chip serial driver to driver model.
Since UniPhier SoCs do not have Device Tree support, some board files
should be added under arch/arm/cpu/armv7/uniphier/ph1-*/ directories.
(Device Tree support for UniPhier platform is still under way.)
Now the base address and master clock frequency are passed from
platform data, so CONFIG_SYS_UNIPHIER_SERIAL_BASE* and
CONFIG_SYS_UNIPHIER_UART_CLK should be removed.
Tested on UniPhier PH1-LD4 ref board.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
Masahiro Yamada [Thu, 23 Oct 2014 13:26:09 +0000 (22:26 +0900)]
dm: add entries to Kconfig
Create entries of CONFIG_DM, CONFIG_DM_SERIAL, CONFIG_DM_GPIO
and CONFIG_DM_SPI.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
Masahiro Yamada [Thu, 23 Oct 2014 13:26:08 +0000 (22:26 +0900)]
dm: serial: consolidate common code more
Commit
b8893327e9d2 (dm: serial: Put common code into separate functions)
consolidated getc() and putc(). This commit does more puts() and tsts().
Also rename locally used functions to _serial_*() for clarification
because we have similar functions names here are there in this file.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
Masahiro Yamada [Thu, 23 Oct 2014 13:26:07 +0000 (22:26 +0900)]
dm: serial: remove unnecessary casting
The type (void *) can be directly passed to a function that
takes a specific pointer type.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
Masahiro Yamada [Thu, 23 Oct 2014 13:26:06 +0000 (22:26 +0900)]
dm: serial: fix console putc
Commit
b8893327e9d2 (dm: serial: Put common code into separate functions)
consolidated getc() correctly, but introduced another bug to putc();
serial_stub_putc() passes sdev->priv to serial_putc_dev(), but
serial_putc_dev() uses cur_dev instead of the given argument.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
Masahiro Yamada [Thu, 23 Oct 2014 13:26:05 +0000 (22:26 +0900)]
serial: add static directive to local functions
The functions _serial_putc, _serial_putc_raw, _serial_puts,
_serial_getc, _serial_tstc, _serial_setbrg are defined and used
locally in each of serial_ns16550.c and serial_s3c24x0.c.
Add static directive to them and remove declarations from
include/common.h.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
Masahiro Yamada [Fri, 24 Oct 2014 03:41:19 +0000 (12:41 +0900)]
dm: move platform data headers to include/dm/platform_data
The platform_data definitions are generally referenced from both
drivers and board files. That is why header files defining
platform_data sturectures are placed in "include" directory,
but our top level "include" directory is already too cluttered.
Let's collect platform_data definitions under the directory
"include/dm/platform_data" like Linux gathers ones around under
"include/linux/platform_data".
This commit moves two header files:
include/serial_mxc.h -> include/dm/platform_data/serial_mxc.h
include/serial_pl01x.h -> include/dm/platform_data/serial_pl01x.h
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Simon Glass [Fri, 10 Oct 2014 13:49:20 +0000 (07:49 -0600)]
dm: x86: Convert coreboot serial to use driver model
This makes use of the existing device tree node to use driver model
for the serial console.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Fri, 10 Oct 2014 13:49:19 +0000 (07:49 -0600)]
dm: x86: dts: Add additional info to the serial port node
Add more information so that U-Boot can find the address of the serial port.
Also fix the reg-shift value.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Fri, 10 Oct 2014 13:49:18 +0000 (07:49 -0600)]
dm: x86: Convert Intel ICH6 GPIO driver to use driver model
Convert over this driver, using device tree to pass in the required
information. The peripheral is still probed, just the number of GPIO banks
and their offsets is in the device tree (previously this was a table in
the driver).
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Fri, 10 Oct 2014 13:49:17 +0000 (07:49 -0600)]
dm: x86: Add a gpio header for coreboot
This code doesn't follow the normal approach of having its arch-specific
definitions in an arch-specific directory. Add a new arch-specific file
and make use of it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Fri, 10 Oct 2014 13:49:16 +0000 (07:49 -0600)]
dm: x86: Support pre-reloc malloc()
Add support for this by reserving a block of memory below global_data.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Fri, 10 Oct 2014 13:49:15 +0000 (07:49 -0600)]
dm: x86: Zero global data before board_init_f()
To permit information to be passed from the early U-Boot code to
board_init_f() we cannot zero the global_data in board_init_f(). Instead
zero it in the start-up code.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Fri, 10 Oct 2014 13:49:14 +0000 (07:49 -0600)]
dm: x86: Remove ebp assembler warning in zimage.c
This code generates warnings with recent gcc versions. We really don't need
the clobber specification, so just drop it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Fri, 10 Oct 2014 13:49:13 +0000 (07:49 -0600)]
dm: serial: ns16550: Add a cast to the I/O operations
This generates a warning when driver model is enabled, so fix it by adding
a cast.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 4 Oct 2014 17:29:57 +0000 (11:29 -0600)]
dm: gpio: Remove unused get_state() uclass method
This is no longer used so drop it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 23 Oct 2014 19:15:58 +0000 (13:15 -0600)]
dm: dts: Move omap device tree includes to correct place
These ended up in arch/arm/dts/dt-bindings temporarily, but in fact the
correct place is now include/dt-bindings. Move them to be consistent.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 4 Oct 2014 17:29:56 +0000 (11:29 -0600)]
dm: gpio: imx: Drop request()/free() in the driver
Now that the uclass supports gpio_request/free() there is no need for the
driver to implement it too. Drop this unnecessary code.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 4 Oct 2014 17:29:55 +0000 (11:29 -0600)]
dm: gpio: exynos: Drop request()/free() in the driver
Now that the uclass supports gpio_request/free() there is no need for the
driver to implement it too. Drop this unnecessary code.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 4 Oct 2014 17:29:54 +0000 (11:29 -0600)]
dm: gpio: rpi_b: Drop request()/free() in the driver
Now that the uclass supports gpio_request/free() there is no need for the
driver to implement it too. Drop this unnecessary code.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 4 Oct 2014 17:29:53 +0000 (11:29 -0600)]
dm: gpio: omap3: Drop request()/free() in the driver
Now that the uclass supports gpio_request/free() there is no need for the
driver to implement it too. Drop this unnecessary code.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 4 Oct 2014 17:29:52 +0000 (11:29 -0600)]
dm: gpio: tegra: Drop request()/free() in the driver
Now that the uclass supports gpio_request/free() there is no need for the
driver to implement it too. Drop this unnecessary code.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 4 Oct 2014 17:29:51 +0000 (11:29 -0600)]
test: dm: Add additional GPIO tests
Add tests for gpio_requestf() and for memory leaks.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 4 Oct 2014 17:29:50 +0000 (11:29 -0600)]
test: dm: Support memory leak checking as a core feature
Check the state of the malloc() heap before each test is run, so that tests
can verify that all is well at the end. Provide helper functions to mark
the heap and to check that it returns to its initial state.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 4 Oct 2014 17:29:49 +0000 (11:29 -0600)]
dm: gpio: Add gpio_requestf() helper for printf() strings
Add a helper which permits a printf()-style format string for the requester
string.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 4 Oct 2014 17:29:48 +0000 (11:29 -0600)]
test: dm: Update GPIO tests for new gpio_request() method
Now that gpio_request() is handled by the uclass, updates the tests
accordingly.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 4 Oct 2014 17:29:47 +0000 (11:29 -0600)]
dm: gpio: sandbox: Drop request()/free() in the driver
Now that the uclass supports gpio_request/free() there is no need for the
driver to implement it too. Drop this unnecessary code.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 4 Oct 2014 17:29:46 +0000 (11:29 -0600)]
dm: gpio: sandbox: Implement the remove() method
This method frees memory so we must make sure to implement it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 4 Oct 2014 17:29:45 +0000 (11:29 -0600)]
dm: gpio: sandbox: Implement the get_function() method
Implement this method so that the 'gpio' command can do its job correctly.
For sandbox we only support input and output states for a gpio.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 4 Oct 2014 17:29:44 +0000 (11:29 -0600)]
dm: Move the function for getting GPIO status into the uclass
This function can be more easily tested if it is in the uclass.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 4 Oct 2014 17:29:43 +0000 (11:29 -0600)]
dm: gpio: Add gpio_get_function() and friends
Add helpers to the uclass to allow finding out the pin function.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sat, 4 Oct 2014 17:29:42 +0000 (11:29 -0600)]
dm: gpio: Implement GPIO reservation in the uclass
We have several GPIO drivers now and all are doing similar things to record
which GPIOs are reserved.
Move this logic into the uclass to make the drivers similar.
We retain the request()/free() methods since currently one driver does use
these for setting up the pin.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 23 Oct 2014 03:37:15 +0000 (21:37 -0600)]
dm: omap3: Move to driver model for GPIO and serial
Adjust the configuration for the am33xx boards, including beagleboard,
to use driver model.
Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Tom Rini <trini@ti.com>
Simon Glass [Thu, 23 Oct 2014 03:37:14 +0000 (21:37 -0600)]
dm: am33xx: Move to driver model for GPIO and serial
Adjust the configuration for the am33xx boards, including beaglebone black
to use driver model.
This can be extended to other OMAP boards once platform data is provided
for them.
Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Tom Rini <trini@ti.com>
Simon Glass [Thu, 23 Oct 2014 03:37:13 +0000 (21:37 -0600)]
dm: am335x: Remove serial options from CONFIG_SYS_EXTRA_OPTIONS
With these options in place it is not possible to change the serial port
using 'make menuconfig' or similar. It seems to result in duplicate
defines.
For example:
In file included from include/linux/kconfig.h:4:0,
from <command-line>:0:
include/generated/autoconf.h:20:0: note: this is the location of the previous definition
#define CONFIG_CONS_INDEX 2
^
The default option seems to be 1 anyway, in board/ti/am335x/Kconfig.
Remove the options so that we can adjust the serial port if required.
Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Tom Rini <trini@ti.com>
Simon Glass [Thu, 23 Oct 2014 03:37:12 +0000 (21:37 -0600)]
dm: omap: serial: Add driver model support
Add driver model support to this driver, while retaining support for the
legacy system. Driver model serial support is enabled with CONFIG_DM_SERIAL
as usual.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@ti.com>
Simon Glass [Thu, 23 Oct 2014 03:37:11 +0000 (21:37 -0600)]
dm: am33xx: Provide platform data for serial
Provide suitable platform data for am33xx boards, so that these boards can
use driver model for serial.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@ti.com>
Simon Glass [Thu, 23 Oct 2014 03:37:10 +0000 (21:37 -0600)]
dm: am33xx: Provide platform data for GPIOs
Provide suitable platform data for am33xx boards, so that these boards can
use driver model for GPIO access.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@ti.com>
Simon Glass [Thu, 23 Oct 2014 03:37:09 +0000 (21:37 -0600)]
dm: omap: gpio: Support driver model
Add driver model support to this driver, while retaining support for the
legacy system. Driver model GPIO support is enabled with CONFIG_DM_GPIO
as usual.
Since gpio_is_valid() no longer exists, we can use the -EINVAL error
returned from gpio_request().
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@ti.com>
Simon Glass [Thu, 23 Oct 2014 03:37:08 +0000 (21:37 -0600)]
dm: omap: gpio: Put _get_gpio_value() logic into its own function
Add a separate internal helper function to get a GPIO value, so that we
will be able to call it with the driver model version and avoid code
duplication.
Also move gpio_get_bank() and check_gpio() down below the helper functions
as these won't be needed with driver model.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@ti.com>
Simon Glass [Thu, 23 Oct 2014 03:37:07 +0000 (21:37 -0600)]
dm: dts: omap: Select correct console for beaglebone
Select serial0 as the console.
Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Tom Rini <trini@ti.com>
Simon Glass [Thu, 23 Oct 2014 03:37:06 +0000 (21:37 -0600)]
dm: serial: Support CONFIG_CONS_INDEX if available
Try to use this option to select the correct uart for the console. This
mimics the behaviour of drivers/serial.c.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@ti.com>
Simon Glass [Thu, 23 Oct 2014 03:37:05 +0000 (21:37 -0600)]
dm: ns16550: Correct the probe logic for platform data
The probe logic sets up the pointer to the platform data in the device
tree decode method. It should be done in the probe() method, and anyway
the device tree decode method can't be used when CONFIG_OF_CONTROL is
not enabled.
Fix these two problems.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@ti.com>
Simon Glass [Thu, 23 Oct 2014 03:37:04 +0000 (21:37 -0600)]
dm: ns16550: Use an address instead of a pointer for the uart base
It is inconvenient to have to use casts when specifying platform data. Also
it is not strictly correct, since we should use map_sysmem() to convert an
address to a pointer.
Adjust the platform data to use an address.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@ti.com>
Simon Glass [Thu, 23 Oct 2014 03:37:03 +0000 (21:37 -0600)]
dm: serial: ns16550: Correct logic for checking for character
There is a bug in the logic which checks for an available character. This
can cause invalid characters to be received - this was noticed on
beaglebone. Fix it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@ti.com>
Simon Glass [Thu, 23 Oct 2014 03:37:02 +0000 (21:37 -0600)]
dm: serial: Reset the watchdog while waiting in getc()
We have moved the busy-wait loop out of drivers and into the uclass. This
means that we must reset the watchdog when busy-waiting.
Note: some drivers may still have a busy-wait even with driver model, as
a transition mechanism. Driver model will tolerate this, and is can be
cleaned up when all users of the driver use driver model. An example is
ns16550.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@ti.com>
Simon Glass [Thu, 23 Oct 2014 03:37:01 +0000 (21:37 -0600)]
dm: gpio: Support numbered GPIOs
At present banks must be named and it is not possible to refer to GPIOs by
number in driver model. Some boards use numbering - e.g. OMAP. It is fairly
easy to support by detecting the absense of a bank name (which starts with
a letter).
Add support for numbered GPIOs in addition to the existing bank support.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@ti.com>
Masahiro Yamada [Tue, 21 Oct 2014 04:18:32 +0000 (13:18 +0900)]
kbuild: clear VENDOR variable to fix build error on tcsh
Since the environment "VENDOR" is set in tcsh, it must be cleared in our
makefile. Otherwise, boards without CONFIG_SYS_VENDOR fail to build:
> make CROSS_COMPILE=arm-linux-gnueabi- wandboard_quad_defconfig all
[ snip ]
AR arch/arm/lib/lib.a
CC arch/arm/lib/eabi_compat.o
scripts/Makefile.build:55: /home/foo/u-boot/board/unknown/wandboard/ \
Makefile: No such file or directory
make[2]: *** No rule to make target `/home/foo/u-boot/board/unknown/ \
wandboard/Makefile'. Stop.
make[1]: *** [board/unknown/wandboard] Error 2
make: *** [__build_one_by_one] Error 2
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Reported-by: Tom Everett <tom@khubla.com>
Reported-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Tom Rini [Thu, 23 Oct 2014 18:05:34 +0000 (14:05 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-tegra
Masahiro Yamada [Thu, 23 Oct 2014 16:30:46 +0000 (01:30 +0900)]
mips: enable CONFIG_USE_PRIVATE_LIBGCC by default
Without the private libgcc, we need a full multilib toolchain with
different libgcc or multiple toolchains to build all BE/LE and
hard-float/soft-float variants of MIPS boards. That is not feasible.
This commit allows us to build all the MIPS boards with a single
kernel.org toolchain:
https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.9.0/
x86_64-gcc-4.9.0-nolibc_mips-linux.tar.xz
This change sounds reasonable for most users. If necessary,
you can disable this option via "make menuconfig" or friends.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>