9
0
Fork 0
Commit Graph

284 Commits

Author SHA1 Message Date
Sascha Hauer 8be53ce2ab Merge branch 'for-next/net' 2013-11-07 08:31:47 +01:00
Sascha Hauer 398cdf212d Merge branch 'for-next/mtd' 2013-11-07 08:31:47 +01:00
Sascha Hauer d317b1bf85 mtd: Pass device_id to add_mtd_device
Right now we do not support persistent names for mtd devices. The
base name can be passed to add_mtd_device, but this is always appended
with a dynamic number. With this patch add_mtd_device takes a device_id
argument which can be used to create a mtd device with an exact name.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-29 09:10:21 +01:00
Markus Pargmann 5d3cb01271 net: phy: Add micrel KSZ8031
KSZ8031 is similar to KSZ8021. It can use the same functions.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-26 10:12:05 +02:00
Jean-Christophe PLAGNIOL-VILLARD 4d2d66fe52 add: mmci drivers
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-22 16:49:48 +02:00
Sascha Hauer 19ea38a004 clk: of: introduce of_clk_src_simple_get
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-23 08:40:31 +02:00
Sascha Hauer e147a7e2bb Merge branch 'for-next/misc' 2013-09-05 10:38:31 +02:00
Jan Weitzel f958ffb3cd net/phy: support of mmd register read and write
Add function for indirect access of the mmd registers, based on linux.
phy_read_mmd_indirect
phy_write_mmd_indirect

Also clean some private mmd functions

Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-08-31 12:01:32 +02:00
Sascha Hauer 50e8902c0e Add deflate_decompress function
Needed to implement decompressors for gzip without headers.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-08-07 08:44:48 +02:00
Sascha Hauer bbaa8f1bb6 extend barebox wrapper header
Add empty definitions for mutexes, spinlocks and other stuff from
the kernel to make it easier to reuse code from the kernel.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-08-07 08:44:48 +02:00
Sascha Hauer 8fb48927da mtd: ubi: Add support for opening a volume by cdev
Needed by ubifs support.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-08-07 08:44:48 +02:00
Sascha Hauer df6494123f Merge branch 'for-next/serial' 2013-08-05 12:50:09 +02:00
Sascha Hauer feefc3ef3b Merge branch 'for-next/mtd' 2013-08-05 12:49:58 +02:00
Sascha Hauer 50f75a1a0e UBI: reimport UBI from Linux v3.10
This is a fresh UBI import from Linux v3.10

This is done mainly to get fastmap support.

This was tested with the i.MX nand driver, the MXS nand driver and
on CFI NOR flash.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-25 10:24:16 +02:00
Sascha Hauer 10f7528afb UBI: remove old ubi support
To update to the latest UBI support from the Kernel first remove
the old UBI support. Without it the update will be even less reviewable.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-24 07:17:01 +02:00
Sascha Hauer 66891566cc mtd: nand: update to v3.11-rc1
This updates the NAND stuff to Linux-3.11-rc1. It is synchronized
as best as we can get:

- locks removed
- The splitting in different files we had to better support different
  features has been dropped. Instead this is now done mostly with the
  use of __maybe_unused

Some barebox adjustments are forward ported, like:

- Allow partial page writes
- Optionally allow to erase bad blocks
- check for all_ff before writing a page

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-23 16:25:13 +02:00
Sascha Hauer cdd1de46ff clk: provide static inline wrappers
So that drivers can use clk_* functions without having to ifdef
them away.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-23 08:28:02 +02:00
Sascha Hauer 69f3d6c93b mtd: introduce mtd_read_oob and mtd_write_oob
Directly copied from the Kernel as of 3.11-rc1

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-22 16:14:16 +02:00
Sascha Hauer d155610821 mtd: introduce ecc strength
This introduces the ecc stength fields in the structures and fills
them in, but leaves them unused right now.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-22 16:14:08 +02:00
Sascha Hauer b445152396 string: introduce memchr_inv
Directly taken from Linux Kernel.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-22 16:13:58 +02:00
Sascha Hauer bdfd6a629c mtd: sync bbm.h with Linux Kernel
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-22 16:13:53 +02:00
Sascha Hauer 8dbf2821e9 mtd: rename MTD_OOB_* to MTD_OPS_*
To sync with the Linux kernel.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-22 16:13:49 +02:00
Kyungsik Lee cdc837f4d9 lib: Add support for LZ4-compressed kernel
This patch adds support for extracting LZ4-compressed kernel images,
as well as LZ4-compressed ramdisk images in the kernel boot process.

