9
0
Fork 0
Commit Graph

2146 Commits

Author SHA1 Message Date
Sascha Hauer 3cbe9b9ae9 mtd: nand: replace NAND_USE_FLASH_BBT with NAND_BBT_USE_FLASH
To sync with the kernel.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-04 11:00:33 +01:00
Sascha Hauer c26ef8231f mtd: Add parameter to allow erasing bad blocks
While erasing bad blocks is a potentially dangerous operation
it is sometimes needed during development or when some foreign
code has touched the flash.

This patch adds a device parameter 'erasebad' to allow erasing
bad blocks. Since this is not wanted during production this is
behind a Kconfig option.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-04 11:00:33 +01:00
Sascha Hauer 5b85daacc6 mtd: nand: register nand flashes with nand specific function
This allows us to have some NAND specific stuff during registration,
like for example adding NAND specific device parameters.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-04 11:00:00 +01:00
Sascha Hauer 13b4e37c1c Merge branch 'for-next/vexpress' 2013-03-04 09:21:54 +01:00
Sascha Hauer 678832e17a Merge branch 'for-next/usb' 2013-03-04 09:21:54 +01:00
Sascha Hauer ea0f831cd0 Merge branch 'for-next/mxs' 2013-03-04 09:21:54 +01:00
Sascha Hauer 62ee96bd3b Merge branch 'for-next/mtd'
Conflicts:
	arch/arm/configs/eukrea_cpuimx27_defconfig
	drivers/mtd/core.c
2013-03-04 09:21:49 +01:00
Sascha Hauer 13408877f4 Merge branch 'for-next/misc' 2013-03-04 09:21:37 +01:00
Sascha Hauer 908bc8ce45 Merge branch 'for-next/imx' 2013-03-04 09:21:37 +01:00
Sascha Hauer 831d83e922 Merge branch 'for-next/highbank' 2013-03-04 09:21:37 +01:00
Sascha Hauer 1eb77960b8 Merge branch 'for-next/dt' 2013-03-04 09:21:37 +01:00
Sascha Hauer 4c246afad3 Merge branch 'for-next/ahci' 2013-03-04 09:21:36 +01:00
Sascha Hauer 10473b33d7 mtd: always write page when oob is given
Since recently we check for the page being written for not being
empty and do not actually write it when it is. This fails for a
freshly created flash bad block table when all blocks are good.
In this case the bbt code will try to write an empty page, but
with the BBT marker in OOB. This page never gets written, so the
BBT code will not find a bad block table during next start up and
writes it again. Fix this by checking if we want to write OOB data,
if we do, then write the page, even if the data is empty.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-03 16:29:28 +01:00
Marc Kleine-Budde 439eefcfe4 driver/serial: add driver for the mxs application uart
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-03 16:27:14 +01:00
Marc Kleine-Budde 0150bf0ba1 driver/serial: Kconfig: explicitly state that existing mxs driver is for the debug uart
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-03 16:27:14 +01:00
Jean-Christophe PLAGNIOL-VILLARD 91786b5bc8 serial/Makefile: drop out of date comments
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-26 15:05:22 +01:00
Jean-Christophe PLAGNIOL-VILLARD dc62dd48d8 smc911111: fix send and recv return value
on error send error code and 0 on success

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-26 11:05:02 +01:00
Jean-Christophe PLAGNIOL-VILLARD 62acc70dc1 phy: fix force mode
do not try to read the status in force mode
the link is up

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-25 08:54:40 +01:00
Hubert Feurstein c1722ac266 net: fec_imx: ensure constant timeout in fec_halt
Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-22 09:22:51 +01:00
Hubert Feurstein 0f27e5d8de net: fec_imx: use dev_err and dev_warn instead of printf
Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-22 09:22:51 +01:00
Hubert Feurstein 7ba9f45f6a imx_spi: fix bus-num setup
Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-21 15:05:47 +01:00
Hubert Feurstein 1208df19ca net: imx_fec: fix RMII support for i.MX6
Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-21 14:27:58 +01:00
Sascha Hauer 22d747e264 mtd: nand: do not write empty pages
Do not write pages which only contain 0xff. UBI expects pages which
seem empty to be writable. This got lost with:

| commit 3139c3e9a6
| Author: Sascha Hauer <s.hauer@pengutronix.de>
| Date:   Thu Nov 29 11:16:40 2012 +0100
|
|    mtd core: call driver write function with complete buffer
|
|    mtd->write is supposed to loop around pages internally, no need
|    to do this in mtd_write. This fixes a huge write performance drop
|    with the m25p80 driver when it was converted to a mtd driver recently.
|    Since mtd->writesize is 1 for this driver mtd_write ended up doing
|    single byte writes on the flash.

Introduce mtd_all_ff as a global function since UBI currently has its own
implementation.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-21 08:58:45 +01:00
Rob Herring d7ff8c47ec amba: pl011: set RTS during initialization
RTS is an output. Either flow control is used and you care about the state or
it is not used and you don't care. So setting it to active does no harm in
either case. This is inline with what Linux does.

Mandatory for Highbank as example

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-18 15:40:33 +01:00
Sascha Hauer ef06284cd9 mtd nor: remove unnecessary 'depend' in Kconfig
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-18 11:21:47 +01:00
Alexander Shiyan 927eb75795 Make "dev_get_resource" publicly available
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-18 09:22:17 +01:00
Alexander Shiyan bbc0b6bc15 mfd: Using MFD_xx prefix for symbols
This patch provides rename MFD-related symbols for using MFD-prefix.
Additionally, sorting mfd/Kconfig and mfd/Makefile records.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-18 09:21:08 +01:00
Sascha Hauer 0a643b3d42 USB i.MX: Add chipidea gadget support
This adds USB gadget support to the i.MX chipidea driver. Basically
we have to add a register function to the fsl udc driver and call
this from the chipidea driver if device mode is selected.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-15 16:19:56 +01:00
Sascha Hauer 2749fbac48 nor flash: integrate into mtd
CFI Flash is currently handled outside the mtd layer which makes it
a special case. Integrate it into mtd so that we get rid of this
special status.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-14 23:37:53 +01:00
Sascha Hauer 1bd90ff5a1 mtd: implement mtd_lock and mtd_unlock
Needed for NOR flashes.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-14 10:44:41 +01:00
Sascha Hauer bdd58b17eb mtd: Use mtd_* functions where appropriate
Instead of dereferencing struct mtd_info members directly use
the wrapper functions which have an additional check if the
callback exists if it is optional, like mark_bad or is_bad.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-14 10:38:23 +01:00
Sascha Hauer 7b7cf936cb mtd: Add mtd_* functions
The Kernel has mtd_read, mtd_write, mtd_erase and mtd_block_markbad.
Add these functions to barebox aswell to make future mtd synchronizations
with the kernel easier.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-14 10:31:39 +01:00
Sascha Hauer b600cb936e mtd: rename mtd file operations callback functions
These are currently named mtd_read/write/erase. Functions with
the same name exist as global functions in the kernel. Rename
them to mtd_op_* to avoid name clashes with future mtd updates.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-14 10:22:17 +01:00
Sascha Hauer 8139fa78b9 USB i.MX6: Add HSIC support
HSIC needs some special setup for i.MX6. Most ugly detail is that
the HSIC needs help of the IOMUX to configure a pullup on the strobe
line. This has to be done after the ehci controller has started.
Fortunately there is only one muxing possibility for the HSIC ports
on i.MX6, so we can simply control the iomux from the usbmisc driver.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-14 09:57:51 +01:00
Sascha Hauer 298f7fc3b6 USB i.MX chipidea: implement post init support
Some controllers need an init hook after the USB controller is
started, so implement the post init hook for i.MX.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-14 09:56:50 +01:00
Sascha Hauer 80a4c202dd USB ehci: Add platform specific init calls
Some USB cores need a platform specific init hook, add it to
the ehci driver.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-14 09:56:35 +01:00
Sascha Hauer cefcb0c281 USB chipidea i.MX: Fix PTS mask for HSIC
bit25 is part of the PTS bits, so mask it out before rewriting it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-14 09:56:30 +01:00
Jean-Christophe PLAGNIOL-VILLARD 5f337b5452 ahci-generic: add oftree support
calxeda use the generic driver but have it's own compatible cf Linux kernel
Documentation

