9
0
Fork 0
Commit Graph

1364 Commits

Author SHA1 Message Date
Alexey Galakhov 5ef3ecd922 Make S3C24xx config options available for all S3Cs
Signed-off-by: Alexey Galakhov <agalakhov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-21 21:58:26 +02:00
Sascha Hauer e741110f5a Merge branch 'master' into next 2012-05-16 20:23:44 +02:00
Alexander Shiyan 385c54648b i.MX SPI: Setup SPI chipselect to inactive state while initializing device
To avoid unnecessary preset initial state chipselect lines for SPI, set it to
inactive state when adding devices to the system.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-16 19:20:33 +02:00
Sascha Hauer 0d188aca53 mfd mc13xxxx: Set mc_dev to NULL on failure
The mc13xxx driver correctly bails out on failure, but leaves
mc_dev initialized, so a later mc13xxx_get won't fail but returns
an invalid pointer. Fix this. While at it, remove some superfluous
code from mc13xxx_get.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-16 19:15:59 +02:00
Jan Luebbe 7b5817e58d drivers/spi/spi.c: use DEVICE_ID_DYNAMIC when allocating a struct device_d
This causes allocation of a free id and avoids conflicts if multiple
identical SPI devices are attached.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-14 19:47:13 +02:00
Alexey Galakhov 932f54688f Support most Samsung SoCs in S3C serial driver
Ok, I assume this should go into separate series. It fits both S5PV210 and S3C6410.

This adds support for S3C and S5P architectures (all of my knowledge) to the
serial driver. Since the only difference between them is in clock handling,
this is moved to an arch-dependent separate function.

Most modern architectures should define S3C_UART_HAS_UBRDIVSLOT and S3C_UART_HAS_UINTM.

This adds support for most

Signed-off-by: Alexey Galakhov <agalakhov@gmail.com>
Signed-off-by: Juergen Beisewrt <kernel@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-14 19:46:02 +02:00
Jan Luebbe 1503fe67d1 ohci-hcd: use dma_flush/inv_range to allow using the driver with enabled MMU
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-14 19:42:42 +02:00
Antony Pavlov f9b932fed9 fix typo funtion -> function
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-13 22:00:54 +02:00
Krzysztof Halasa 254b183339 NOR flash: reduce size of cfiword_t if not using 64-bit bus.
This is done to reduce the binary size a bit.

Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-13 11:03:26 +02:00
Jean-Christophe PLAGNIOL-VILLARD 8e6f45f54f complete: add empty complete support
for cpuinfo, clear, dhcp, false, login, lsmod, meminfo, passwd, pwd, reginfo,
reset, true, usb, version

for mach-imx and mach-mxs: dump_clocks
for u_serial: mycdev

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-04-30 20:37:40 +08:00
Jean-Christophe PLAGNIOL-VILLARD 1fa17ad5d4 complete: add device name complete support for devinfo
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-04-30 20:37:34 +08:00
Juergen Beisert 79dc70c9ea netX/network: fix debug outputs
If DEBUG is defined it fails due to wrong variable names

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-30 13:45:55 +02:00
Michael Trensch eecbcafa3f netX: UART may not initialize correctly.
The netX internal UART latches register settings and internally uses
them only if written in the correct order. Other orders may work, but
sometimes the UART gets stuck, as the baudrate has not correctly been
set.

Signed-off-by: Michael Trensch <MTrensch@gmail.com>
Acked-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-30 13:45:55 +02:00
Sascha Hauer 2893952c28 devinfo: use accessor function for parameters
Instead of directly accessing the struct member of struct param_d
use the provided getter function.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-24 11:18:32 +02:00
Sascha Hauer ba361ee78f Merge branch 'pu/mx6-v2' into next
Conflicts:
	arch/arm/Makefile
	arch/arm/mach-imx/Kconfig

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-24 10:38:23 +02:00
Sascha Hauer 7753263c50 net mii: Add mii_open/mii_close functions
Some phys need board specific fixups. To be able to do this
from board code add mii_open/mii_close functions so that the
board can use the regular mii_read/mii_write functions.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-24 10:31:47 +02:00
Sascha Hauer 6f20c7bc70 mmc i.MX esdhc: Add i.MX6 support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-24 10:31:47 +02:00
Sascha Hauer 86cfd96af4 net fec: Add i.MX6 support
Currently only 100Mb/s is tested. Freescale's U-Boot suggests that
there are some additional adjustments necessary for Gigabit support.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-24 10:31:47 +02:00
Sascha Hauer e0c18c0866 serial i.MX: i.MX6 support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-24 10:31:47 +02:00
Sascha Hauer 2e7db33d4b ARM: add initial i.MX6 support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-24 10:31:44 +02:00
Jean-Christophe PLAGNIOL-VILLARD 800f181e7a usb: fix driver name
use the usb_driver name