This depends on the patch below
decompressor: Add LZ4 decompressor module

Signed-off-by: Kyungsik Lee <kyungsik.lee@lge.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-16 08:24:30 +02:00
Kyungsik Lee e944e7f810 decompressor: Add LZ4 decompressor module
This patch adds support for LZ4 decompression in the Linux Kernel.
LZ4 Decompression APIs for kernel are based on LZ4 implementation
by Yann Collet.

LZ4 homepage : http://fastcompression.blogspot.com/p/lz4.html
LZ4 source repository : http://code.google.com/p/lz4/

Signed-off-by: Kyungsik Lee <kyungsik.lee@lge.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-16 08:24:30 +02:00
Lucas Stach 10a06ed554 clk: allow to instanciate clk mux without registering it
Allows to reuse clk mux code within other clocks.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-02 08:36:09 +02:00
Lucas Stach 98a2fe8f95 clk: allow to instanciate clk gate without registering it
Allows to reuse the clk gate code within other clocks.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-02 08:36:09 +02:00
Lucas Stach b0d851d951 clk: add clock lookup from devicetree
Taken from the Linuxkernel with some small adjustments for barebox.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-02 08:36:09 +02:00
Sascha Hauer 8afe2cb4d4 Merge branch 'for-next-manual/oftree-linux-sync' 2013-07-02 07:08:46 +02:00
Sebastian Hesselbarth 196be5c776 lib: string: import case-insensitive string compare
This imports strnicmp, strcasecmp, and strncasecmp from Linux to barebox.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
2013-06-20 17:17:32 +02:00
Sascha Hauer 680df77174 clk: add prototype for clk_is_enabled
On MXS we need to poll the busy bit when changing a clock rate, but only
when the parent clocks are enabled. This exposes the already present
function clk_is_enabled which is suitable for this job.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-20 08:49:55 +02:00
Sascha Hauer 707fb7ada5 clk: gate: Add inverted gate support
This adds support for gates which need 0 to enable.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-20 08:44:22 +02:00
Sascha Hauer c7e41dac4f clk: divider: Add onebased divider support
In some dividers the register value matches the divider value. This
patch adds support for them.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-20 08:44:22 +02:00
Sascha Hauer df1dcc057e Merge branch 'for-next/misc' 2013-06-02 12:24:56 +02:00
Sascha Hauer b381e781bf treewide include/: Add missing includes
This adds several missing includes to files under include/ which
we relied on being included implicitly.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-31 08:32:59 +02:00
Eric Bénard ae6f751117 nand_base: sync flash detection functions with linux 3.9's code
this fix the problems introduced when detecting non ONFI flashes in
commit 4c2bdc8728
"nand_base: detect more ONFI flash"

Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-17 07:42:54 +02:00
Sascha Hauer c19efab886 Merge branch 'for-next/param'
Conflicts:
	drivers/mci/mci-core.c
2013-05-06 09:30:50 +02:00
Sascha Hauer d8ee54fbbf mtd: Nand: Use dev_add_param_bool for erasebad parameter
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-11 11:48:36 +02:00
Jan Luebbe 973176d20b mtd: update NAND manufacturer names from the kernel
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-11 10:44:09 +02:00
Sascha Hauer 70867916a7 Merge branch 'for-next/mtd' 2013-04-04 14:20:32 +02:00
Sascha Hauer 8f2c6a3d2b Merge branch 'for-next/misc' 2013-04-04 14:20:32 +02:00
Sascha Hauer ab5f6c463c Merge branch 'for-next/imx-realq7'
Fix realq7 compilation
2013-04-04 14:20:05 +02:00
Sascha Hauer 7845fd7af6 Merge branch 'for-next/clps711x' 2013-04-04 12:03:20 +02:00
Sascha Hauer eb84709192 clk: remove unused __clk_[get|put]
This is some unused code resulting from copying stuff from the
kernel. Remove it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-03 17:22:11 +02:00
Sascha Hauer 87eebfe966 clk: Add is_enabled callback
This allows us to better detect whether a clk is enabled or not.

