9
0
Fork 0
Commit Graph

1318 Commits

Author SHA1 Message Date
Sascha Hauer c20952a621 Merge branch 'master' into next 2012-02-15 12:59:10 +01:00
Sascha Hauer 456a52a6e5 USB storage: fix disconnect
USB storage support missed disconnect support. Implement this.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-15 09:00:46 +01:00
Sascha Hauer 4af196ebfc usb net: fix unregistration
First call mii_unregister which is done in the drivers unbind function,
then eth_unregister. Also, remove unregister_device which is done in
eth_unregister.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-14 23:57:00 +01:00
Sascha Hauer daa068fcfb usb net smsc95xx: add missing mii_unregister
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-14 23:56:46 +01:00
Sascha Hauer c3523db81f usb net smsc95xx: remove unused variable
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-14 23:56:42 +01:00
Robert P. J. Day ffb781ee92 Correct Kconfig comment for MCI_OMAP_HSMMC to include OMAP3.
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-09 15:18:11 +01:00
Sascha Hauer 3c30f3b971 mci i.MX esdhc: make 8bit modes platform dependent
Whether the controller works in 8bit mode is not only dependent
on the controller but also on the board having wired up 8 data
lines, so put a capabilities field in platform data.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-09 14:35:38 +01:00
Sascha Hauer b795a7320b mci: Fix 8 bit mmc cards
Currently we test the cards capabilities for being 8bit capable.
This does not work since noone ever sets this bit. Unfortunately
there is no bit to test 8bit capability, so we introduce a patch
from the kernel which puts the mmc card into 8bit mode and tests
whether it can succesfully read the ext_csd in this mode.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-09 14:35:20 +01:00
Sascha Hauer 15c9965457 mci: Add a complete list of EXT_CSD_* fields from the kernel
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-09 14:35:13 +01:00
Sascha Hauer 7cb73292e2 mci i.MX esdhc: use timeout loops
Too often I have waited to get a reaction from this driver
when something goes wrong. Use timeout loops instead of
inifinite polling loops.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-09 14:35:07 +01:00
Sascha Hauer 80116a24da mci: Be more verbose on what device is associated to which disk
This is quite useful when multiple SD cards are present so spare
some bytes to print this information.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-09 14:30:41 +01:00
Sascha Hauer 5f6d792a78 mci: cdev_find_free_index won't fail, no need to check
There will always be the next integer number unless we register
INT_MAX disk devices which is rarely the case.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-09 12:44:33 +01:00
Sascha Hauer 3c7655c4ee mci: factor out mci/sd specific startup functions
This saves an indention level and makes the code more readable.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-09 12:44:32 +01:00
Sascha Hauer 113cb98041 mci: replace pr_debug with dev_dbg
The mci layer uses pr_debug throughout. Use dev_dbg instead
which is very useful when multiple cards are involved.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-09 12:44:32 +01:00
Sascha Hauer f27152ccc6 mci: Use struct mci for internal argument passing
The mci layer currently passes around a struct device_d for
its internal use. Apart from being confusing this drops
typesafety for no good reason. Instead, pass around a struct
mci.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-09 12:44:32 +01:00
Sascha Hauer f15f7d4ca0 mci core: fix mixup of max write/read block len
The argmument order in this pr_debug does not match
the string printed. Fix this.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-09 12:44:32 +01:00
Sascha Hauer 0b3c58c820 mci: remove unused device argument from set_ios
This argmuent is unused in all drivers, so remove it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-09 12:44:27 +01:00
Sascha Hauer 4f2cf36acb mci s3c: pass around the right pointer
The s3c driver passes around a struct device_d * internally in which
it is never interested in. Instead pass around a struct s3c_mci_host
and get rid of all this ugly void * derefs.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-09 12:40:11 +01:00
Sascha Hauer 7c1e1e3ddf mci s3c: allocate host struct dynamically
Yes, it does make sense. First there will always be the next
hardware which has multiple controllers. Also, we shouldn't
give bad examples to others.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-09 12:40:11 +01:00
Sascha Hauer d126aaba4c mci s3c: Do not mess with struct mci_host
This structure is owned by the core, do not change its contents
in the driver.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-09 12:40:11 +01:00
Sascha Hauer 0f9892cce8 mci core: replace discrete ios values with struct ios
As we'll need more arguments to set_ios over time put them
in a struct mci_ios like the kernel does.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-09 12:40:11 +01:00
Sascha Hauer 74b83f9119 mci mxs: do not use external define for internal use
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-09 12:40:11 +01:00
Sascha Hauer 4b8a61dbfd mci: fix high capacity detection
Whether a card is high capacity is checked in
sd_send_op_cond/mmc_send_op_cond. Remove the wrong check in
mmc_change_freq which wrongly recognizes some eMMC flash
as high capacity.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-09 11:53:33 +01:00
Sascha Hauer 58cc0eb274 mci: use card type definitions
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-09 11:53:24 +01:00
Sascha Hauer 037cf6e80b Merge branch 'next' 2012-02-07 13:54:14 +01:00
Robert Jarzmik c3a992fdc7 drivers/mtd: fix docg3 write support
Fix typo error in MTD_WRITE defines.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-27 12:24:04 +01:00
Robert Jarzmik 93125fda04 drivers/mtd: fix mtdraw write support
When unaligned writes are used, typically doing a cp file /dev/mtdraw0.foo,
the alignement correction code was incorrectly handling such cases, and
didn't return the expected number of written bytes.