Cc: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-14 09:29:59 +01:00
Jean-Christophe PLAGNIOL-VILLARD 59cfe5905b highbank: add xgmac support
Cc: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-14 09:28:00 +01:00
Jean-Christophe PLAGNIOL-VILLARD 210bb761d8 of_add_memory: check the device_type is memory
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-14 09:27:35 +01:00
Jean-Christophe PLAGNIOL-VILLARD 9acb6113f0 of: make of_add_memory available for other board
so when the first stage booloader of firmware provide the dtb
we can use it to probe the memory

also allow to print what we probe

Cc: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-14 09:27:26 +01:00
Rob Herring a3f74d928c ahci: handle COMINIT received during spin-up
Some Intel SSDs can send a COMINIT after the initial COMRESET. This causes
the link to go down and we need to re-initialize the link.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-13 18:09:17 +01:00
Alexander Shiyan 6a256321b8 Use new device_platform_driver() macro for drivers
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-13 09:23:28 +01:00
Jean-Christophe PLAGNIOL-VILLARD ed4da3f2de sp804: introduce amba_is_arm_sp804 to detect if the sp804 is present at the address
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-12 20:35:52 +01:00
Jean-Christophe PLAGNIOL-VILLARD a59a5acf68 amba: introduce amba_device_get_pid/cid
so we can use it on vexpress to detect the hardware mapping

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-12 20:35:52 +01:00
Jean-Christophe PLAGNIOL-VILLARD 8428a8c6e3 amba: add oftree probe support
move ARM_AMBA Kconfig to drivers/amba/Kconfig

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-12 20:31:44 +01:00
Jean-Christophe PLAGNIOL-VILLARD 51d9e037ab clocksource: add ARM AMBA SP804 support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-11 21:01:24 +01:00
Michael Grzeschik 86024a9f70 SPI: Add i.MX 23/28 SPI driver support
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-11 20:58:34 +01:00
Michael Grzeschik a90c32c861 ARM mxs: ssp move to common register layout
This patch moves the register defines and bit definitions
into one include file. As the defines are common for ssp
and mci devices they can be shared.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-11 20:58:34 +01:00
Alexander Aring e0946e79c9 net: fix cpsw depends on ARCH_OMAP
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-11 20:57:34 +01:00
Alexander Aring def73feeec sata-imx: fix depends on ARCH_IMX
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-11 20:57:34 +01:00
Hubert Feurstein 91afe6c222 net fec_imx: add support for i.MX6 1000Mbps mode
Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-11 20:56:19 +01:00
Jean-Christophe PLAGNIOL-VILLARD 650e2daa9f phy/micrel: KSZ9021 diasable Asym Pause support
Due to a hw bug do not enable teh Asym_Pause.
Otherwise if you ser the bit 11 in 4h you will have to unplug
and replug the cable to make the phy work.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-11 19:59:52 +01:00
Jean-Christophe PLAGNIOL-VILLARD 9c305a0dbe macb: add cadence Gigabit GEM support
based on the kernel code
detect it via IP version

In the GEM we can use a full packet buffer for receive but the buffer size
need to be 64bit size aligned.

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>
2013-02-11 19:59:52 +01:00
Jean-Christophe PLAGNIOL-VILLARD aa2095304a macb: fix tx ring size
the mininal tx ring size is 2 as if one we wrap on the same descriptor
and can cause IP lock on GEM (gigabit version) this is always the case

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>
2013-02-11 19:59:52 +01:00
Jean-Christophe PLAGNIOL-VILLARD 36bcee4892 net macb: reset the IP at init
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Tested-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-11 09:34:50 +01:00
Jean-Christophe PLAGNIOL-VILLARD 044cb6a298 net macb: enable Tramsmit and Receive at open
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Tested-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-11 09:34:46 +01:00
Jean-Christophe PLAGNIOL-VILLARD 882ae3da84 net macb: use the macro as in linux for tx/rx buffer ring size
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Tested-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-11 09:34:42 +01:00
Jean-Christophe PLAGNIOL-VILLARD d702d97a8a net macb: sync remaining define with linux
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Tested-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-11 09:34:37 +01:00
Jean-Christophe PLAGNIOL-VILLARD 2e2466f5ae net macb: call macb_init at probe explicitly
as eth_device init is planning for remove and we need the init before register
the mdio bus

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Tested-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-11 09:34:29 +01:00
Jean-Christophe PLAGNIOL-VILLARD 0fcceb6c55 macb: drop non used define
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-08 09:35:40 +01:00
Jean-Christophe PLAGNIOL-VILLARD a097eabc81 macb: report timeout on send
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-08 09:35:39 +01:00
Jean-Christophe PLAGNIOL-VILLARD 554ab80b87 macb: use dev_xx message
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-08 09:34:58 +01:00
Sascha Hauer 4458614954 Merge branch 'for-next/w1' 2013-02-04 15:49:07 +01:00
Sascha Hauer cfb14ce242 Merge branch 'for-next/omap' 2013-02-04 15:49:07 +01:00
Sascha Hauer 0b12784089 Merge branch 'for-next/oftree'
Conflicts:
	drivers/of/base.c
2013-02-04 15:49:04 +01:00
Sascha Hauer 5c6cc8736e Merge branch 'for-next/mtd' 2013-02-04 15:49:00 +01:00
Sascha Hauer da5fe0ba47 Merge branch 'for-next/misc' 2013-02-04 15:49:00 +01:00
Sascha Hauer 6eb49a5b1f Merge branch 'for-next/mci'
Conflicts:
	drivers/mci/atmel_mci.c
2013-02-04 15:48:58 +01:00
Sascha Hauer 9c5172fac2 Merge branch 'for-next/imx-usb-chipidea' 2013-02-04 15:48:53 +01:00
Sascha Hauer 265e6da19d Merge branch 'for-next/imx' 2013-02-04 15:48:53 +01:00
Sascha Hauer 22e2544809 Merge branch 'for-next/compile-log-level'
Conflicts:
	drivers/usb/host/ehci-hcd.c