- If we can ask a clk, ask it. If it's enabled, go on and ask parents
- If we can't ask it, but it can be enabled, depend on the enable_count.
  if it's positive, go on and ask parents
- If we can't ask it and it cannot be enabled, assume it is enabled
  and ask parents.

This makes the CLK_ALWAYS_ENABLED unnecessary, since the fixed clk now
always returns 1 in its is_enabled callback.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-15 09:53:30 +01:00
Alexander Shiyan 6824c0d1fb Add helpers to define resources
This patch adds helpers to define resources, such as
DEFINE_RES_NAMED, DEFINE_RES_MEM and DEFINE_RES_MEM_NAMED.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-11 22:17:42 +01:00
Alexander Shiyan 100c016f35 Add Generic GPIO driver
This patch adds generic memory-mapped GPIO controller support.
Code taken from Linux Kernel and adopted for barebox.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-11 22:17:42 +01:00
Sascha Hauer 28c416e060 net: phy: micrel: Update id table from kernel
To get more phy ids.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-11 09:16:07 +01:00
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 611092251b mtd nand: introduce bbm.h
This file is present in current kernels. In order to get closer
to current mtd support introduce it for barebox aswell.

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 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 c6813a5fb1 Merge branch 'for-next/gpt' 2013-03-04 09:21:37 +01:00
Maxime Ripard 4f105dd774 log2: Fix declaration of __roundup_pow_of_two
The roundup_pow_of_two function is making use of __roundup_pow_of_two
when the call to __builtin_constant_p fails, which is not implemented in
barebox.

Copied the code from Linux log2.h header.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-27 08:59:34 +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
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
Jean-Christophe PLAGNIOL-VILLARD 760689e5cc disk: partitions: add EFI GUID Partition Table
form linux 3.8

so you can have part by num or name
not by GUID as this is a non human reading name

     `---- ffe08000.sata
          `---- 0x00000000-0x3fffffff: /dev/ata0
          `---- 0x00100000-0x063fffff: /dev/ata0.0
          `---- 0x00100000-0x063fffff: /dev/ata0.boot
          `---- 0x06400000-0x3fefffff: /dev/ata0.1
          `---- 0x06400000-0x3fefffff: /dev/ata0.linux

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-18 09:11:37 +01:00
Jean-Christophe PLAGNIOL-VILLARD ee2599db24 linux/types: import __aligned_x64 from the kernel
need it by upcoming EFI GPT 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-16 23:39:08 +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 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
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 2738f72352 arm: add vexpress board support
detect the cpu model to dynamise the periphs mapping

currently only tested on qemu but should work on real hardware

Cortex-A9

if you use 1GiB of ram you can run the same barebox on Cortex-A15 or Cortex-A9
otherwise use vexpress_ca9_defconfig where the TEXT_BASE is at 0x63f00000

when we will add the relocation support this defconfig will be drop

qemu/arm-softmmu/qemu-system-arm -M vexpress-a9 -m 1024 -smp 1 -kernel build/vexpress/barebox -pflash build/vexpress/flash0 -nographic

Cortex-A15

qemu/arm-softmmu/qemu-system-arm -M vexpress-a15 -m 1024 -smp 1 -kernel build/vexpress/barebox -pflash build/vexpress/flash0 -nographic

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-12 08:49:27 +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
Jean-Christophe PLAGNIOL-VILLARD 6cd8247eb7 w1: gpio: use int for gpio
so we can use negative value for invalid gpio

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2013-01-13 02:44:30 +08: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 8f32824c6e Merge branch 'for-next/phylib'
Conflicts:
	drivers/net/phy/phy.c
2012-12-07 16:43:21 +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
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
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
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 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
Sascha Hauer 9749c2f16f Merge branch 'for-next/mtd'
Conflicts:
	arch/arm/configs/at91sam9x5ek_defconfig
2012-11-16 14:02:32 +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 daac8bf5d3 Merge branch 'for-next/bcm2835'
Conflicts:
	arch/arm/configs/versatilepb_defconfig