This was tested on a 528 block size.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-27 12:24:04 +01:00
Sascha Hauer 192d6fe9be Merge branch 'pu/debug' into next 2012-01-27 09:31:13 +01:00
Wolfram Sang 79b385b017 net: fec_imx: configure FEC for 10Mbit when necessary
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-25 18:10:26 +01:00
Wolfram Sang cae7e5b7f9 net: miidev: factor out miidev_get_status()
Currently, we can only print the phy_status. Factor out the routine to
get the status, so we can query it from fec drivers and configure
accordingly. Needed because mx28 needs a special bit set for 10Mbit.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-25 18:10:26 +01:00
Wolfram Sang ad0bd00a55 net: fec_imx: enable payload length check and pause frames
Q: "the linux driver add these bits, why not we?"
A: Because nobody activated the bits?

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-25 18:10:26 +01:00
Wolfram Sang 6b145cd3b3 net: fec_imx: refactor R_CNTRL setup
Introduce a variable which gets updated when needed and only written
once. Will make further additions easier.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-25 18:10:26 +01:00
Wolfram Sang eeabfc4ab5 net: fec_imx: small cleanups
remove double include, remove unused (and double in case of RCNTRL)
defines, sort the includes at least somewhat.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-25 18:10:26 +01:00
Robert Jarzmik 8d6bfdaec7 usb/gadget: fix poller NPE in early polling
The timings of the poller calling have changed, digging out
a latent bug in pxa27x udc controller.
The polling routine is called before the probe function is
called, and the driver internal are not initialized at that
time. This triggers a NULL pointer exception.

Fix it by moving poller registration after driver probe.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-23 09:45:56 +01:00
Teresa Gámez a0d23c41d0 imx-ipu-fb: Add overlay support
Adding overlay support for i.MX3 sdc.

Foreground channel only works when background is also enabled.
The foreground video mode is always the same as the background.

Also added alpha command to set the alpha value of the foreground.

Tested on a phyCORE-i.MX35.

Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-23 09:38:27 +01:00
Teresa Gámez 4b6aa9088f imx-ipu-fb: Fix offset for IPU Clock.
The offset for the IPU Clock in the CGR1 register is 18 not 22.
See MCIMX35RM table 14-17.

Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-23 09:38:27 +01:00
Teresa Gámez 7d61b58596 imx-ipu-fb: Add support for multiple video modes
Make support of multiple video modes possible for i.MX3 boards.

Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-23 09:38:26 +01:00
Antony Pavlov cb76204fa8 ns16550: fix ier selection
The document "PC16550D Universal Asynchronous
Receiver Transmitter with FIFOs" (vers. June 1995,
http://www.national.com/ds/PC/PC16550D.pdf) states
that IER (Interrupt Enable Register) is accessible
if the bit DLAB = 0 (DLAB is bit 7 in LCR; in barebox
DLAB known as LCR_BKSE).

