summaryrefslogtreecommitdiff
path: root/drivers
Commit message (Collapse)AuthorAgeLines
* input: i8042: Provide feature to disable keyboard before booting kernelLouis Yung-Chieh Lo2012-10-19-0/+38
| | | | | | | | | | | | | | | | The BIOS leaves the keyboard enabled during boot time so that any keystroke would interfere kernel driver initialization. Add a way to disable the keyboard to make sure no scancode will be generated during the boot time. Note that the keyboard will be re-enabled again after the kernel driver is up. This code can be called from the board functions. Signed-off-by: Louis Yung-Chieh Lo <yjlou@chromium.org> Signed-off-by: Louis Yung-Chieh Lo <yjlou@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@ti.com>
* input: Provide a board specific mechanism to decide whether to skip i8042 initGabe Black2012-10-19-1/+12
| | | | | | | | | | | | | This change adds a board overridable function which can be used to decide whether or not to initialize the i8042 keyboard controller. On systems where it isn't actually connected to anything, this can save a significant amount of boot time. On Stumpy, this saves about 200ms on boot. Signed-off-by: Gabe Black <gabeblack@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@ti.com>
* input: Use finer grain udelays while waitng for the i8042 keyboard buffer to ↵Gabe Black2012-10-19-6/+3
| | | | | | | | | | | | | | | | | | | | | empty On x86, the i8042 keyboard controller driver frequently waits for the keyboard input buffer to be empty to make sure the controller has had a chance to process the data it was given. The way the delay loop was structured, if the controller hadn't cleared the corresponding status bit immediately, it would wait 1ms before checking again. If the keyboard responded quickly but not instantly, the driver would still wait a full 1ms when perhaps 1us would have been sufficient. Because udelay is a busy wait anyway, this change decreases the delay between checks to 1us. Also, this change gets rid of a hardcoded 250ms delay. On Stumpy, this saves 100-150ms during boot. Signed-off-by: Gabe Black <gabeblack@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@ti.com>
* ColdFire: uart: fix build failure for missing header filesAlison Wang2012-10-19-0/+2
| | | | | | | | | | | | | The following commit introduces some build failures for ColdFire platform. commit abaef69fbe683197607febeb2cc619490aca2a10 Author: Marek Vasut <marex@denx.de> Date: Thu Sep 13 16:51:38 2012 +0200 Add the missed header files. Sign-off-by: Alison Wang <b18965@freescale.com>
* m68k: net: Fix unused variable in mcfmii.cMarek Vasut2012-10-19-3/+1
| | | | | | | | | | | The following warning was produced, fix it: mcfmii.c: In function 'mcffec_miiphy_write': mcfmii.c:318:8: warning: variable 'rdreg' set but not used [-Wunused-but-set-variable] Signed-off-by: Marek Vasut <marex@denx.de> Cc: "Jin Zhengxiong-R64188" <R64188@freescale.com> Cc: Jason Jin <jason.jin@freescale.com>
* Merge branch 'master' of git://git.denx.de/u-boot-i2cTom Rini2012-10-17-35/+104
|\
| * i2c: sh_i2c: use setbits/clrbits macroTetsuyuki Kobayashi2012-10-16-4/+4
| | | | | | | | | | | | | | Use setbits/clrbits macro when read-modify-write register. Signed-off-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp> Acked-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
| * i2c: sh_i2c.c: check error in i2c_read and i2c_writeTetsuyuki Kobayashi2012-10-16-18/+32
| | | | | | | | | | | | | | | | Before this patch, i2c_{read,write} always returned 0. Check TACK in i2c_raw_{read,write} so that i2c_{read,write} return non-zero when error. Acked-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> Signed-off-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
| * i2c: sh_i2c: enable i2c_probeTetsuyuki Kobayashi2012-10-16-5/+27
| | | | | | | | | | | | | | | | | | Before this patch i2c_probe() always returned 0 and "i2c probe" command did not work properly. Modify i2c_set_addr() to check TACK when waiting DTE and make i2c_probe() call this function. Acked-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> Signed-off-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
| * i2c: sh_i2c.c: support I2C2, I2C3 and I2C4Tetsuyuki Kobayashi2012-10-16-0/+15
| | | | | | | | | | | | | | sh_i2c.c support I2C0 and I2C1. This patch extends it to I2C4. Acked-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> Signed-off-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
| * i2c: sh_i2c.c: adjust for SH73A0Tetsuyuki Kobayashi2012-10-16-0/+4
| | | | | | | | | | | | | | | | Adjust i2c_raw_read() in sh_i2c.c to work for SH73A0. After this patch, "i2c md" and "i2c mw" command on U-Boot work properly on KZM-A9-GT board. Acked-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> Signed-off-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
| * i2c: sh_i2c.c: correct BUSY bit define in ICSRTetsuyuki Kobayashi2012-10-16-1/+1
| | | | | | | | | | | | | | Correct BUSY bit define in ICSR from (1<<3) to (1<<4). Acked-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> Signed-off-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
| * i2c: sh_i2c.c: support iccl and icch extensionTetsuyuki Kobayashi2012-10-16-8/+22
| | | | | | | | | | | | | | | | R-mobile SoC (at least SH73A0) has extension bits to store 8th bit of iccl and icch. This patch add support for the extentin bits. Acked-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> Signed-off-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
* | kerneldoc: Annotate drivers/serial/serial.cMarek Vasut2012-10-17-0/+165
| | | | | | | | | | | | | | | | Add kerneldoc annotations into serial core. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Marek Vasut <marek.vasut@gmail.com> Cc: Tom Rini <trini@ti.com>
* | serial: Reorder get_current()Marek Vasut2012-10-17-9/+12
| | | | | | | | | | | | | | | | | | | | Reorder the get_current() function to make it a bit more readable. The code does not grow and there is minor change in the code logic, where dev != NULL is now checked in any case. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Marek Vasut <marek.vasut@gmail.com> Cc: Tom Rini <trini@ti.com>
* | serial: Reorder serial_assign()Marek Vasut2012-10-17-5/+6
| | | | | | | | | | | | | | | | | | | | Reorder serial_assign() function to get rid of the extra level of indentation. Also, adjust the return value to be -EINVAL instead of positive one to be more consistent. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Marek Vasut <marek.vasut@gmail.com> Cc: Tom Rini <trini@ti.com>
* | serial: Use default_serial_puts() in driversMarek Vasut2012-10-17-167/+22
| | | | | | | | | | | | | | | | | | | | Replace the in-place ad-hoc implementation of serial_puts() within the drivers with default_serial_puts() call. This cuts down on the code duplication quite a bit. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Marek Vasut <marek.vasut@gmail.com> Cc: Tom Rini <trini@ti.com>
* | serial: Implement default_serial_puts()Marek Vasut2012-10-17-0/+7
|/ | | | | | | | | | | | | | U-Boot contains a lot of duplicit implementations of serial_puts() call which just pipes single characters into the port in loop. Implement function that does this behavior into common code, so others can make easy use of it. This function is called default_serial_puts() and it's sole purpose is to call putc() in loop on the whole string passed to it. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Marek Vasut <marek.vasut@gmail.com> Cc: Tom Rini <trini@ti.com>
* mx51: Fix USB PHY clocksBenoît Thébaudeau2012-10-15-1/+2
| | | | | | | | | | | | | | | The i.MX51 has a single USB PHY clock, while the i.MX53 has two. These 3 clocks have different clock gate control bit-fields. The existing code was correct only for i.MX53, so this patch fixes the i.MX51 use case. Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Marek Vasut <marex@denx.de> Cc: Jana Rapava <fermata7@gmail.com> Cc: Wolfgang Grandegger <wg@denx.de> Cc: Igor Grinberg <grinberg@compulab.co.il>
* mx5: Use explicit clock gate namesBenoît Thébaudeau2012-10-15-1/+1
| | | | | | | | Use clock gate definitions having names showing clearly the gated clock instead of names giving only a register field index. Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com> Cc: Stefano Babic <sbabic@denx.de>
* imx: Use MXC_I2C_CLK in imx i2c driverMatthias Weisser2012-10-15-2/+2
| | | | | | | | i2c didn't work on imx25 due to missing MXC_IPG_PERCLK. Now using MXC_I2C_CLK on all imx systems using i2c. Signed-off-by: Matthias Weisser <weisserm@arcor.de> Acked-by: Stefano Babic <sbabic@denx.de>
* i.MX6: provide functional names for CCM_CCGR0-CCGR6 bit fieldsEric Nelson2012-10-15-2/+8
| | | | | | | | | | | | | Add meaningful constants for each clock channels and use them for enabling and disabling i.MX6 clocks. Includes an update to enable/disable the IPU1 clock in drivers/video/ipu_common to remove IMX5x register access when used on i.MX6 as discussed in V1: http://patchwork.ozlabs.org/patch/185129/ Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
* tegra: nand: add board pinmuxLucas Stach2012-10-15-1/+0
| | | | | | | | Boards may require a different pinmux setup for NAND than the default one. Add a way to call into board specific code to set this up. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Tom Warren <twarren@nvidia.com>
* Tegra20: Move some include files to arch-tegra for sharing with Tegra30Tom Warren2012-10-15-14/+12
| | | | | | | | | | | The move is pretty straight-forward. ap20.h and tegra20.h were renamed to ap.h and tegra.h. Some files remain in arch-tegra20 but 'include' a file in 'arch-tegra' with #defines & structs that will be common between T20 and T30 HW. HW-specific #defines, etc. stay in the 'arch-tegra20' 'root' file. All boards build OK w/MAKEALL -s tegra20. Checkpatch.pl runs clean. Seaboard works OK. Signed-off-by: Tom Warren <twarren@nvidia.com>
* input: Add debugging for key matrix key codesSimon Glass2012-10-15-0/+2
| | | | | | | | | These are read from the fdt - add a debug feature to display the mapping on start-up. See that we get debug output listing the keycodes Signed-off-by: Simon Glass <sjg@chromium.org>
* input: Allow key ghosting filter to be disabledSimon Glass2012-10-15-3/+8
| | | | | | | Some keyboards will not need a key ghosting filter, so make this feature optional. Signed-off-by: Simon Glass <sjg@chromium.org>
* input: Separate out keyboard repeat/delay from initSimon Glass2012-10-15-6/+12
| | | | | | | | | | | It is inconvenient to have to specify the keyboard repeat and delay at init time if it is not yet available, so move this into a separate function. Some drivers will want to do this when their keyboard init routine is actually called. Signed-off-by: Simon Glass <sjg@chromium.org>
* input: Correct key_matrix fdt decodingSimon Glass2012-10-15-4/+7
| | | | | | | | | Some issues with this were not addressed in the previous series. Fix up the binding decoding to deal with what is actually expected in the fdt. This corrects the broken keyboard on seaboard. Signed-off-by: Simon Glass <sjg@chromium.org>
* sata.h: Make all sata/ata drivers include <sata.h>Pavel Herrmann2012-10-15-16/+7
| | | | | | | | | | - block_dev_desc_t says that block_(read|write) take lbaint_t for blkcnt not ulong. - We also move the extern of sata_dev_desc into <sata.h> - Remove now duplicate declarations from driver-specific headers. Signed-off-by: Tom Rini <trini@ti.com> Signed-off-by: Pavel Herrmann <morpheus.ibis@gmail.com>
* sil_sata: Make sata_write() comply with <part.h>Tom Rini2012-10-15-3/+3
| | | | | | | sata_write() takes a const void as the last argument. Fixing this means we also need to make ata_low_level_rw_lba{28,48} also take a const void. Signed-off-by: Tom Rini <trini@ti.com>
* sata_dwc: Make sata_write() use const void, per <part.h>Tom Rini2012-10-15-1/+1
| | | | Signed-off-by: Tom Rini <trini@ti.com>
* pata_bfin: Make sata_{read,write}() comply with <part.h>Tom Rini2012-10-15-2/+2
| | | | | | These functions take lbaint_t for blkcnt. Signed-off-by: Tom Rini <trini@ti.com>
* fsl_sata: Make sata_{read,write}() comply with <part.h>Tom Rini2012-10-15-4/+6
| | | | | | | | | - sata_write() takes a const void as the last argument. Fixing this means we also need to make ata_low_level_rw_lba{28,48} also take a const void. - Both sata_{read,write} take lbaint_t for blkcnt and ulong for blknr Signed-off-by: Tom Rini <trini@ti.com>
* dwc_ahsata: Make sata_write() comply with <part.h>Tom Rini2012-10-15-4/+4
| | | | | | | | sata_write() takes a const void as the last argument. Fixing this means we also need to make ata_low_level_rw_lba{28,48} also take a const void. Acked-by: Stefano Babic <sbabic@denx.de> Signed-off-by: Tom Rini <trini@ti.com>
* ata_piix: sata_write must take a const void argument.Tom Rini2012-10-15-2/+2
| | | | Signed-off-by: Tom Rini <trini@ti.com>
* ata_piix: Fix checkpatch issuesTom Rini2012-10-15-267/+232
| | | | | | | | While in here also: - Switch to debug from custom PRINTF for debugging. - Use mdelay rather than custom msleep. Signed-off-by: Tom Rini <trini@ti.com>
* pxa25x: Add support for USB ethernet gadgetLukasz Dalek2012-10-15-0/+2222
| | | | | | | Add to pxa25x based devices support for USB ethernet gadget. This is a port of pxa25x UDC driver from Linux kernel. Signed-off-by: Lukasz Dalek <luk0104@gmail.com>
* usbether: Removed DEV_CONFIG_{CDC,SUBSET}Lukasz Dalek2012-10-15-45/+30
| | | | | | | Removed DEV_CONFIG_CDC and DEV_CONFIG_SUBSET and replaced it with CONFIG_USB_ETH_CDC and CONFIG_USB_ETH_SUBSET. Signed-off-by: Lukasz Dalek <luk0104@gmail.com>
* usbether: Define CONFIG_USB_ETH_{CDC,SUBSET}Lukasz Dalek2012-10-15-5/+14
| | | | | | | Introduced CONFIG_USB_ETH_CDC and CONFIG_USB_ETH_SUBSET as preparation for removal DEV_CONFIG_CDC and DEV_CONFIG_SUBSET Signed-off-by: Lukasz Dalek <luk0104@gmail.com>
* usbether: Fixed bug when using with PXA25X chipsLukasz Dalek2012-10-15-1/+16
| | | | | | | | | | PXA25X chips don't support alternate settings so driver uses non-CDC driver. But only code defined between DEV_CONFIG_CDC signals that network is up. This patch is fixing this bug by signaling that network is up after USB SET_INTERFACE request. Signed-off-by: Lukasz Dalek <luk0104@gmail.com>
* usb: ulpi: add indicator configuration functionLucas Stach2012-10-15-4/+28
| | | | | | | | | | | Allows for easy configuration of the VBUS indicator related ULPI config bits. Also move the external indicator setup from ulpi_set_vbus() to the new function. Signed-off-by: Lucas Stach <dev@lynxeye.de> Acked-by: Igor Grinberg <grinberg@compulab.co.il>
* usb: ehci: don't print debug outputLucas Stach2012-10-15-1/+1
| | | | | | | This is clearly some sort of debug output and should not be printed during normal operation. Signed-off-by: Lucas Stach <dev@lynxeye.de>
* tegra20: port to new ehci interfaceLucas Stach2012-10-15-3/+2
| | | | | | | EHCI interface now supports more than one controller. Wire up our usb functions to use this new interface. Signed-off-by: Lucas Stach <dev@lynxeye.de>
* usb: add support for multiple usb controllersLucas Stach2012-10-15-1/+1
| | | | | | | | | Allows to initialize more than one USB controller at once. v2: print message when controller stop fails Signed-off-by: Lucas Stach <dev@lynxeye.de> Reviewed-by: Marek Vasut <marex@denx.de>
* usb: ehci: rework to take advantage of new lowlevel interfaceLucas Stach2012-10-15-200/+171
| | | | | | | | | | | | | | Kill off ehci-core.h It was used to specify some static controller data. To support more than one controller being active at any time we have to carry the controller data ourselfes. Change the ehci interface accordingly. NOTE: OMAP implemented the ehci stuff a bit backwards and should be fixed to do the same thing as other platforms. But the change for now is at least compile clean. Signed-off-by: Lucas Stach <dev@lynxeye.de> Reviewed-by: Marek Vasut <marex@denx.de>
* usb: lowlevel interface change to support multiple controllersLucas Stach2012-10-15-12/+12
| | | | | | | | | | | Carry an index in the lowlevel usb functions to make specify the respective usb controller. Also pass through an controller struct from lowlevel_init to the creation of the root usb device of this controller. Signed-off-by: Lucas Stach <dev@lynxeye.de> Reviewed-by: Marek Vasut <marex@denx.de>
* ppc4xx: Remove AP1000 board supportStefan Roese2012-10-15-41/+1
| | | | | | | | | As the board seems to be unmaintained for some time, lets remove the support in mainline completely. Signed-off-by: Stefan Roese <sr@denx.de> Cc: James MacAulay <james.macaulay@amirix.com> Acked-by: Marek Vasut <marex@denx.de>
* serial: Enhance the manual relocationMarek Vasut2012-10-15-6/+14
| | | | | | | | | | | | | Enhance the manual relocation of drivers operations structure by checking if the entries are NULL and increment them only if they are not. This allows for setting any entry to NULL and it will survive the manual relocation. 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>
* serial: Compile drivers/serial/serial.c by defaultMarek Vasut2012-10-15-1/+1
| | | | | | | | | | | | | Compile drivers/serial/serial.c by default both into SPL and into non-SPL builds, since CONFIG_SERIAL_MULTI is now the default state. Also having common/serial.c in by default now, it's pointless to keep -DCONFIG_SERIAL_MULTI in CPPFLAGS any longer, so remove it as well. 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>
* serial: Remove CONFIG_SERIAL_MULTI from serial driversMarek Vasut2012-10-15-972/+0
| | | | | | | | | | | | Remove the support for not-CONFIG_SERIAL_MULTI part from serial port drivers and some board files. Since CONFIG_SERIAL_MULTI is now enabled by default, that part is a dead code. Remove it. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Marek Vasut <marek.vasut@gmail.com> Cc: Anatolij Gustschin <agust@denx.de> Cc: Stefan Roese <sr@denx.de> Signed-off-by: Tom Rini <trini@ti.com>