2012-11-16 14:00:34 +01:00
Sascha Hauer 2f5cd85719 Merge branch 'for-next/at91' 2012-11-16 14:00:24 +01:00
Sascha Hauer 18f044436e Merge branch 'for-next/i2c' into for-next/at91 2012-11-15 20:20:19 +01:00
Sascha Hauer eaa821788d Merge commit 'a8a9542' into HEAD 2012-11-15 20:18:46 +01:00
Jean-Christophe PLAGNIOL-VILLARD aa498eefce phy: add smsc phy driver support
as we to have specific phy init to fix chip issue link detection support

based on linux 3.6

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-15 14:24:26 +01:00
Jean-Christophe PLAGNIOL-VILLARD 4f655dd24a phy: add phy_drivers_register
to allow to register an array of drivers

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-15 14:24:18 +01:00
Jean-Christophe PLAGNIOL-VILLARD b27a52c9d6 add roundup and rounddown support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-15 08:34:54 +01:00
Jean-Christophe PLAGNIOL-VILLARD 85ca16d028 import log2 support from linux
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-15 08:34:54 +01:00
Jean-Christophe PLAGNIOL-VILLARD 4104dd9173 mtd: introduce mtd_block_isbad
this allow to do not provide block_isbad at mtd driver level
as example spi flash

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-03 23:20:59 +01:00
Jean-Christophe PLAGNIOL-VILLARD 6cb9aa9202 1-wire: add gpio bus
Based on linux implementation.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-29 22:31:18 +01:00
Carlo Caione 04b941cbac clkdev: add helper function to register one clock lookup for a struct clk
Signed-off-by: Carlo Caione <carlo.caione@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-21 10:51:19 +02:00
Jean-Christophe PLAGNIOL-VILLARD 006538e7c2 mtd: add parent support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-17 20:16:58 +02:00
Jean-Christophe PLAGNIOL-VILLARD a8a9542a71 import include/linux/math64.h
need by mtd_dataflash

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-10-15 19:53:06 +02:00
Sascha Hauer 477b665671 clk: Add clk gate support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-10 09:47:51 +02:00
Jean-Christophe PLAGNIOL-VILLARD e554bfa6ce gpio: add ARM Primcell pl061 support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-10-05 15:07:02 +08:00
Sascha Hauer f2e2e596a2 clk: initial common clk support
This adds barebox common clk support loosely based on the Kernel common
clk support. differences are:

- barebox does not need prepare/unprepare
- no parent rate propagation for set_rate
- struct clk is not really encapsulated from the drivers

Along with the clk support we have support for some basic clk building
blocks:

- clk-fixed
- clk-fixed-factor
- clk-mux
- clk-divider

clk-fixed and clk-fixed-factor are completely generic, clk-mux and clk-divider
are currently the way i.MX muxes/dividers are implemented.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-04 15:19:55 +02:00
Sascha Hauer 89b710e509 clk clkdev: Add clkdev matching based on physbase
Most clock/device associations can be done based on the physical
base address of the corresponding device. So instead of depending
on string matching add an optional possibility to associate a clock
lookups with physical addresses. This also has the advantage that
the lookups for devicetree based devices can be identical to the
platform based devices.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-04 15:19:54 +02:00
Sascha Hauer 6f4dd1b204 err.h: introduce IS_ERR_OR_NULL
Copied from Linux.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-04 15:19:54 +02:00
Sascha Hauer d1e65d2a7b Merge branch 'for-next/remove-fsf-address'
Conflicts:
	drivers/net/miidev.c
	include/miidev.h
2012-10-03 21:12:48 +02:00
Sascha Hauer 6f018668d6 Merge branch 'for-next/amba' 2012-10-03 21:10:05 +02:00
Sascha Hauer 0dc9de2efd net/eth: fix link handling
Check link status on eth device open time and then periodically
every 5 seconds.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-27 23:55:12 +02:00
Jean-Christophe PLAGNIOL-VILLARD 2263e27814 net: introduce phylib
Adapt phylib from linux

switch all the driver to it
reimplement mii bus

This will allow to have
 - phy drivers
 - to only connect the phy at then opening of the device
 - if the phy is not ready or not up fail on open

Same behaviour as in linux and will allow to share code and simplify porting.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-09-25 08:18:58 +02:00