So before IER access we need set DLAB to 0.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-19 09:46:02 +01:00
Antony Pavlov b36dd65f15 ns16550: write zero to ier only once
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-19 09:46:02 +01:00
Antony Pavlov fd434ce24a ns16550: make ns16550_serial_init_port() shorter
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-19 09:46:02 +01:00
Antony Pavlov 5891ba14b8 ns16550: support for UART with broken FIFO
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-19 09:46:02 +01:00
Jean-Christophe PLAGNIOL-VILLARD 2c9bc534ce Revert "mtd omap nand: fix driver without CONFIG_PARAMETER"
This reverts commit 7762f9627a.

already applied by d002818ae3

    fix gpmc_nand_probe without param support

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-19 09:44:50 +01:00
Jason Kridner 5f77a0a812 USB: Remove __attribute__ ((packed)) for struct ehci_hccr and ehci_hcor
cherry-picked from U-Boot.

commit 69716c1900274a89bd5cbd1b0bb276ceaaa04f61
Author: Jason Kridner <jkridner@beagleboard.org>
Date:   Wed Apr 20 08:54:16 2011 -0500

    USB: Remove __attribute__ ((packed)) for struct ehci_hccr and ehci_hcor

    Remove __attribute__ ((packed)) to prevent byte access to soc
    registers in some gcc versions.

    Having patches to enable ehci for the BeagleBoard lying around for
    several months, this one was the show-stopper.

    Switched to align(4), rather than remove the attribute, per suggestion
    from Alexander.

    Credits have to go to Laine Walker-Avina <lwalkera@ieee.org> for
    finding the problem.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-18 09:47:49 +01:00
Sascha Hauer 7762f9627a mtd omap nand: fix driver without CONFIG_PARAMETER
With CONFIG_PARAMETER unset the driver never calls omap_gpmc_eccmode.
Fix it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-17 18:51:04 +01:00
Jean-Christophe PLAGNIOL-VILLARD 2610b2a987 atmel_nand: disable hardware ecc if not enable
allow to save 1360 bytes

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-17 18:48:40 +01:00
Jan Weitzel d002818ae3 fix gpmc_nand_probe without param support
commit 30de24d79fc6e659d0070f6e863ae0e53567ba0e param: add config to disable it
removes param support for xloader configurations. Set param eccmode calls
omap_gpmc_eccmode and so nand_scan_tail. So nand fails without param support

Call omap_gpmc_eccmode directly if CONFIG_PARAMETER is not enabled
to fix that.

Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-16 11:33:22 +01:00
Jean-Christophe PLAGNIOL-VILLARD 3874b16997 atmel/mci: fix slot_b support
in commit commit f60f6c58e
atmel_mci: check for device id we use to address the right slot

the driver use the dev_id to detect the slot which is wrong on 9263 as we have
2 devices with 2 slots

use slot_b paramter to specify the slot as done in linux

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-16 09:33:41 +01:00
Sascha Hauer 8742816771 Merge branch 'pu/jean-codesize' into next 2012-01-13 09:33:36 +01:00
Sascha Hauer 1096fa4eca Merge branch 'master' into next 2012-01-12 09:53:22 +01:00
Jean-Christophe PLAGNIOL-VILLARD 971d164f62 param: add config to disable it
this will allow to save 992 Bytes for TI xlaoder or AT91 bootstrap

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-01-11 21:22:34 +08:00
Alexander Aring 364c3aadfd ioctl: add support for ECCGETSTATS and MEMGETREGIONINFO
Support added for ioctl of ECCGETSTATS and MEMGETREGIONINFO.

Fix default handling in core.c to return -EINVAL, if request
was unknown.

Signed-off-by: Alexander Aring <a.aring@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-06 09:49:37 +01:00
Jean-Christophe PLAGNIOL-VILLARD 57baef0939 mci_spi: specify hw_dev
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-06 09:42:30 +01:00
Jean-Christophe PLAGNIOL-VILLARD 3fc38b0c5b serial: drop non used at91rm9200 driver
we use atmel driver now

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-06 09:42:30 +01:00
Eric Bénard 948300df54 u_serial: add setbrg to be able to use loadb & co
Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-05 10:34:59 +01:00
Alexander Aring 7017838be5 nand_omap_gpmc: fix return value
Fix return value, to notify if ecc
correction appeared.

Signed-off-by: Alexander Aring <a.aring@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-05 10:31:24 +01:00
Sascha Hauer 0d22025084 Merge branch 'next' 2012-01-05 10:25:17 +01:00
Sascha Hauer ef191db8af video imx: specify num_modes in platform_data
Without num_modes the imx fb driver won't work. Specify this
in the boards and also bail out in the driver when num_modes
is unspecified.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-05 09:41:27 +01:00
Alexander Aring e3d1b99292 Kconfig: add missing dependencies.
Change dependencies in Kconfig for twl devices.