otherwise we will have a NULL driver entry in devinfo

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-04-23 19:51:05 +08:00
Alexander Shiyan 12b96ed87e Allow use platform_ide driver without ALT-registers
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-18 20:43:38 +02:00
Sascha Hauer 3170433558 Merge branch 'master' into next 2012-04-17 22:05:37 +02:00
Robert Jarzmik 1d79f322f7 mtd: docg3 fixes backport from Linux kernel
Backport 2 fixes back from Linux kernel (title verbatim from
Linux kernel log) :
 - docg3 fix in-middle of blocks reads
 - docg3 reduce read alignment burden

These 2 enable partial reads from the MTD (ie. read only the
111 first bytes), which enable linux kernel booting or UBIFS
from barebox.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-17 22:02:54 +02:00
Robert Jarzmik cafdeff7ab mci: pxamci poweron ramp delay
As per MMC spec, once power has been applied to an SD card, the card
can take as much as 250ms to complete its power-up cycle, and become
responsive to CMD0.

When this delay was not in place, activating the SD card in the env
init failed sometimes. With it, no more failure are observed.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-17 22:02:54 +02:00
Robert Jarzmik e38469d2ce mci: pxamci fix R1b responses
The pxamci driver was not waiting for the BUSY line to be
deasserted. This was specifically breaking the CMD12 at
the end of block multiple writes, when the SD card had not
time enough to commit the last write.

Fix it by waiting for PRG_DONE bit (which is actually the
busy signal end condition).

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-17 22:02:54 +02:00
Robert Jarzmik b1109600d4 mci: pxamci fix CMD12 handling
The pxamci requires a bit to be set in the command control
register when a CMD12 is sent. Set it, as required in the
PXA Developer Manuel, chapter "Stop Data Transmission
Command (CMD12 or IO/Abort with CMD52)".

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-17 22:02:54 +02:00
Robert Jarzmik 0f0d40217f mci: pxamci fix response type
When preparing a command, apply a mask so that only the command part
will be used for the switch case. This will be more robust
for future command response types.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-17 22:02:54 +02:00
Robert Jarzmik b0bab98abd mci: pxamci change clocks handling
Fix clock handling accordingly to PXA manual :
 - enable the MMC controller clock once and for all
 - only disable the MMC bus clock when changing the MMCLK by
 adjusting the clock ratio, else let the controller and SD
 card shut down the clock as the see fit.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-17 22:02:54 +02:00
Robert Jarzmik 50b992bf3d mci: pxamci define timeouts
Instead of using hard encoded values in the code, use defines to setup
the timeouts of reads/writes/commands.
Fix the read timeout as defined in the PXA Developer Manual.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-17 22:02:54 +02:00
Sascha Hauer abe4560c8a Use DEVICE_ID_DYNAMIC where applicable
We now have DEVICE_ID_DYNAMIC for dynamic allocation of device ids,
Use it where applicable.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-16 09:43:02 +02:00
Sascha Hauer dbd4e1166e device: make singular devices possible
Currently all devices have an id meaning that all devicenames
end with a number. This patch adds a DEVICE_ID_SINGLE to make
it ppossible to register a device without an id assigned to
it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-15 16:11:26 +02:00
Sascha Hauer f70ebb28a2 USB ehci: speed up initialization
This is based on the following U-Boot commit:

commit 5f4b4f2fed3ab8590c8c06b78642f8c1467acacf
Author: Vincent Palatin <vpalatin@chromium.org>
Date:   Mon Dec 5 14:52:22 2011 -0800

    ehci: speed up initialization

    According to EHCI specification v1.0, the controller should stabilize
    the power on a port at most 20 ms after the port power bit transition.
    So, we put this setting in the virtual descriptor corresponding field,
    (bPwrOn2PwrGood = 10 => 10 x 2ms = 20ms), this saves about 500ms at each
    controller initialization/enumeration.

    Signed-off-by: Vincent Palatin <vpalatin@chromium.org>

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-12 21:38:19 +02:00
Sascha Hauer 1db7717f6b USB ehci: make cache handling simpler
for chache handling the ehci driver iterates over the hardware lists
of QHs/TDs. As we have a fixed number of maximum entries in this lists
we can allocate them as arrays and and clean/invalidate the arrays
instead which is much simpler. While at it, move the allocation to
ehci_probe so that we do not lose memory each time ehci_init is called.
Also, use memalign to allocate the QHs/TDs.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-12 21:38:15 +02:00
Alexander Shiyan 6c727af2c2 Final switch to use combined driver mc13xxx
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-11 09:51:01 +02:00
Alexander Shiyan cacee0da04 Add support for MC13783 to mc13xxx driver
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-11 09:51:01 +02:00
Alexander Shiyan 0e524635d7 Rename definition MC13892_REG_IDENTIFICATION to MC13XXX_
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-11 09:51:01 +02:00
Alexander Shiyan dc505f7e20 Detect MC13892 chip ID in mc13xxx_query_revision()
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-11 09:51:01 +02:00
Alexander Shiyan 8aabd88416 Rename remainings structs and functions from mc13892_ to mc13xxx_
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-11 09:51:01 +02:00
Alexander Shiyan ac3eb47dbc Make mc13892_revision enum as define
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-11 09:51:01 +02:00
Alexander Shiyan d2383b7436 Sort includes in mc13xxx.c
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-11 09:51:01 +02:00
Alexander Shiyan 2b03e508cc Rename mc13892 driver name to mc13xxx
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-11 09:51:01 +02:00
Alexander Shiyan e8b54aaff3 Rename mc13892_mode enum to mc13xxx_mode
Also renamed enum values.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-11 09:51:01 +02:00
Alexander Shiyan a993c51609 Rename mc13892.c unit to mc13xxx.c
Also renamed config option name to MFD_MC13XXX.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-11 09:51:01 +02:00
Alexander Shiyan 03817cd5a6 Make mc13892_reg enum as define
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-11 09:51:01 +02:00
Alexander Shiyan 9a643f143e ename mc13892.h header to mc13xxx.h
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-11 09:51:01 +02:00
Sascha Hauer 705a2e2e25 Merge branch 'work/cfi-fixes' 2012-04-10 10:38:23 +02:00
Uwe Hermann e1ff3fc4da Fixup DRIVER_VIDEO_S3C24XX usage.
From c67445d601c9332fabb71df8e41367fc104e1ac1 Mon Sep 17 00:00:00 2001
From: Uwe Hermann <uwe@hermann-uwe.de>
Date: Fri, 6 Apr 2012 20:07:12 +0200

DRIVER_VIDEO_S3C was renamed to DRIVER_VIDEO_S3C24XX recently.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Juergen Beisert <jbe@pengutronix.de>
2012-04-10 09:57:22 +02:00
Sascha Hauer 2a6460cbb6 Merge branch 'next' 2012-04-05 11:09:58 +02:00
Sascha Hauer 7eebd3b4c6 cfi flash: Fix alignment problem
The intel cfi buffer write has a problem with writing when
the alignment of the buffer in memory is smaller than the
flash bus width.

This patch fixes a alignment problem which may show during this
scenario:
- 32 or 64 attached NOR flash
- flashing an image directly from network to the nor flash

The involved network driver is "smc9111.c".

The data that comes from the network stack and should be written into
the flash isn't 32 bit aligned (at least with this network driver).
This is probably due to the 48 bit wide ethernet addresses.

However the "cfi_flash.c" driver doesn't handle this situation, and
accesses the not-aligned address with a 32 bit pointer.

This patch fixes the problem by reducing the access width if an
aligment problem between source and destination is found.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-05 10:58:02 +02:00