2013-02-04 15:48:51 +01:00
Sascha Hauer 1b575024f6 Merge branch 'for-next/at91'
Conflicts:
	arch/arm/boards/at91rm9200ek/init.c
	arch/arm/boards/pm9263/init.c
	arch/arm/configs/at91sam9n12ek_defconfig
	arch/arm/mach-at91/Kconfig
2013-02-04 15:48:43 +01:00
Jan Luebbe 79d4f634d3 nand_write: initialize OOB buffer for each page
Previously, during a multi-page write, chip->oob_poi would not be
reinitialized.

See commit f722013ee9fd24623df31dec9a91a6d02c3e2f2f in the kernel
for an analogous change.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-04 14:32:42 +01:00
Jean-Christophe PLAGNIOL-VILLARD 241acd7f08 atmel_lcdfb: fix warning: implicit declaration of function 'clk_get_rate'
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-04 09:43:32 +01:00
Jean-Christophe PLAGNIOL-VILLARD f15fb7b428 video: add Atmel HLCD support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-31 19:05:50 +01:00
Jean-Christophe PLAGNIOL-VILLARD 0f9770a6fe atmel_lcdfb: factorise common code between lcdc and new hlcdc IP
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-31 19:05:50 +01:00
Sascha Hauer 4db0a48aec Merge branch 'pu/omap' into for-next/omap 2013-01-29 23:19:50 +01:00
Jean-Christophe PLAGNIOL-VILLARD f7e3126619 macb: allow to pass the phy interface
as we will add later the GMAC IP verion support (GEM)

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-29 11:44:49 +01:00
Jean-Christophe PLAGNIOL-VILLARD f0aa3cdf8d macb: sync register access and clock with the kernel
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-29 09:59:17 +01:00
Jean-Christophe PLAGNIOL-VILLARD 0c30d94b91 w1: add dual search support
Some 1-wire device need to be search twice to be detected

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-29 09:58:07 +01:00
Jean-Christophe PLAGNIOL-VILLARD 39ca268c2a video: add atmel lcdc frambuffer support
This IP is present on the at91sam9 until the sam9g45, on the sam9x5 we use a
new IP.

This driver is based on the linux one.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-28 09:45:39 +01:00
Sascha Hauer a81c6a9f16 mtd nand: Specify pr_fmt and change messages to pr_*
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-27 14:24:39 +01:00
Sascha Hauer 00c7c8ecab USB ehci: Use dev_* for messages
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-27 14:24:39 +01:00
Sascha Hauer a01e54d201 treewide: fix format specifiers
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-27 14:24:10 +01:00
Sascha Hauer ea53e1b572 mtd m25p80: consistenly switch to dev_* messages
Also, fix variable names in m25p80_write debug message.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-27 14:23:09 +01:00
Jean-Christophe PLAGNIOL-VILLARD 20615ac8c9 mci: add card_write_protected
Currently there is no common way for the mci host driver to tell
that thee car is write protected. This adds a card_write_protected callback
which is used by the framework to tell whether it's protected or not.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-27 12:17:28 +01:00
Jean-Christophe PLAGNIOL-VILLARD c559eb612f gpio_keys: fix loop on buttons for request and configuration
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-26 22:23:20 +01:00
Jean-Christophe PLAGNIOL-VILLARD 2c93912f34 atmel_mci: gpio: request and configure card detect
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-25 19:52:44 +01:00
Jean-Christophe PLAGNIOL-VILLARD 50559d2c4c atmel_mci: drop board host caps
as it's handle by detecting the IP version and bus with

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-25 19:52:43 +01:00
Jean-Christophe PLAGNIOL-VILLARD be42bafdd0 atmel_mci: update the SD/SDIO Card Register at request time
as we need to reset the IP

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-25 19:52:43 +01:00
Jean-Christophe PLAGNIOL-VILLARD c934d62029 atmel_mci: support the SD highspeed since IP version 0x300
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-25 19:52:43 +01:00
Jean-Christophe PLAGNIOL-VILLARD bc33582a8a atmel_mci: after a software timeout the IP need to be reset
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-25 19:52:43 +01:00
Jean-Christophe PLAGNIOL-VILLARD 14b2c8f15b atmel_mci: on version 0x0 we need to reset the IP at each request
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-25 19:52:43 +01:00
Jean-Christophe PLAGNIOL-VILLARD 40a333b062 atmel_mci: rwproof is only needed up to IP version 0x200
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-25 19:52:18 +01:00
Jean-Christophe PLAGNIOL-VILLARD 7bd476801a atmel_mci: fix host init
disable interrupt and reset the IP at the probe
set timout at the host init

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-25 19:52:14 +01:00
Jean-Christophe PLAGNIOL-VILLARD 0a98283554 atmel_mci: version 0x5xx of the IP have a different clk div
so detect and support it

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-25 19:52:14 +01:00
Jean-Christophe PLAGNIOL-VILLARD b9696a0b3f atmel_mci: detect IP version
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-25 19:52:14 +01:00
Jean-Christophe PLAGNIOL-VILLARD f674fb3125 atmel_mci: use linux regs define
to simplify sync and share code

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-25 19:52:14 +01:00
Jean-Christophe PLAGNIOL-VILLARD aaa55b560e atmel_mci: rename all function to start with atmci
to be consistent and have a unique naming convention
be in sync with the kernel too

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-25 19:52:14 +01:00
Jean-Christophe PLAGNIOL-VILLARD 1f99b4ca84 atmel_mci: rename atmel_mci_readl/writel to atmci_readl/writel
to be consistent with the kernel
This also reduce the ligne length

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-25 19:52:14 +01:00
Jean-Christophe PLAGNIOL-VILLARD cb9d84a0e1 atmel_mci: rename atmel_mci_host tp atmel_mci
to be consistent with the kernel

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-25 19:52:14 +01:00
Alexander Shiyan d3122cc0e8 of: Fix of_find_node_by_path breakage
This patch fixes breakage of of_find_node_by_path when
node not found in tree. This fault is caused, for example,
when no aliases is present in dtb.

barebox@ConnectCore i.MX51:/ oftree -d /env/mm.dtb
/ {
        model = "Freescale i.MX51 CCMX51";
        compatible = "fsl,imx51-ccmx51", "fsl,imx51";
        chosen {
        };
        cpus {
                cpu@0 {
                        compatible = "arm,cortex-a8";
                };
        };
};
barebox@ConnectCore i.MX51:/ oftree -p /env/mm.dtb
unable to handle NULL pointer dereference at address 0x00000000
pc : [<97f1f3f0>]    lr : [<97f19438>]
sp : 95eff988  ip : 00000001  fp : 97f43080
r10: 00000000  r9 : 97f4304c  r8 : 00000000
r7 : 00000000  r6 : e3510034  r5 : 00000001  r4 : 95f0eb28
r3 : 97f43054  r2 : 00000000  r1 : e1a0000b  r0 : 00000000
Flags: nzCv  IRQs off  FIQs off  Mode SVC_32

no stack data available

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-25 19:25:01 +01:00
Jean-Christophe PLAGNIOL-VILLARD b1da925c8a introduce console none support
this will allow to have no console support

Use full for bootstrap as we can save 6.5 KiB (barebox.bin) and
3.8 KiB (zbarebox.bin lzo) on at91sam9263 as example vs console simple