Signed-off-by: Alexander Aring <a.aring@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-05 09:34:08 +01:00
Eric Bénard f7aaa22493 serial gadget: enable/disable on request
- add a usbserial command to enable/disable the serial gadget
- allow dfu and usbserial to cohexist in the same barebox
- add a timeout in u_serial so that we don't get locked if the user
enable usbserial from a UART console but doesn't consume the data
on the usbserial port created on the PC
- remove debug or verbose printf
- tested on i.MX25 & i.MX35 & usb-a926x

Signed-off-by: Eric Bénard <eric@eukrea.com>
Tested-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-04 14:18:46 +01:00
Eric Bénard eb98425068 dfu: fill bwPollTimeout and better handle detach
- bwPollTimeout is set to 10 ms, from the DFU spec, this
is the minimum time, in milliseconds, that the host should
wait before sending a subsequent DFU_GETSTATUS request.
Without this, I get 25 seconds value and dfu-util waits twice 25s
during download
- when in IDLE and receiving DETACH, first return 0 to make
dfu-util happy, then use a dfudetach variable to exit dfu
(without an USB reset as per the comment on line 425) and
return to runtime mode.
- tested on i.MX25 & i.MX35 & usb-a926x

Signed-off-by: Eric Bénard <eric@eukrea.com>
Tested-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-04 14:18:46 +01:00
Eric Bénard 9350bcca01 fsl_udc: update and fix
- this patch sync fsl_udc.c with linux's driver,
- add a poller on usb_gadget_poll to get serial gadget working,
- return -EIO in usb_gadget_poll when udc is stopped (do detect
cable disonnection)
- tested on i.MX25 & i.MX35

Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-04 14:18:46 +01:00
Juergen Beisert 98e09f58f7 S3C24xx/video: fix forgotten include file name change
While we are here: do not follow the change of the file name, because there is
no GPIO dependency in this driver.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-04 11:42:25 +01:00
Juergen Beisert f012c5297e MTD/NAND/S3C: re-add change due to API change
Commit 88ce7ef769 has changed the API and commit
b29b8f43d5 has moved the S3C24xx NAND driver
file. With the move the API change in the S3C24xx NAND driver was lost.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-03 10:13:13 +01:00
Juergen Beisert 6bee6defaa MTD/NAND/DOC: add forgotten change due to API change
Commit 88ce7ef769 introduces an additional
parameter to the function add_mtd_device(). It seems one of the callers was
left.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-03 10:13:13 +01:00
Sascha Hauer 3f8c7f6f19 net dm9k: Fix compiler warning
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-02 14:53:17 +01:00
Sascha Hauer e448b8fc5e mtd Kconfig: only select NAND_READ_OOB when NAND is enabled
To get rid of:

(MTD_OOB_DEVICE && MTD_RAW_DEVICE) selects NAND_READ_OOB which has unmet direct dependencies (MTD && NAND)

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-02 14:53:17 +01:00
Juergen Beisert b8560b2b2f MACH SAMSUNG/S3C: Unify the UART driver for the S3C family of CPUs
The UART is one of the units which differs only slightly inside the S3C family.
Prepare this driver to share it with more recent CPUs.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-02 13:32:13 +01:00
Juergen Beisert 4e7151d11c MACH SAMSUNG/S3C: Separate S3C24XX clock management
There are major differences in the clock tree of the S3C24xx family and the
more recent CPUs of the S3C family. Keep the S3C24XX clock routines separate to
avoid an ifdef hell. But also use generic function names to be able to
share drivers among the S3C family.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-02 13:32:13 +01:00
Juergen Beisert b5a92c0ff1 MACH SAMSUNG/S3C: Reflect the CPU name the LCD driver is for
This LCD driver is for the LCD controller in the S3C2410/S3C2440 CPUs only.
Change its name to reflect its usage and free the way to add LCD controller
drivers for more recent Samsung CPUs.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-02 13:32:13 +01:00
Juergen Beisert d32acc5544 MACH SAMSUNG/S3C: Parts of the SDHC driver can be shared in the S3C CPU family
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-02 13:32:13 +01:00
Juergen Beisert b29b8f43d5 MACH SAMSUNG/S3C: Use the correct CPU family name to reflect NAND driver's usage
The aready existing NAND controller driver in Barebox is for the S3C24XX family
only. Change the name of the file to reflect this fact (and free the way to add
more recent Samsung NAND controllers)

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-02 13:32:13 +01:00
Juergen Beisert cbc08bfb42 MACH SAMSUNG/S3C: Make it more generic for future updates
Start with renaming files to share them in the S3C CPU family,

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-02 13:32:13 +01:00
Steve Schefter 28f0de6e5f nand_omap_bch_decoder: Fix up error detection
Bit errors in the ECC itself are not beeing taken into account.
In this cases the number of detected errors != number of corrected errors and
chien search returns an error.
This patch adds detection of bit errors in the ECC.