As on bootstrap we have often very limited size.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-23 20:34:16 +01:00
Jean-Christophe PLAGNIOL-VILLARD 074964830b ehci: add atmel support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-23 08:57:22 +01:00
Jean-Christophe PLAGNIOL-VILLARD e1bb118d0e ehci: if caps ressource is not provided discover it via cr_capbase
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-23 08:56:56 +01:00
Jean-Christophe PLAGNIOL-VILLARD 3cb0138d40 usb: fix for USB_ST_STALLED status reporting in ehci_submit_async()
Checking the status field of the qTD token in the current code
do not take into acount cases where endpoint stall (halted) bit
is set together with XactErr status bit. As a result clearing
stall on an endpoint won't be done if this status bit was also
set. Check for halted bit and report USB_ST_STALLED status
if the host controller also indicates endpoit stall condition.

From u-boot by Anatolij Gustschin <agust@denx.de>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-23 08:56:56 +01:00
Jean-Christophe PLAGNIOL-VILLARD 1846900948 usb: add parameters info on usb device
iManufacturer = 0
        iProduct = 1
   iSerialNumber = 0
    Manufacturer =
         Product = OHCI Root Hub
    SerialNumber =
        idVendor = 0000
       idProduct = 0000

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-23 08:56:56 +01:00
Jean-Christophe PLAGNIOL-VILLARD a25d9190fb ohci: only enable drivers if ohci is enabled
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-23 08:36:17 +01:00
Jean-Christophe PLAGNIOL-VILLARD 28981f775c ohci: make it depends on !MMU
the current mmu support is broken

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-23 08:36:17 +01:00
Sascha Hauer c384340f4e mtd m25p80: Add support for w25q80bl
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-21 09:06:22 +01:00
Jean-Christophe PLAGNIOL-VILLARD c4d0b665dc w1: add ds28ec20 eeprom support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-21 09:05:34 +01:00
Sascha Hauer fdc5a0cbfc ARM i.MX6: Add Chipidea support
This allows to register the USB ports for the chipidea driver. For
now the otg/h1 register functions also register the corresponding
USB phys.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-20 11:15:00 +01:00
Sascha Hauer 75e71639e0 USB: Add usb phy driver for i.MX
This phy is found on i.MX6 and i.MX23/28. Currently tested only on i.MX6.
For now we take the easy way out. The phy is enabled upon registration.
More elaborated handling can be added later.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-20 11:14:25 +01:00
Sascha Hauer 456fae0227 mci atmel: implement card_present callback
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-20 10:53:30 +01:00
Sascha Hauer d21575ddea mci i.MX esdhc: implement card_present callback
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-20 10:53:30 +01:00
Sascha Hauer 096789bc2a mci: Add card_present callback
Currently there is no common way for the mci host driver to tell
that there is no card present. This adds a card_present callback
which is used by the framework to tell whether it's present or not.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-20 10:53:30 +01:00
Sascha Hauer c94cd71bb4 mci: Always add probe parameter for cards
Always add the 'probe' parameter to cards so that scripts can
rely on the parameter to be present.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-20 10:53:30 +01:00
Sascha Hauer 1fcdbe3337 mci: return 0 for probe parameter even when already initialized
This makes the behaviour more friendly to scripts which can now
set the probe parameter without checking if it has been done before.
Having a succesful result now means that there is a card.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-20 10:52:04 +01:00
Sascha Hauer 555dc6cc60 of: speed up unflatten
We calculate the full path of the current node using fdt_get_path which
takes a lot of time since libfdt has to iterate over the dtb several times.
Speed this up by creating and using a of_find_child function which does
not have to iterate over the whole tree but only over its direct children.
On an i.MX51 board this speeds up unflatten the tree from 60ms to 3.7ms.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-19 11:48:17 +01:00
Sascha Hauer a2288e64b7 of: rename new_device_node to of_new_node and export it
of_new_node now takes the parent node and the name as argument and
creates a new node. This simplifies the caller and also makes the
function useful for others, so export it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-19 11:48:17 +01:00
Sascha Hauer 517fcac5f0 of: add of_delete_property
This adds a function to delete a property from the currently loaded
devicetree. Also export new_property as of_new_property.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-19 11:48:17 +01:00
Sascha Hauer 9e824f30c2 of: unflatten: allow overlay dtbs
This implements overlaying a currently loaded dtb with another dtb.
We used to return -EBUSY when a oftree is currently loaded. Instead
of doing this, check if a node already exists before creating a new
one. Similarly, if a property already exists, just overwrite the
value instead of creating a new property.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-19 11:48:17 +01:00
Sascha Hauer 875430927d of: Add support for converting the unflattened tree back to a dtb
We already have support for unflattening the devicetree. This patch
adds support for converting it back to a dtb.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-19 11:48:17 +01:00
Daniel Mierswa 0f7bff88f0 i.MX21/27: don't enable lcd bus clocks too early
On the MX27 based board phycard-i.MX27 the display won't properly
come up.
Before removing imx-regs.h and the code that sets the register
in the i.MX video driver, the PCCR registers were set _after_
the screen start (LSSAR) was set.
This restores that old behaviour and makes the display come up
properly again.
I did not have a chance to test this on any other i.MX27 or i.MX21
hardware though I assume that the "old" order is required there
too.

Signed-off-by: Daniel Mierswa <d.mierswa@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-17 19:02:42 +01:00
Alexander Aring 65fd4afcf2 mtd-core: fix compiler warning
Got this compile warning if MTD_WRITE support isn't set.

drivers/mtd/core.c: In function 'mtd_ioctl':
drivers/mtd/core.c:117:26: warning: unused variable 'ei' [-Wunused-variable]