Signed-off-by: Steve Schefter <steve@scheftech.com>
Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-02 12:44:55 +01:00
Robert Jarzmik 6449b9cff5 drivers/mci: pxa fix clockrate
The clock rate was incorrectly calculated, leading to a
frequency of 19.5MHz / 64 instead of 19.5Mz for the host
controller.

with the fix applied, a copy of a file of 230 kB shrinks
from 6000ms to 123ms.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-02 12:44:02 +01:00
Robert Jarzmik 6bef2778f1 drivers/mtd: add docg3 chip
Add the MSystem disk-on-chip G3 support, taken from the
linux kernel with few amendments to bring it into barebox.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-02 12:34:58 +01:00
Jean-Christophe PLAGNIOL-VILLARD 3bc0b7b2e6 at91_udc: update vbus param only if updated
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-02 12:08:25 +01:00
Jean-Christophe PLAGNIOL-VILLARD 5524cd966b atmel_nand: drop dead code
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-02 12:08:24 +01:00
Jean-Christophe PLAGNIOL-VILLARD 809f0f6327 mtd: atmel_nand: optimize read/write buffer functions
For PIO NAND access functions, we use the features of the SMC:
 - no need to take into account the NAND bus width: SMC will deal with this
 - use of an IO memcpy on the NAND chip-select space is able to generate
   proper SMC behavior.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-02 12:08:24 +01:00
Jean-Christophe PLAGNIOL-VILLARD 7caf8009cc mtd/core.c: fix MTDPGALG
introduced in commit f76ad819e4
drivers/mtd: cosmetic changes

it's supposed to the invert of the writesize - 1

Cc: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-02 11:47:49 +01:00
Sascha Hauer 81e1f6d020 Merge branch 'master' into next 2011-12-23 11:25:37 +01:00
Sascha Hauer 4b8750c956 uart drivers: use xzalloc instead of xmalloc
The flags in struct console_device have to be initialized
to zero. Otherwise the following can happen:

- console_register sets the initial baudrate of a new console
  before we set the global console init state to CONSOLE_INIT_FULL.
- In console_baudrate_set we test whether the current console is
  active which may be true because of unitialized flags.
- we then call getc() to wait for the user to accept the new settings
  and we are stuck because of the CONSOLE_UNINITIALIZED state
  we will never get anything from getc().

Looking back this explains some cases for me when barebox refused
to start and I really wonder why this did not become a more visible
problem before.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-12-23 11:15:44 +01:00
Robert Jarzmik fb44dd696e drivers/mtd: add the mtdraw device (data+oob)
Add a device to read and write to MTD data and oob
(/dev/mtdraw<N>).

The device is constrained in a separate source file, so that
further improvement of commands (such as nandwrite) could
make it useless, and easy to remove.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-12-22 10:11:11 +01:00
Robert Jarzmik 6473b28065 drivers/mtd: split mtd mtdoob devices
Split /dev/mtd and /dev/mtdoob devices.
Remove from mtd structure the mtdoob character device.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-12-22 10:11:11 +01:00
Robert Jarzmik c6c880ecdb drivers/mtd: add mtd core hooks
Add hooks for spinoff MTD drivers (mtdoob, mtdraw, ...).

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-12-22 10:11:11 +01:00
Robert Jarzmik d29b112f68 drivers/mtd: fix core multiple MTD registrations
If multiple MTD devices were registered, an exception
occured, as they all wanted id 0. Let the driver code choose
the device number dynamically.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-12-22 10:11:11 +01:00
Robert Jarzmik 88ce7ef769 drivers/mtd: transfer NAND notions to MTD core
Change NAND_WRITE into MTD_WRITE.
Change "page_shift" references in the core, which are purely
NAND, into mtd->writesize which is MTD generic.
Rename all "info" (struct mtd_info) into "mtd".