Add a #ifdef to declaration of variable 'ei' to solve it.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-17 08:13:44 +01:00
Sascha Hauer cbc3e0f6d4 Merge branch 'delivery/at91_fixes' of git://git.jcrosoft.org/barebox 2013-01-15 15:33:08 +01:00
Jean-Christophe PLAGNIOL-VILLARD 97d4ca970a qt1070: init default key code first
So the key code provided by platform_data are not overwrited

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2013-01-15 00:26:19 +08:00
Jean-Christophe PLAGNIOL-VILLARD 8e92f54ad4 atmel_spi: fix spi cs gpio request loop
it's 0 to num_cs - 1

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2013-01-15 00:26:19 +08:00
Sascha Hauer 50da59975f led: test for led->set callback before calling it
Registering a LED can fail. If someone calls led_set for such
a LED no set function will be there. Fail gracefully in this
case.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-14 13:39:20 +01:00
Sascha Hauer 86e787e845 of: rename of_parse_dtb to of_unflatten_dtb
The process of unflatten the device tree is known from the kernel,
so rename the function, because that's what it does.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-11 14:10:02 +01:00
Sascha Hauer 05ed875f35 of: return root node when looking for a node with path /
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-11 14:10:02 +01:00
Sascha Hauer 969120f125 of of_free: remove old node from allnodes list
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-11 14:10:02 +01:00
Sascha Hauer 818dccf28b of: of_free fixes
- Add missing prototype for of_free()
- When root node is freed set root_node to NULL
- (re)scan aliases after freeing a node. This is necessary because
  the freed node may be an alias or point to an alias

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-11 14:10:01 +01:00
Sascha Hauer 99bb8de76f of: Fix invalid path for of_find_node_by_path
When of_find_node_by_path is called with a non existing path we
return just some node. return NULL instead.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-11 14:10:01 +01:00
Jan Luebbe 5824325936 drivers: net: add driver for TI CPSW
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-10 20:41:50 +01:00
Sascha Hauer 8b5cfc5219 Merge branch 'for-next/ubi' 2013-01-09 10:29:08 +01:00
Sascha Hauer db31ccf293 Merge branch 'for-next/omap' 2013-01-09 10:29:08 +01:00
Sascha Hauer 8c46b854f7 Merge branch 'for-next/imx' 2013-01-09 10:29:08 +01:00
Sascha Hauer 21a0fc1ce3 Merge branch 'for-next/gpio-request' 2013-01-09 10:29:07 +01:00
Sascha Hauer 04cb446c9a ARM omap / mci: Fix register offsets
Only the OMAP4 has a register offset of 0x100 in the register space. Fix
this by using the device id mechanism. This became broken when the device
register convenience functions were introduced.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-08 10:02:13 +01:00
Sascha Hauer d43bcb9987 mci omap_hsmmc: Fix whitespaces
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-07 10:07:52 +01:00
Jean-Christophe PLAGNIOL-VILLARD e1bd70640a led-gpio: use gpio_request and gpio_free
So we can ensure a gpio is not used for something else

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-02 11:04:23 +01:00
Jean-Christophe PLAGNIOL-VILLARD 668dffaa0d spi: atmel: request cs pin via gpiolib
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-02 10:56:16 +01:00
Jean-Christophe PLAGNIOL-VILLARD b4f7410ad1 usb: at91_udc: request and configure vbus pin via gpiolib
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-02 10:56:16 +01:00
Jean-Christophe PLAGNIOL-VILLARD 6fefe24a36 mtd: atmel_nand: request and configure pio via gpiolib
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-02 10:56:16 +01:00
Jean-Christophe PLAGNIOL-VILLARD 4d97a1fc9c at91: switch to gpiolib
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-22 16:40:33 +01:00
Jean-Christophe PLAGNIOL-VILLARD 8ad5725465 at91: use gpio_is_valid to check gpio
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-22 16:40:33 +01:00
Jean-Christophe PLAGNIOL-VILLARD a2bf8f66ba gpiolib: add command to dump the current gpio status
This will allow to known which gpio is requested by what

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-22 16:39:24 +01:00
Jean-Christophe PLAGNIOL-VILLARD 8429aed80e gpiolib: add gpio_request and gpio_free support
as today if no request or free provided do not complain

if the gpio is not request auto requested at first use

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-22 16:39:23 +01:00
Wjatscheslaw Stoljarski (Slawa) b46b57f35a MFD MC34708: Add dependence on SPI
MC34708 depend on I2C or SPI, so let driver depend on SPI too
and rename config option name to MFD_MC34708.

Signed-off-by: Wjatscheslaw Stoljarski <wjatscheslaw.stoljarski@kiwigrid.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-21 12:18:08 +01:00
Teresa Gámez 4746717a5d ARM OMAP AM33XX: create new ARCH for AM33xx
Created ARCH for AM33xx boards as second stage bootloader.
This includes:
- Added dmtimer0
- Created basic header files
- Added MMC support for ARCH_AM33XX
- Added reset function

Signed-off-by: Teresa Gámez <t.gamez@phytec.de>

Some header file cleanup by:
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-20 11:43:10 +01:00
Sascha Hauer 95f4112191 ARM omap3: Add change OMAP_ prefix to OMAP3_ for registers
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-20 11:43:05 +01:00
Sascha Hauer 416a99135a ARM omap hsmmc: Fix register offset
The hsmmc module has a 0x100 offset in its register space. The real
register space size for the module is 4K, so when we register the
device with the size 4k, we have to account for the offset in the
driver, not in the resource allocation.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-19 21:52:36 +01:00
Sascha Hauer 19b6121a56 ARM omap: include individual SoC files
- remove mach/silicon.h and include omap?-silicon.h directly
- include mach/omap?-clock.h directly where needed

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-19 21:51:49 +01:00
Wolfram Sang 8c98a5dfb7 devfs & mtd: add MEMERASE ioctl support
To make that, we need to shift mtd_erase before mtd_ioctl.
ubi-utils need that, especially ubiformat.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-19 10:31:23 +01:00
Wolfram Sang 52e60618d6 ubi: consolidate ubi-media.h
We have two versions in the tree. Use the newer one, and put it into the
mtd directory while we are at it.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-19 10:30:56 +01:00
Wolfram Sang 1bd4283c08 mtd: drop custom is_power_of_2()
We have proper version in log2.h these days.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-19 10:30:56 +01:00
Wolfram Sang d723373013 nand: mxs: NO_SUBPAGE_WRITE flag was overwritten
It is not the chip, but this controller which cannot do subpage writes.
So, make sure we add the flag at the proper place, so it doesn't get
overwritten by flash detection anymore.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-19 10:27:22 +01:00
Sascha Hauer 9239281a5e USB ehci: Add powerup fixup for EfikaSB
The EfikaSB has a bug requiring to write to an ULPI register after
powerup. It doesn't seem that this this bug is present on any other
hardware, so add a workaround directly into the driver.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-17 11:27:34 +01:00
Sascha Hauer de3c258d41 mci i.MX esdhc: Allow to specify devicename from platformdata
For boards which need to have persistent names for the device file.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-17 08:42:32 +01:00
Sascha Hauer 30eb680378 mci: Allow to specify device name
When multiple MMC/SD cards are present in the system we often
have to have persistent names to identify them during runtime.
This patch allows to overwrite the devicename which is used.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-17 08:42:32 +01:00
Sascha Hauer f3468dc387 ata sff: set device pointer in ata port
This was forgotten in the last ata updates and leads to NULL
pointer dereferences.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-17 08:42:32 +01:00
Sascha Hauer 752e56babf USB ULPI: Add more register/bit defines
Make the register defines for ULPI more complete. Also, Add a proper
ULPI_* Namespace to the existing defines.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-17 08:42:13 +01:00
Sascha Hauer aa537feed4 USB ULPI: Add missing ulpi_write function
We currently only have functions to read/modify registers. Add a
function to write registers.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-17 08:42:08 +01:00
Sascha Hauer a4076ddf65 USB i.MX: Add chipidea driver support
For proper USB function the usbmisc registers have to be initialized.
This patch adds a driver which matches for the usbmisc registers. This
driver is called from a new driver which binds to the USB ports to
configure the misc registers. After that the driver registers the EHCI
driver and an ULPI transceiver if necessary. Currently only host mode
is supported, but device support can be added later.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-13 22:18:46 +01:00
Sascha Hauer 15fd89d0a4 USB ehci: Allow to register independently from device
The EHCI core often is part of a otg core. Allow it to be registered
separately from another driver.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-13 17:47:42 +01:00
Sascha Hauer 0ccb9aebcd Merge branch 'pu/net-link' 2012-12-13 16:26:19 +01:00
Sascha Hauer a1a50a4654 net phylib: force to wait for link
When starting a network device wait until the link is up. Otherwise
autobooting does not work with little timeout and several attempts
have to be made until the network is finally up.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-12 20:02:44 +01:00
Sascha Hauer 1a9e93cc81 drivers/base: fix corrupt device tree
dev_add_child is a very unsafe function. If called multiple times
it allows setting the same device to different parents thus corrupting
the siblings list. This happens regularly since:

| commit c2e568d19c
| Author: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
| Date:   Sat Nov 3 16:11:05 2012 +0100
|
|    bus: add bus device
|
|    automatically add it as parent of any bus device if none already specified
|
|    we have now a nice output per bus

If for example a FATfs is mounted this nice output per bus often ends with:

>     `---- fat0
>     `---- 0
>          `---- 0x86f0000087020031-0x86f000410df27124: /dev/<NULL>
>          `---- sram00
>               `---- 0x00000000-0xffffffffffffffff: /dev/<NULL>
>               `---- 0x00000000-0xffffffffffffffff: /dev/<NULL>
>               unable to handle NULL pointer dereference at address 0x0000000c
> pc : [<87f08a20>]    lr : [<87f08a04>]
> sp : 86eff8c0  ip : 87f3fbde  fp : ffffffff
> r10: ffffffff  r9 : 00000000  r8 : 00000003
> r7 : 86f075b8  r6 : 00000002  r5 : ffffffec  r4 : 86f07544
> r3 : 00000000  r2 : 43f900b4  r1 : 00000020  r0 : 00000005
> Flags: Nzcv  IRQs off  FIQs off  Mode SVC_32
> [<87f08a20>] (do_devinfo_subtree+0x90/0x130) from [<87f08a90>] (do_devinfo_subtree+0x100/0x130)
>
> [<87f3e070>] (unwind_backtrace+0x0/0x90) from [<87f28514>] (panic+0x28/0x3c)
> [<87f28514>] (panic+0x28/0x3c) from [<87f3e4b8>] (do_exception+0x10/0x14)
> [<87f3e4b8>] (do_exception+0x10/0x14) from [<87f3e544>] (do_data_abort+0x2c/0x38)
> [<87f3e544>] (do_data_abort+0x2c/0x38) from [<87f3e268>] (data_abort+0x48/0x60)

This patch fixes this by adding a device to its parents children list in
register_device so that dev_add_child is no longer needed. This function
is removed from the tree. Now callers of register_device have to clearly
set the parent *before* registering a device.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reported-by: Jan Lübbe <jlu@pengutronix.de>
2012-12-12 15:04:27 +01:00
Sascha Hauer ac48b10467 net phylib: Clear BMCR_PDOWN bit
Some phys come up with this bit set, clear it so that these phys
can work. This has been observed with a ASIX compatible USB ethernet
adapter.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-08 17:52:55 +01:00
Sascha Hauer 8030ab24fa Merge branch 'kconfig' 2012-12-08 12:22:21 +01:00
Alexander Shiyan c209c186e0 Fix wrong Kconfig reference to ARCH_IMX31
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-08 12:22:12 +01:00
Alexander Shiyan f544baed50 Remove bad Kconfig reference to MTD_NAND
Barebox not contain symbol MTD_NAND, so remove all references to it.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-08 12:22:12 +01:00
Alexander Shiyan 0957cd8d4b Remove bad Kconfig reference to DISK_DRIVE
Barebox not contain symbol DISK_DRIVE, so remove all references to it.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-08 12:22:12 +01:00
Alexander Shiyan 6bfc380c91 Remove bad Kconfig reference to HAVE_CLK
Barebox not contain symbol HAVE_CLK, so remove all references to it.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-08 12:22:12 +01:00
Alexander Shiyan 4c20f9af97 Cleanup Kconfig files
This patch provides a global cleanup barebox Kconfig files. This includes
replacing spaces to tabs, formatting in accordance format, removing
extraneous lines and spaces. No functional changes.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-08 12:22:12 +01:00
Sascha Hauer 8f32824c6e Merge branch 'for-next/phylib'
Conflicts:
	drivers/net/phy/phy.c
2012-12-07 16:43:21 +01:00
Sascha Hauer df1d2a7257 Merge branch 'for-next/mtd' 2012-12-07 16:43:15 +01:00
Sascha Hauer 86ee7f112f Merge branch 'for-next/misc' 2012-12-07 16:43:15 +01:00
Sascha Hauer 36a886a9f7 Merge branch 'for-next/mfd' 2012-12-07 16:43:15 +01:00
Sascha Hauer 0edc0a4678 Merge branch 'for-next/mci' 2012-12-07 16:43:15 +01:00
Sascha Hauer db5e43eade Merge branch 'for-next/led' 2012-12-07 16:43:15 +01:00
Sascha Hauer a0643f615d Merge branch 'for-next/driver' 2012-12-07 16:42:04 +01:00
Sascha Hauer 4bdb250c9f Merge branch 'for-next/clk' 2012-12-07 16:42:04 +01:00
Sascha Hauer 1603842024 ata: Add i.MX AHCI driver
This adds the glue code for the i.MX SATA controller. This controller
needs some i.MX specific setup and some SoC specific setting outside
the controller itself. The code for setting up the correct clock source
for the SATA phy has been taken from U-Boot.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-07 12:19:45 +01:00
Sascha Hauer 358ba37082 ata: Add ahci support
This adds ahci controller support based on U-Boot ahci support. Unlike
U-Boot we do not push the SCSI layer in between, but use the ata interface
directly. Tested on a Freescale i.MX53.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-07 12:19:45 +01:00
Sascha Hauer 9dfc9a8e75 ata: Use dma_alloc for buffer
ATA devices using DMA may need a sufficiently aligned buffer, so use
dma_alloc instead of regular malloc.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-07 12:19:45 +01:00
Sascha Hauer 57464c10a4 ata: align ata command defines with kernel
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-07 12:19:44 +01:00
Sascha Hauer 1d9e9d1b8a ata: split ide sff suport to separate file
Currently we only support oldschool IDE SFF devices. This is done
by registering a register layout struct and everything else is done
by the generic IDE SFF driver. Since modern ATA devices still use
ATA, but not the SFF interface anymore, split out the IDE SFF support
to a separate file to allow for other types of ata interfaces.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-07 12:19:41 +01:00
Sascha Hauer dd97d79696 ata: fix status flags
Some status flags are wrong, fix them. All of them are currently unused,
so no functional change included.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-07 12:17:04 +01:00
Sascha Hauer 527d037636 ata: register disks as /dev/ata*
Using /dev/disk* for every type of device is not helpful. It increases
the chance that the user doesn't know which file corresponds to which
device. So rename ata device files to /dev/ata*. Also add a dev_info
about which device just has been registered.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-07 12:17:02 +01:00
Sascha Hauer 6bbb1b51bf Merge branch 'pu/clk' into for-next/clk
Conflicts:
	include/linux/clk.h
2012-12-07 11:54:19 +01:00
Antony Pavlov 10ac493e96 clk: use the 'CLK_ALWAYS_ENABLED' flag for clk-fixed by default
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-07 09:30:54 +01:00
Sascha Hauer 3139c3e9a6 mtd core: call driver write function with complete buffer
mtd->write is supposed to loop around pages internally, no need
to do this in mtd_write. This fixes a huge write performance drop
with the m25p80 driver when it was converted to a mtd driver recently.
Since mtd->writesize is 1 for this driver mtd_write ended up doing
single byte writes on the flash.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-07 09:22:15 +01:00
Sascha Hauer 381fd6f56e mtd nand: allow partial page writes
The nand layer handles partial page writes just fine. If the start or
end of the data is not page aligned, the nand layer will copy the data
to a temporary page buffer.
Remove the check which disallows partial page writes since this is what
we want to do on barebox when for example an image is written to nand
which is not padded to page size.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-07 09:22:02 +01:00
Sascha Hauer 030904efdd ata: Add i.MX PATA driver support
Straight forward driver, we only have to configure some additional
bits and then use the generic ide support.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-06 13:52:44 +01:00
Sascha Hauer 802d901450 clk: Add clk table based divider support
For easy support of table based dividers.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-06 12:55:21 +01:00
Wolfram Sang 97110094e3 mtd: nand: mxs: reset BCH earlier, too, to avoid NAND startup problems
It could happen (1 out of 100 times) that NAND did not start up
correctly after warm rebooting, so barebox could not find its
environment or DMA timed out due to a stalled BCH. When resetting BCH
together with GPMI, the issue could not be observed anymore. We probably
need the consistent state already before sending commands to NAND.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-06 08:43:01 +01:00
Sascha Hauer 63cfa83739 mci i.MX esdhc: turn error message into debug message
During card probe the mci core may send commands to the card
which the card doesn't understand. This is intended, so do not
print an error message here.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-05 19:57:47 +01:00
Jan Luebbe bba73109ce net: phy: micrel: fix typo in driver name
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-05 19:53:49 +01:00
Jean-Christophe PLAGNIOL-VILLARD 90806eea09 mdio_bus: fix match
on barebox we have the weird way the return 0 true on bus match

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-05 13:22:01 +01:00
Sascha Hauer df722f3639 USB ulpi: pass return value
Pass the return value from ulpi_probe in ulpi_setup instead
of returning -1 (which is -EPERM and does not make sense in
this context)

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-03 20:07:56 +01:00
Sascha Hauer a020b3d29f mfd stmpe: fix test for features
Use '&' to test for the bit as it was intended.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-03 19:50:58 +01:00
Sascha Hauer 9fdbbb34e6 ata: Allow partitions > 4GiB
Since barebox now uses 64bit for device accesses this is no
issue anymore.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-03 19:50:52 +01:00
Sascha Hauer fa5b8a2a32 mci: Fix capacity calculation for high capacity MMC cards
For these cards we have to calculate the size using the ext csd
sector count fields.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-03 19:48:25 +01:00
Robert P. J. Day a912f55a6c correct simple typo, "plarform_init"
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-03 11:13:50 +01:00
Antony Pavlov 6f70eea9ca at25: use dev_lseek_default as at24 does
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-03 11:02:38 +01:00
Antony Pavlov cd73076c65 commands: clk_dump: denote always enabled clocks
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-03 10:48:07 +01:00
Antony Pavlov ac5c168870 clk: add always enabled clocks
Current barebox clk framework allow disable any clock
and there is no means to prevent that.

But there are the clocks that can't be disabled
by software at all.

This patch allow registration of a clock immune to clk_disable().

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-03 10:48:07 +01:00
Sascha Hauer 619dc48632 i2c: Add missing DEVICE_ID_DYNAMIC
Otherwise it's not possible to register multiple identical devices.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-03 09:58:41 +01:00
Juergen Beisert 17176c2e2b ARM/MXS/i.MX28: distinguish POR and wake-up event correctly
When the built-in RTC in the i.MX28 is programmed to wake-up the SoC, the RTC
reports two events: RST and WAKE. RST is okay in this case, because the PMIC
was really powered down. But the real event is the WAKE from the RTC and
should have precedence over the RST event. So, report the WAKE event for this
special case.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-03 09:49:52 +01:00
Sascha Hauer ae01f384f2 mci: Add STUFF_BITS and use it
This adds the STUFF_BITS macro from the kernel to extract numbers
from the csd. This also fixes several places where the csd fields
in SD cards differ from MMC cards.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-29 19:52:41 +01:00
Sascha Hauer bf96d05b2b mtd oob: do not register oob device for devices without oob
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-29 19:52:26 +01:00
Sascha Hauer ab9c2ed94e mfd stmpe: fix test for features
Use '&' to test for the bit as it was intended.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-29 19:52:11 +01:00
Sascha Hauer 358434bbdd mfd stmpe: add index to devicename
Otherwise it's not possible to register multiple stmpe devices.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-29 19:51:23 +01:00
Sascha Hauer 3e689025a5 clk: check for invalid clocks
Checking for invalid clocks on function entry allows users
to for example do a clk_set_rate(clk_lookup("myclk"), x) without
checking for validity of the result of clk_lookup first.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-29 08:47:02 +01:00
Sascha Hauer 159109f5ff serial i.MX: Make locally used variables static
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-27 21:01:10 +01:00
Antony Pavlov 300a23cba5 phylib: fix compiler warning
fixes:
 drivers/net/phy/phy.c:57: warning: no previous prototype for ‘phy_device_create’

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-26 09:06:57 +01:00
Jean-Christophe PLAGNIOL-VILLARD 21a911a0de Revert "mtd: atmel_nand: optimize read/write buffer functions"
As in the kernel we revert as this was supposed to work but does not yet
this may need more work on the smc to be able to use it
So for now revert it

This reverts commit 809f0f6327.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-26 08:30:41 +01:00
Jean-Christophe PLAGNIOL-VILLARD 51acebdcf5 atmel_nand: fix pmecc timeout
the timeout is 100ms not 100ns

on sam9x5 the SoC is fast enough so we can not see it
but not on sam9n12

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-26 08:30:41 +01:00
Jean-Christophe PLAGNIOL-VILLARD 739d9fbd6d m25p80: sync flash support with the kernel
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-20 09:40:23 +01:00
Jean-Christophe PLAGNIOL-VILLARD 1308d908ea m25p80: re-import it againt mtd_add_host
so we now create the cdev via mtd

This will also simplify sync with linux

to avoid the m25p8000 or m25p00 the cdev is still named name m25p and the
drivers m25p80

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-20 09:40:23 +01:00
Jean-Christophe PLAGNIOL-VILLARD 34bcbaa2ba phylib: add micrel support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-20 09:38:33 +01:00
Jean-Christophe PLAGNIOL-VILLARD 4a1e4d4b1d phylib: add fixup support
if board need specific phy fixup they can register it and then the code will
executed only if needed

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-20 09:38:33 +01:00
Jean-Christophe PLAGNIOL-VILLARD 30298c0f3c mdio_bus: fix match
on barebox we have the weird way the return 0 true on bus match

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-20 09:38:26 +01:00
Jean-Christophe PLAGNIOL-VILLARD 9ea956db77 phylib: fix generic phy driver probe
the generic phy driver is used if no driver are found

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-20 09:38:26 +01:00
Jean-Christophe PLAGNIOL-VILLARD f777b3b13f driver: introduce device_probe to manully probe a device
This will expect a driver to be specified
This is needed by the phylib the probe the generic phy if not driver found

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-20 09:38:25 +01:00
Juergen Kilb f4af6690e4 nand-bb: Fix remove of nand-bb device.
Fixed possible crashs if nand-bb device is removed
and the list entry was not deleted from the list.