Also provide a parameter to add_mtd_device() so that legacy
nand devices still appear as nand<N>.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-12-22 10:11:11 +01:00
Robert Jarzmik f76ad819e4 drivers/mtd: cosmetic changes
Fix whitespace, replace all debug() by dev_dbg(), and fix
line length to 80 characters.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-12-22 10:11:11 +01:00
Robert Jarzmik 8ccde79470 drivers/mtd: move nand.c into core.c
Move nand core into the global MTD core.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-12-22 10:11:11 +01:00
Alexander Aring 659f150e90 omap_hsmmc: setup mmc voltage on twl6030
Support the setup of the mmc voltage, when booting OMAP4 with twl6030
from nand.

Signed-off-by: Alexander Aring <a.aring@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-12-21 12:48:08 +01:00
Alexander Aring 8658e6a952 twl-core: add support for twl6030
Add support for twl6030 in twl-core driver.

Signed-off-by: Alexander Aring <a.aring@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-12-21 12:46:01 +01:00
Alexander Aring 5c115f335e twl-core: abstract twl4030 and add twlcore driver
Add a general twl device driver twlcore to call i2c send/write
functions.
Abstract twl4030 to call twlcore functions.

Fixed some code-styling issues pointed out by checkpatch.

Signed-off-by: Alexander Aring <a.aring@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-12-21 12:46:01 +01:00
Alexander Aring 8007b25bdf i2c-omap: add i2c omap4 support
Added i2c support for omap4. Tested on pcm049.

Driver based on linux kernel implementation.
Also added a shift to access 16-bit registers
to make support for OMAP730/850 possible.

If accessing a non existing slave the bus will go into arbitration mode.
It's unable to recover from it.

Signed-off-by: Alexander Aring <a.aring@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-12-21 12:46:01 +01:00
Robert Jarzmik edd0f1cede drivers/mci: pxa read data performance boost
Increase pxa reading performance by reading 4 bytes at a
time instead of 4 reads of 1 byte.
As the mci controller FIFO accepts reads on bytes, halfwords
or words, use words whenether possible.

The boost is for a 250KBytes file read and display (bmp):
 - before: 6900ms
 - after: 6000ms

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-12-21 11:15:31 +01:00
Robert Jarzmik 64aa9692c8 drivers/mci: pxa writedata timeout
The write data timeout is too small for old cards,
especially the Transcend 256MBytes SD card. Increase it from
10ms to 100ms.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-12-21 11:15:31 +01:00
Robert Jarzmik 58c2526c9d usb/gadget: add special treatment for PXA cpus
As PXA cpus suffer from a silicon bug which prevents them
from being compound devices, forbid use_acm=1 for PXAs.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-12-21 11:15:31 +01:00
Sascha Hauer 1528db0314 Merge branch 'master' into next 2011-12-19 12:06:55 +01:00
Sascha Hauer 790266c24d mtd nand: fix oob compile time option
The NAND_READ_OOB Kconfig option is used to

a) creating a cdev for reading OOB data
b) compiling in mtd->read_oob support

The former was intended and that's also what the Kconfig help
says. The latter though was implicit and wrong. mtd->read_oob
is also used by the bbt code which resulted in a NULL pointer
deref when compiled with BBT but without NAND_READ_OOB.
To fix this, split the option into two. The now invisible
option NAND_OOB_DEVICE is only responsible for b) and gets
selected when necessary.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-12-19 12:06:49 +01:00
Sascha Hauer 40c9e6b22b Merge branch 'pu/misc' into next 2011-12-15 20:03:17 +01:00
Sascha Hauer 467a675626 Merge branch 'master' into next
Conflicts:
	arch/arm/boards/usb-a926x/init.c
	arch/arm/mach-pxa/include/mach/clock.h
	arch/arm/mach-pxa/speed-pxa27x.c

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-12-15 19:58:56 +01:00
Sascha Hauer 597ce4cc1c nand-bb: implement lseek in readonly mode
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reviewed-by: Robert Jarzmik <robert.jarzmik@free.fr>
2011-12-15 19:55:11 +01:00