Signed-off-by: Juergen Kilb <J.Kilb@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-20 08:24:59 +01:00
Jean-Christophe PLAGNIOL-VILLARD c2e568d19c bus: add bus device
automatically add it as parent of any bus device if none already specified

we have now a nice output per bus

barebox@Atmel at91sam9x5-ek:/
devices:
`---- platform
     `---- atmel_usart0
          `---- cs0
     `---- atmel_usart1
          `---- cs1
     `---- mem0
          `---- 0x00000000-0x07ffffff: /dev/ram0
     `---- mem1
          `---- 0x00000000-0x00007fff: /dev/sram0
     `---- mem2
          `---- 0x00000000-0x000037bf: /dev/defaultenv
     `---- mem3
          `---- 0x00000000-0xfffffffe: /dev/mem
     `---- cs2
     `---- w1-gpio
          `---- w1_bus0
               `---- w1-2d-0
                    `---- 0x00000000-0x0000007f: /dev/ds24310
               `---- w1-2d-1
                    `---- 0x00000000-0x0000007f: /dev/ds24311
               `---- w1-23-0
                    `---- 0x00000000-0x000001ff: /dev/ds24330
     `---- at91sam9x5cm
     `---- at91sam9x5ek
     `---- at91sam9x5dm
     `---- atmel_nand0
          `---- nand0
               `---- 0x00000000-0x1fffffff: /dev/nand0
               `---- 0x00000000-0x0003ffff: /dev/at91bootstrap_raw
               `---- 0x00040000-0x0009ffff: /dev/self_raw
               `---- 0x000a0000-0x000bffff: /dev/env_raw
               `---- 0x000c0000-0x000dffff: /dev/env_raw1
               `---- 0x00000000-0x0003ffff: /dev/nand0.at91bootstrap
               `---- 0x00040000-0x0009ffff: /dev/nand0.barebox
               `---- 0x000a0000-0x000bffff: /dev/nand0.bareboxenv
               `---- 0x000c0000-0x000dffff: /dev/nand0.bareboxenv2
               `---- 0x000e0000-0x000fffff: /dev/nand0.oftree
               `---- 0x00100000-0x001fffff: /dev/nand0.free
               `---- 0x00200000-0x007fffff: /dev/nand0.kernel
               `---- 0x00800000-0x07ffffff: /dev/nand0.rootfs
               `---- 0x08000000-0x1fffffff: /dev/nand0.data
     `---- macb0
          `---- miibus0
          `---- eth0
     `---- atmel_spi0
          `---- mtd_dataflash0
               `---- dataflash0
                    `---- 0x00000000-0x0041ffff: /dev/dataflash0
     `---- atmel_mci0
          `---- mci0
               `---- 0x00000000-0x1d9bfffff: /dev/disk0
               `---- 0x00100000-0x064fffff: /dev/disk0.0
               `---- 0x06500000-0x1d9bfffff: /dev/disk0.1
     `---- i2c-gpio0
          `---- i2c0
               `---- qt10700
                    `---- cs3
`---- mdio_bus
`---- spi
`---- i2c
`---- w1_bus
`---- fs
     `---- ramfs0
     `---- devfs0
`---- net
`---- global

drivers:
atmel_usart
ramfs
devfs
fat
macb
Generic PHY
atmel_nand
mtd_dataflash
m25p80
atmel_spi
i2c-gpio
mci
atmel_mci
qt1070
w1-gpio
ds2431
ds2433
mem

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-19 11:36:33 +01:00
Jean-Christophe PLAGNIOL-VILLARD 06e641353e led-gpio: add bicolor led support
those led can have 2 colors but one at a time otherwise they are black

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-19 11:25:55 +01:00
Jean-Christophe PLAGNIOL-VILLARD c811546712 macb/ether: split flags for drivers and phylib
as in the kernel use is_rmii
flags for pinctrl
phy_flags for phylib flags

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-19 10:19:08 +01:00
Jean-Christophe PLAGNIOL-VILLARD d1662f9db3 phylib: introduction of forced 100Mbps
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-19 10:19:07 +01:00
Jean-Christophe PLAGNIOL-VILLARD e7d143f036 phylib: export phy_id via param
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-19 10:19:07 +01:00
Vicente ea43a5e296 omap4: add serial communications over usb boot
Signed-off-by: Vicente <vicencb@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-16 15:32:31 +01:00
Sascha Hauer bc1d965248 Merge branch 'for-next/usb' 2012-11-16 14:02:49 +01:00
Sascha Hauer 0bf6b41cfa Merge branch 'for-next/spi' 2012-11-16 14:02:49 +01:00
Sascha Hauer 1bfbbcca51 Merge branch 'for-next/phylib' 2012-11-16 14:02:49 +01:00
Sascha Hauer 05d251f15f Merge branch 'for-next/of'
Conflicts:
	drivers/of/base.c
	include/of.h
2012-11-16 14:02:44 +01:00
Sascha Hauer 6584c1f801 Merge branch 'for-next/net' 2012-11-16 14:02:37 +01:00
Sascha Hauer 3ff1015d24 Merge branch 'for-next/mxs' 2012-11-16 14:02:36 +01:00
Sascha Hauer 9749c2f16f Merge branch 'for-next/mtd'
Conflicts:
	arch/arm/configs/at91sam9x5ek_defconfig
2012-11-16 14:02:32 +01:00
Sascha Hauer 856f60dbd1 Merge branch 'for-next/misc'
Conflicts:
	commands/Makefile

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-16 14:01:34 +01:00
Sascha Hauer ec78bea331 Merge branch 'for-next/mfd' 2012-11-16 14:01:12 +01:00
Sascha Hauer 813c3bd3a2 Merge branch 'for-next/mci' 2012-11-16 14:01:11 +01:00
Sascha Hauer bf38ac7b89 Merge branch 'for-next/imx'
Conflicts:
	arch/arm/boards/guf-neso/lowlevel.c
	arch/arm/boards/pcm038/lowlevel.c
	commands/Makefile
2012-11-16 14:01:09 +01:00
Sascha Hauer 38c75d0f11 Merge branch 'for-next/gpio' 2012-11-16 14:00:45 +01:00
Sascha Hauer cce8e6ed41 Merge branch 'for-next/console' 2012-11-16 14:00:45 +01:00
Sascha Hauer ee69df5a10 Merge branch 'for-next/clps711x'
Conflicts:
	arch/arm/Kconfig
	arch/arm/Makefile
2012-11-16 14:00:42 +01:00
Sascha Hauer daac8bf5d3 Merge branch 'for-next/bcm2835'
Conflicts:
	arch/arm/configs/versatilepb_defconfig
2012-11-16 14:00:34 +01:00