9
0
Fork 0
Commit Graph

2932 Commits

Author SHA1 Message Date
Sascha Hauer d7c1612d65 of: Add a context pointer to fixup functions
If drivers want to fixup their specific instance they need some context
to know which instance they have to fixup.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-06 10:24:46 +01:00
Andre Heider 485544f0fb fb: add a line_length value to struct fb_info
Add support for framebuffers with noncontiguous horizontal lines.

Video drivers can set this value if the hardware requires it.
In case a driver does not set it, the current value of
xres * (bpp / 8) is used instead.

Signed-off-by: Andre Heider <a.heider@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-06 09:59:04 +01:00
Sascha Hauer 21af7e0005 blspec: make cdev optional
the cdev for a given directory can be determined by get_cdev_by_mountpath().
Use this function and remove the cdev argument from blspec_scan_directory().
Also, export the function to make code possible which boots the bootloader
spec entries found in directories.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-05 08:37:55 +01:00
Sascha Hauer b7a66554dc fs: Add function to get cdev by mountpath
This is useful to know for the bootloader spec implementation.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-05 08:37:55 +01:00
Sascha Hauer d85c580eeb blspec: Let scan functions return the number of entries found
So that callers can detect whether entries are found or not.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-05 08:37:54 +01:00
Sascha Hauer a58d8ba424 blspec: rename _hwdevice functions to _devicename
Since it's not necessarily the hardware device this seems to
be a more appropriate name.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-05 08:37:54 +01:00
Sascha Hauer fd5b82e640 spi: Call spi_of_register_slaves from core
Makes individual handling of OF spi slaves unnecessary in the bus drivers.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-31 12:53:05 +01:00
Sascha Hauer 0b58452e13 blspec: Fix crash with menu disabled
blspec->menu is only valid when menu support is enabled. Check for it
before dereferencing the pointer.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-30 11:37:06 +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
Jean-Christophe PLAGNIOL-VILLARD ed78b8dbbc mci: add max_req_size support
Some controller such as the ARM AMBA pl181 can not handle more than 16bits
data length request.

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
Andre Heider 55f6869c33 common: add a macro to align an array on the stack
The macro can be used for temporary stack buffers which need to meet
a minimum alignment requirement.

This will be used by bcm2835 mailbox users, where all buffers need to
be aligned.

Signed-off-by: Andre Heider <a.heider@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-22 15:28:58 +02:00
Sascha Hauer 9101c2d02f of: simplify phandle lookup
Instead of populating an extra list containing all phandles just iterate
over the whole tree. This is done as preparation for more dynamic devicetrees
where parts are loaded at runtime. Here we don't want to keep the list of
phandles in sync.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-22 08:55:08 +02:00
Jean-Christophe PLAGNIOL-VILLARD 0d09ccdf75 fs: bpkfs: add missing include
was not include when applying bpkfs patch

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-21 09:13:51 +02:00
Sascha Hauer ef5dac9c2b Implement bootloader spec support for barebox
The Bootloader Specification describes a way how kernels can
be installed on devices and how they can be started by the bootloader.

The bootloader spec is currently supported by (x86) gummiboot and
by systemd which provides a kernel-install script. With the bootloader
spec it's possible for the Operating system to install a new kernel
without knowing about the bootloader and for the bootloader it's possible
to discover and start Operating Systems on a media without being
configured.

For more details about the spec see:

http://www.freedesktop.org/wiki/Specifications/BootLoaderSpec/

This patch adds barebox support for the spec. It enhances the 'boot'
command so that not only boot script names can be given, but also
devices containing bootloader spec entries. With this it's possible
to call the 'boot' command like: 'boot sd emmc net'. It would then
first look for bootloader spec entries on the (removable) sd card,
then, is nothing is found, on the internal emmc and if still
unsuccessful would call the 'net' bootscript.

The bootloader Spec currently doesn't specify which entry should be
default if multiple entries are found on a single device. Therefore
barebox currently has two extensions of the spec. The $BOOT diretory
can contain a file named 'default'. If present, the content of the
file is treated as a filename under $BOOT/loader/entries/ which is
used as default. Similarly if a file named 'once' is present, the
entry is started once and the file is removed afterwards. This is
useful for testing if a newly installed kernel works before making
it the default.

As on ARM and other Architectures a devicetree has to be specified
for the kernel, the 'devicetree' property is used to specify a
devicetree. Like 'kernel' and 'initrd' this also contains a pth
relative to $BOOT.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-14 14:04:20 +02:00
Sascha Hauer 1369bfd44f cdev: store dos partition type in struct cdev
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-14 14:04:20 +02:00
Sascha Hauer 51dce5facb add function to read single line files
Often small files are used to store the value od a variable. This
adds a function to easily read such a variable.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-14 14:04:20 +02:00
Sascha Hauer 904298deb0 Merge branch 'for-next/socfpga'
Conflicts:
	scripts/Makefile
2013-10-07 08:02:24 +02:00
Sascha Hauer ebf9022f2e Merge branch 'for-next/rs485'
Conflicts:
	common/console_common.c
2013-10-07 08:02:14 +02:00
Sascha Hauer a293dc2753 Merge branch 'for-next/omap' 2013-10-07 08:00:39 +02:00
Sascha Hauer 01f37a992f Merge branch 'for-next/net'
Conflicts:
	arch/arm/boards/animeo_ip/init.c
2013-10-07 08:00:36 +02:00
Sascha Hauer d9870d782a Merge branch 'for-next/mount' 2013-10-07 08:00:28 +02:00
Sascha Hauer 33c56e21eb Merge branch 'for-next/misc'
Conflicts:
	commands/Makefile
2013-10-07 08:00:25 +02:00
Sascha Hauer 409885aaf3 Merge branch 'for-next/mci' 2013-10-07 08:00:16 +02:00
Sascha Hauer c26a46f0db Merge branch 'for-next/lzo' 2013-10-07 08:00:16 +02:00
Sascha Hauer 9aa6dd0270 Merge branch 'for-next/login'
Conflicts:
	include/console.h
2013-10-07 08:00:13 +02:00
Sascha Hauer bf8988d820 Merge branch 'for-next/fs'
Conflicts:
	fs/Kconfig
	fs/Makefile
2013-10-07 07:59:42 +02:00
Sascha Hauer 574947ef76 Merge branch 'for-next/console' 2013-10-07 07:59:18 +02:00
Sascha Hauer fb0c2ee1ae Merge branch 'for-next/bpkfs' 2013-10-07 07:59:18 +02:00
Sascha Hauer 0546e669a2 bootm: Replace getenv_loadaddr with getenv_ul
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-07 07:57:42 +02:00
Jean-Christophe PLAGNIOL-VILLARD 32d88d9a86 filetype: add Binary PacKage BPK type
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-06 13:26:51 +02:00
Jean-Christophe PLAGNIOL-VILLARD 6a5121f748 console: factorise function to get the first enabled console
rename it to console_get_first_active

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-06 13:19:46 +02:00
Sascha Hauer cd16227383 fs: add cdev mount helpers
Introduce helpers to iterate over cdevs and mount them to a known
path.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-30 16:03:02 +02:00
Sascha Hauer 5ee4ad2229 environment variables: introduce new helpers
This introduces some new environment variable helpers and updates
the existing ones. Newly introduced are:

getenv_bool: read a bool variable
getenv_ul: read an unsigned long variable
getenev_uint: read an unsigned int variable
getenv_nonempty: like normal getenv, but does return NULL instead of an
                 empty string

All new helpers take a pointer to the value. This value is only modified
when the variable exists. This allows the following programming scheme:

	unsigned int myvalue = sanedefault;

	getenv_uint("myvalue", &myvalue);

So without checking the return value myvalue contains the best possible
value.

getenv_ull is updated to this scheme.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-30 10:28:52 +02:00
Sascha Hauer 4dda27ce49 block: Collect block devices on list
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-30 10:18:39 +02:00
Sascha Hauer 666f12e0c1 introduce runtime loglevel
With this the verbosity of barebox can be controlled during runtime
using the 'loglevel' globalvar.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-29 12:15:40 +02:00
Sascha Hauer 7a1c5027f9 mount: implement -v option to print available filesystems
It's useful to know which filesystems a barebox binary supports.
Add a -v option to the mount command to find it out.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-29 12:11:14 +02:00
Sascha Hauer d915fcbc6d fs: remove unused field 'name' from struct fs_driver_d
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-29 12:11:14 +02:00
Sascha Hauer ecb3aaa23b fs: cleanup backingstore handling
All filesystem drivers which need a backingstore device do the same
ignoring of '/dev/' in the backingstore followed by a cdev_open. Add a
helper function for it and let the core handle the cdev. As a side
effect this makes sure that fsdev->cdev is also set when a device is
mounted without the leading '/dev/' which was previously ignored
by the mount code.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-29 12:11:14 +02:00
Jan Weitzel c988b8bf7f i2c-omap: Update driver
The driver didn't work well with at24 driver. NACKS are lost.
Errors are lost in isr due to the local variable err. Also we didn't wait for
bus free in omap_i2c_xfer_msg.

Fix issues and get other improvements from linux kernel

Tested on OMAP4 and AM335x

Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-27 16:24:37 +02:00
Jean-Christophe PLAGNIOL-VILLARD 12158a28d4 fs: add uimagefs
this will provide the image data and information via file

 # ls -l /tmp/
-rwxrwxrwx          3 arch
-rwxrwxrwx         12 compression
-rwxrwxrwx         16 name
-rwxrwxrwx          5 os
-rwxrwxrwx         24 time
-rwxrwxrwx         12 type
-rwxrwxrwx         10 load_addr
-rwxrwxrwx         10 entry_point
-rwxrwxrwx    2199875 data0
-rwxrwxrwx    2199875 data
-rwxrwxrwx         10 data.crc

if it's multi image

 # ls -l /tmp-multi/
-rwxrwxrwx          3 arch
-rwxrwxrwx         12 compression
-rwxrwxrwx         16 name
-rwxrwxrwx          5 os
-rwxrwxrwx         24 time
-rwxrwxrwx         16 type
-rwxrwxrwx         10 load_addr
-rwxrwxrwx         10 entry_point
-rwxrwxrwx       1292 data0
-rwxrwxrwx        983 data1
-rwxrwxrwx       2287 data
-rwxrwxrwx         10 data.crc

you can get the image header via an ioctl on any file
UIMAGEFS_METADATA

if you want to check the crc do

 # crc32 -f /tmp-multi/data -V /tmp-multi/data.crc
CRC32 for /tmp-multi/data 0x00000000 ... 0x000008ee ==> 0x88d5a0db

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-27 10:39:56 +02:00
Sascha Hauer 361f2db766 bootstrap: Add missing include
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-26 12:29:53 +02:00
Sascha Hauer eacd5e7cc3 usb: make usb devices children of the corresponding host
To be able to find usb devices in the hardware tree.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-24 18:38:22 +02:00
Jean-Christophe PLAGNIOL-VILLARD 9adf567789 console: introduce new callback set_mode
so we can set the port in rs485 mode

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-24 09:21:40 +02:00
Jean-Christophe PLAGNIOL-VILLARD 050f0d5978 console: introduce console_get_by_dev
so we can get console by it's device

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-24 09:21:40 +02:00
Jean-Christophe PLAGNIOL-VILLARD 14e8e0a421 shutdown: add board call back
so if we need to do something switch in the board we can fill this function
pointer (as example on Animeo IP shutdown some rs232 & rs485)

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-24 09:21:40 +02:00
Sascha Hauer 68e6eceae9 bootm: Add dryrun support
This adds support for checking the bootm command without actually booting.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-24 09:03:18 +02:00
Sascha Hauer b15c5eeecf bootm: separate bootm input data and internal data
We used to use struct image_data as the central data structure for bootm and
also as the input data structure. This makes it unclear which of the fields
are actually input data. This patch creates a struct bootm_data which is
exclusively used for input data to make usage clearer.

Also it moves the dispatching of multifile uImage pathnames to the core bootm
code so that the core code gets more flexible and the command code simpler.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-24 09:03:18 +02:00
Sascha Hauer fc5923d975 bootm: move getenv_loadaddr from command to common
getenv_loadaddr may be used by other code, so move it
from command/ to common/

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-24 09:03:18 +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 47974cac82 bootstrap: Add missing include
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-23 08:39:55 +02:00
Jean-Christophe PLAGNIOL-VILLARD 3293c860ab introduce helper to generate mac address with OUI
use random mac address with fixed OUI provided

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-22 20:27:12 +02:00
Jean-Christophe PLAGNIOL-VILLARD e7aab5c844 lzo: update to lzo-2013
take from linux next-20130227
same version as v3.11

before

-rwxr-xr-x 1 root root 123001 Feb 28 01:04 build/highbank/arch/arm/pbl/zbarebox.bin

after

-rwxr-xr-x 1 root root 122226 Feb 28 01:02 build/highbank/arch/arm/pbl/zbarebox.bin

smaller and faster

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-22 16:48:46 +02:00
Jean-Christophe PLAGNIOL-VILLARD 7e6b99fd09 smc91111: add fixup for qemu phy support
as today qemu does not support phy, it will return always 0x0 to any read
on the mii bus. So the phy_id is 0 and the link is donw.

To have the norwork running on versatilpb & other qenu board for the link up
at 100Mbps.

Only enable if qemu_fixup is set.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-22 16:48:03 +02:00
Jean-Christophe PLAGNIOL-VILLARD e62d425517 console: drop f_caps and check the function pointer getc/putc instead
None of the driver make the difference between STDOUT and STDERR.
So we just need to check if putc or getc are filled in the console_device

save 32 bytes on versatilepb

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-21 09:59:16 +02:00
Jean-Christophe PLAGNIOL-VILLARD 892c005849 login/passwd: add default password support
even if the env is broken you will have a password

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-19 08:49:51 +02:00
Jean-Christophe PLAGNIOL-VILLARD bb89ea62a0 login: disable input console if password wrong
so we guarantee that barebox is secured again user interaction

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-19 08:49:47 +02:00
Jean-Christophe PLAGNIOL-VILLARD 50355554dc globalvar: add globalvar_add_simple_int/bool/enum/ip support
so we can types var

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-18 09:24:38 +02:00
Jean-Christophe PLAGNIOL-VILLARD 56ee5d3aac process_escape_sequence: add support to \$?
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-18 09:17:13 +02:00
Sascha Hauer c6c3afb3eb mci: add designware mmc controller support
Based on the U-Boot driver.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-11 12:20:02 +02:00
Sascha Hauer c7278cc625 net: designware: Add decvicetree support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-09 14:15:01 +02:00
Sascha Hauer 7f6b6d25d8 Merge branch 'for-next/omap'
Conflicts:
	arch/arm/boards/pcm051/env/config
2013-09-05 10:40:04 +02:00
Sascha Hauer 1729b1798e Merge branch 'for-next/boardinfo'
Conflicts:
	arch/mips/boards/qemu-malta/init.c
	commands/bootm.c
	drivers/of/base.c
2013-09-05 10:39:22 +02:00
Sascha Hauer e147a7e2bb Merge branch 'for-next/misc' 2013-09-05 10:38:31 +02:00
Sascha Hauer 10169a04ca Merge branch 'for-next/of' 2013-09-05 10:37:54 +02:00
Renaud Barbier da19582070 of: base: import of_find_node_by_type
Import of_find_node_by_type from Linux drivers/of/base.c -
commit id d8dfad3.
This function retrieves a node pointer based on the "device_type"
property of the node.

This is used by device tree update functions in PPC support.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-05 10:27:51 +02:00
Sascha Hauer 4960dc9db0 rework debug_ll
Convert to static inline functions and use lower case letters for function
names. Also, include mach/debug_ll.h when an architecture provides support
for debug_ll, not only when it's actually enabled. This allows architecures
to put some UART initialization code into mach/debug_ll.h which is compiled
out when debug_ll is disabled.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-05 10:15:48 +02:00
Sascha Hauer 88e132b2a8 Merge branch 'for-next/ubifs' 2013-09-05 10:11:54 +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 774580c2bd Make hostname available to C Code
The boards often have a sane default for the hostname. Provide a C
function for setting/getting it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-08-16 08:40:37 +02:00
Sascha Hauer 775ba3c093 introduce barebox_set_model
Instead of calling of_get_model() in barebox_get_model() add a
barebox_set_model() and use it to set the boardinfo once it's
available from the devicetree.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-08-16 08:40:37 +02:00
Sascha Hauer b986f4f1ee remove remaining references of CONFIG_BOARDINFO
With this all code uses barebox_get_model() and no longer
a compile time generated string.

Also this renames barebox_boardinfo() to barebox_get_model()
since we are going to add the corresponding _set_ function
and 'model' corresponds to the devicetree notion.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-08-16 08:40:37 +02:00
Sascha Hauer 016082f85e globalvar: Allow to set initial value
Calling globalvar_add_simple() and setting a value is more than common.
Add a parameter for the initial value.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-08-16 08:40:33 +02:00
Sascha Hauer 938c76198f globalvar: add missing include
include/globalvar.h needs struct param_d, so include <param.h>

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-08-14 12:29:48 +02:00
Sascha Hauer 6c9e799a00 of: introduce some new helpers
of_get_tree_max_phandle - get the maximum phandle of a tree. Needed for
                          creating new phandles without conflicts.
of_node_create_phandle - create a phandle for a node which doesn't have one.
of_find_node_by_alias - find a node by alias name
of_find_node_by_path_or_alias - find a node by full path or alias name
of_find_root_node - find the root node for a given device node

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-08-14 10:03:28 +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 be442d717e move print_hex_dump function to include/common.h
print_hex_dump is a standard kernel function, so move it outside
the ubi header files to make it usable for other code derived from
the kernel aswell.

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 d9abbe8d01 filetype: Add ubifs detection
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 fbf082b565 Merge branch 'for-next/of'
Conflicts:
	arch/arm/boards/freescale-mx53-loco/board.c
	drivers/of/Makefile
2013-08-05 12:50:06 +02:00
Sascha Hauer feefc3ef3b Merge branch 'for-next/mtd' 2013-08-05 12:49:58 +02:00
Sascha Hauer 9ebb0554cd Merge branch 'for-next/misc' 2013-08-05 12:49:58 +02:00
Sascha Hauer f1355b4f57 Merge branch 'for-next/mfd' 2013-08-05 12:49:58 +02:00
Sascha Hauer 07afe7d0e0 Merge branch 'for-next/marvell'
Conflicts:
	arch/arm/boards/Makefile
	arch/arm/dts/Makefile
2013-08-05 12:49:55 +02:00
Sascha Hauer b1aae799f9 Merge branch 'for-next/lz4' 2013-08-05 12:49:46 +02:00
Sascha Hauer eb5565f003 Merge branch 'for-next/driver' 2013-08-05 12:49:31 +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 f483f66e6d memory_display: Change address pointer to type const void *
No need to force a width of the pointer, so use void *. Also it's
not modified in memory_display, so also add a const.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-23 16:32:06 +02:00
Sascha Hauer 5cd4fd8fba dma: apbh: Turn into a driver
This converts the apbh driver into a real driver.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-23 16:25:14 +02:00
Sascha Hauer 322d96e29d dma: apbh: remove CONFIG_ARCH_DMA_PIO_WORDS
This define allows to overwrite DMA_PIO_WORDS with an architecture
specific value. Since this is unused and not clean anyway remove
it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-23 16:25:13 +02:00
Sascha Hauer 3d75e777af dma: apbh-dma: move header file to common location
As the apbh dma engine is also found on i.MX6 move the header file
out of MXS specific directories.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-23 16:25:13 +02:00
Sascha Hauer ca13a84ac2 ARM: MXS: introduce stmp device support
MXS specific devices have some common infrastructure in the kernel
known as STMP devices. We have the same in barebox, but with a
mxs_ prefix instead of a stmp_ prefix. As some STMP devices are
also found on i.MX6 move the common infrastructure out of MXS
specific files and use the stmp_ prefix.

This is done in preparation for i.MX6 NAND support.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-23 16:25:13 +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 38438d4a0f serial: ns16550: remove f_caps from platform_data
So far no user had the need to set the flags, so just remove them
from platform data.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-23 08:28:31 +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
Sascha Hauer e49d260ba7 memory_display: Change address pointer to type const void *
No need to force a width of the pointer, so use void *. Also it's
not modified in memory_display, so also add a const.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-22 12:16:26 +02:00
Hubert Feurstein ed8e6f17a5 include/printk: fix level of pr_err and pr_warning
The level of pr_err and pr_warning were interchanged.

Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-22 09:33:22 +02:00
Sascha Hauer 874f318037 Add configurability via devicetree
This adds the possibility to configure the place for the environment
from the devicetree and to partition devices from the devicetree.

Configuration has the general form of devices with a regular compatible
property. This allows to later add additional drivers or drivers with
different behaviour (for example to add support for redundant environment).

The configuration is all in the /chosen/barebox/ hierarchy of the
devicetree. This separates the configuration from the hardware
description. Also it makes it possible to store the configuration
in a completely separate devicetree (or devicetree overlay). For
the same reason all configuration is done using nodepathes rather
than phandles.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-18 13:54:38 +02:00
Sascha Hauer 3ae902ed7f of: Add convenience functions to en/disable devicenodes
These functions allow to manipulate the "status" property of
devicenodes effectively enabling/disabling devices.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-18 13:54:23 +02:00
Sascha Hauer aa9e85c555 of: add mtd of helpers
Directly taken from the kernel

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-16 08:46:30 +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
Sascha Hauer 0ee203186d cdev: add device_find_partition
device_find_partition allows to find a partition of a device with
a particular name.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-15 11:16:14 +02:00
Sascha Hauer 2672c906a4 cdev: allow to open a struct cdev
cdev_open() opens a cdev by name. This introduces cdev_do_open which
allows to open a cdev when the cdev is already found by other means.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-15 11:16:09 +02:00
Sascha Hauer bec70b3aaa cdev: introduce partition names
currently most partition cdevs have the name <devname>.<partname>
This makes it hard to find a partition by <partname>. This introduces
a partname field in struct cdev so that.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-15 11:16:04 +02:00
Sascha Hauer abf95154f5 of: partitions: factor out function to parse a single partition
To make it usable for other code.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-15 11:15:59 +02:00
Sascha Hauer f57a85985b of: export of_default_bus_match_table
For code which wants to call of_platform_populate.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-15 11:15:52 +02:00
Sascha Hauer 121c3d6e9c devfs: let devfs_add_partition return the new partition
Useful for unregistering later or for adding addional flags.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-15 11:15:47 +02:00
Alexander Shiyan d93a43c8fc mfd: mc13xxx: Add support for MC34708
This patch moves support for MC34708 PMIC into mc13xxx driver.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-15 10:19:36 +02:00
Alexander Shiyan 7bc400d14c base: Transform "platform_match" into "device_match" and make this function public
This change will allow reuse this function for other buses.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-15 10:08:10 +02:00
Sebastian Hesselbarth cf31688b6a OF: base: rename of_free to of_delete_node
of_free is misleading about the actual purpose of the function. There is
already a of_create_node counterpart, so rename of_free to of_create_node
and update all users accordingly.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-05 08:26:57 +02:00
Sebastian Hesselbarth 3c84ded0f5 OF: remove device and resource pointer from struct device_node
struct device_node has its own resources and a pointer to associated
device_d. With recent platform related OF code, we can convert the
only user of it and remove those pointers from struct device_node.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-05 08:26:57 +02:00
Sebastian Hesselbarth 61bb8bfc7c OF: gpio: convert DT based gpio handling to new OF API
This creates a Linux OF API compatible counterpart of of_get_named_gpio_flags.
Existing of_get_named_gpio is converted to a static inline function, which is
in the corresponding of_gpio.h include. While at it, drivers/of/gpio.c is
also renamed to drivers/of/of_gpio.c to follow the of_ prefix naming scheme.
The new include is also added to existing users of of_get_named_gpio.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-05 08:26:57 +02:00
Sebastian Hesselbarth 483424e027 OF: import bus/device related functions from Linux OF API
This imports some bus and device related functions from Linux OF API
with some modifcations for Barebox.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-05 08:26:57 +02:00
Sebastian Hesselbarth 6fbaab1085 OF: base: move OF_ROOT_NODE_ defines to local OF code
OF_ROOT_NODE_* defines should not be used outside of base.c. Move them
to drivers/of/base.c to ensure they will not be used elsewhere.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-05 08:26:57 +02:00
Sebastian Hesselbarth bfc5605e2f OF: convert of_translate_address to new API
This converts existing of_translate_address to recently added API. In
contrast to existing behavior, the new function honors ranges properties
properly. It now allows reg properties to be set as offset with respect
to the correspoding parent node.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-05 08:26:57 +02:00
Sebastian Hesselbarth d0a6aaea6a OF: import address related functions from Linux OF API
This imports drivers/of/address.c from Linux with some minor modifications.
of_translate_address is not yet enabled and PCI and ISA related bus translations
have not been imported. Also, a corresponding include header is created with
prototypes and non-OF function stubs.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-05 08:26:57 +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
Sascha Hauer 12657cb99e Merge branch 'for-next/usb' 2013-07-01 10:14:40 +02:00
Sascha Hauer 55e87e07c1 Merge branch 'for-next/ppc' 2013-07-01 10:14:40 +02:00
Sascha Hauer 1ca699d081 Merge branch 'for-next/of' 2013-07-01 10:14:40 +02:00
Sascha Hauer b83536bdb9 Merge branch 'for-next/mxs' 2013-07-01 10:14:40 +02:00
Sascha Hauer 939c2173a3 Merge branch 'for-next/multi-image' 2013-07-01 10:14:40 +02:00
Sascha Hauer 85b427ffed Merge branch 'for-next/misc' 2013-07-01 09:37:37 +02:00
Sascha Hauer 87ed8c0456 Merge branch 'for-next/menu' 2013-07-01 09:37:37 +02:00
Sascha Hauer 44ebe21a33 Merge branch 'for-next/memtest' 2013-07-01 09:37:37 +02:00
Sascha Hauer be1ebac429 Merge branch 'for-next/mci'
Conflicts:
	arch/arm/boards/ccxmx51/ccxmx51js.c
	arch/arm/boards/dmo-mx6-realq7/board.c
2013-07-01 09:37:35 +02:00
Sascha Hauer 33a6e99a38 Merge branch 'for-next/imx'
Conflicts:
	drivers/usb/imx/chipidea-imx.c
2013-07-01 09:37:04 +02:00
Sascha Hauer d2fcbe0690 Merge branch 'for-next/bootm' 2013-07-01 09:32:04 +02:00
Renaud Barbier e06aa06965 common: DDR2 SPD checksum.
The code calculates the DDR2 SPD checksum as per JEDEC standard
No 21-C Appendix X (revision 1.2)

The code is based on the equivalent files from U-Boot version
git-a71d45d.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-27 08:38:04 +02:00
Sascha Hauer e1bbf6be90 ARM: Add image end section
In the upcoming multi image build process we will cat images together.
To find the concatenated image we need to reliably find the end of the
current binary. This adds a dummy section at the end of a pbl binary.
Its only purpose is to mark the end of the image. The multi image
patches will add something to this section so that it doesn't get
discarded by the linker.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-26 23:43:19 +02:00
Sascha Hauer 8d2762ff56 driver: implement device_detect_by_name function
It becomes a common pattern for boards to find a device and
call device_detect on it. Add a convenience wrapper for it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-26 18:17:12 +02:00
Sascha Hauer 2177c1c20c mfd: mc34708: provide static inline wrapper
If the driver is disabled provide a static inline wrapper for
mc34708_get() to prevent linker errors.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-26 10:35:46 +02:00
Sascha Hauer 0686fe0edf add function to get boardinfo string
When using devicetrees the boardinfo (or model) can be obtained
from the devicetree. Add a function to get the boardinfo so that
we have a chance to add information from the devicetree.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-24 21:39:07 +02:00
Sascha Hauer 8f5889eb0a usb: implement a usb_host_detect to scan individual USB hosts
Currently we can only (re)scan all USB hosts. Add a function to
scan individual hosts. This is useful for implementing the detect
callback in the next patch.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-21 07:41:38 +02:00
Sascha Hauer 31879ed96f usb: move scanned status into core
A command should not be interested in the internal USB core state, so
move the state handling into the core.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-21 07:41:32 +02:00
Sascha Hauer a6d4345e1b ata: ide: embed ata_ioports into struct ide_port and export it
Embedding struct ata_ioports into struct ide_port saves us an allocation.
Making it available to client drivers is necessary to give them access
to struct ata_port which is needed in the next patch.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-21 07:40:36 +02:00
Sebastian Hesselbarth 1e2a238145 OF: base: cleanup base function include
This cleans up include/of.h by moving some function prototypes below
CONFIG_OFTREE and provide bogus stubs for !CONFIG_OFTREE.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
2013-06-20 21:22:19 +02:00
Sebastian Hesselbarth 2e2265bfd4 OF: base: convert and remove device_node_for_nach_child
Remove device_node_for_nach_child and convert users to corresponding
imported OF API functions.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-20 21:22:19 +02:00
Sebastian Hesselbarth 097133af15 OF: base: remove of_find_child_by_name
With of_get_child_by_name from Linux API, we can now convert and remove
of_find_child_by_name.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
2013-06-20 21:22:15 +02:00
Sebastian Hesselbarth e520a8cc46 OF: base: remove of_tree_for_each_node from public API
This patch converts users of of_tree_for_each_node to recently added
for_eacg_compatible_node helper. Also of_tree_for_each_node is removed
from public OF API.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
2013-06-20 21:20:55 +02:00
Sebastian Hesselbarth 2fe4a860eb OF: base: import property iterators from Linux OF API
This imports of_prop_next_u32, of_prop_next_string, and the corresponding
for_property_for_each_ helpers from Linux OF API.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
2013-06-20 21:20:55 +02:00
Sebastian Hesselbarth a0b6c0d00a OF: base: introduce property write for bool, u8, u16, and u64
This adds functions to set an array of or a single value for bool,
u8, u16, and u64 properties.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
2013-06-20 21:20:54 +02:00
Sebastian Hesselbarth 511ba46157 OF: base: import parse phandle functions from Linux OF API
This imports of_parse_phandle_with_args and of_count_phandle_with_args
from Linux OF API. The slightly different of_parse_phandles_with_args
is removed and all users are converted to reflect the API change.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
2013-06-20 21:20:54 +02:00
Sebastian Hesselbarth 083995f815 OF: base: import of_parse_phandle from Linux OF API
This imports of_parse_phandle from Linux OF API.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
2013-06-20 21:20:54 +02:00
Sebastian Hesselbarth 1d68e58532 OF: base: import of_property_read_* helpers from Linux OF API
This imports of_property_read_* helpers from Linux OF API to allow
to read all kinds of properties.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
2013-06-20 21:20:54 +02:00
Sebastian Hesselbarth 234be066c1 OF: base: import parent/child functions from Linux OF API
This imports of_get_parent, of_get_next_available_child, and
of_get_child_by_name and corresponding helpers from Linux OF API.
of_get_next_child is not imported but implemented as list iterator
instead. Also, of_get_child_count and of_get_available_child_count
are introduced.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
2013-06-20 21:20:54 +02:00
Sebastian Hesselbarth b45e2c0b47 OF: base: import of_find_node_with_property from Linux OF API
This imports of_find_node_with_property and corresponding helpers
from Linux OF API.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
2013-06-20 21:20:54 +02:00
Sebastian Hesselbarth 8b362a690b OF: base: import of_find_matching_node_and_match from Linux OF API
This imports of_find_matching_node_and_match and corresponding helpers
from Linux OF API.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
2013-06-20 21:20:54 +02:00
Sebastian Hesselbarth 464c393507 OF: base: import of_find_compatible_node from Linux OF API
This imports of_find_compatible_node and corresponding for_each_compatible_node
helper from Linux OF API.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
2013-06-20 21:20:54 +02:00
Sebastian Hesselbarth f8a1e2a5fd OF: base: import of_find_node_by_name from Linux OF API
This imports of_find_node_by_name and corresponding for_each_node_by_name
helper from Linux OF API.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
2013-06-20 21:20:54 +02:00
Sebastian Hesselbarth 80fc31dac3 OF: base: rename of_node_disabled to of_device_is_available
According to ePAPR 1.1 spec, device tree nodes status can be either
"okay", "disabled", "fail", or "fail-sss". Barebox already has a function
to check for "disabled" nodes, while Linux checks for "okay" or "ok".
To synchronize Barebox and Linux OF APIs, rename of_node_disabled to
of_device_is_available and check for "okay" instead of "disabled" as it
also makes "fail"ed devices unavailable.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
2013-06-20 21:20:54 +02:00
Sebastian Hesselbarth 0b79c3bb64 OF: base: sync of_find_node_by_path with linux OF API
Barebox of_find_node_by_path requires a node to be passed as start node
to start searching. Linux OF API does not pass this node and no current
user of it in barebox is passing anything else than the root node.
Therefore, we rename current function to of_find_node_by_path_from and
introduce a Linux OF API compatible of_find_node_by_path that always
passes the current root_node. Also, all current users of that function
are updated to reflect the API change.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-20 21:20:50 +02:00
Sebastian Hesselbarth 905f3ee7fb OF: base: sync of_find_property with linux OF API
To start synchronizing OF API of barebox with linux OF API, this adds
a length pointer to of_find_property. Also all current users of that
function are updated to reflect the API change.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
2013-06-20 17:18:01 +02:00
Sebastian Hesselbarth 03e0e78bf6 OF: base: convert strcmp to default string compare functions
Barebox compares compatible, node names, and property names with strcmp.
Linux by default compares compatible and node names with strcasecmp. To
avoid inconsitencies between Barebox and Linux dts files, we convert to
these default string compare functions.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
2013-06-20 17:17:54 +02:00
Sebastian Hesselbarth e7c057974e OF: base: export of_alias_scan
To prepare clean-up of OF API, we need to export of_alias_scan.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
2013-06-20 17:17:50 +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 dee6282fbf mci: Use tran_speed field to fix highspeed MMC card clock
The tran_speed field as decoded from csd is valid in most cases,
so use it to determine the maximum clock we can support. It is
not valid though for MMC highspeed cards, in this case the
csd contains invalid values and we have to set tran_speed explicitly
to the maximum speed. As the values passed into mci_set_clock are
now based on tran_speed we no longer have to limit the rate to
tran_speed in mci_set_clock.

The (intended) effect of this patch is that highspeed MMC cards are
no longer limited to non highspeed rates.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-20 16:18:16 +02:00
Sascha Hauer 2ab4c0869e mci: provide static inline function for mmc_host_is_spi
To prevent compiler warnings like:

warning: unused variable 'host'

When CONFIG_MCI_SPI is disabled.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-20 16:18:16 +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 2d2ec6619b read_file: Make it work on tftp servers which do not pass size
Some tftp servers (for example netkit-tftp) do not pass the filesize.
Add a workaround for read_file which reads the file into a temporary
file which then is copied to a buffer.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-20 08:42:46 +02:00
Sascha Hauer 7d58f3f346 bootm: factor out code to make it usable from C
Much of the bootm code is implemented in the command itself. Move
it to a common place to be able to call it from C aswell.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-19 22:57:39 +02:00
Sascha Hauer f890ea69be Fix gotoXY argument order
gotoXY has the argument order (y, x). Change this so that usage of this
function feels more natural.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-19 22:45:14 +02:00
Sascha Hauer 2093884040 ata: ide: Allow to set the devicename
To get persistent devicenames under /dev/ allow to set the
devicename from the driver instead of using "ata" unconditionally.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-19 18:48:36 +02:00
Sascha Hauer 6883fc4378 ata: implement detect
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-06 09:42:16 +02:00
Sascha Hauer 7ffc9df31d ata: move ATA_ID_ fields and functions to include/
We need ata_id_has_lba48() in another C file, so move
the ATA_ID_* stuff to include/ata_drive.h like in the Linux
Kernel.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-06 09:42:16 +02:00
Alexander Aring 3275c7ea43 common: add memtest.c with mem_test routine
Add mem_test routine. Useful to detect timing problems if someone
porting a new device to barebox. This test includes a data bus test,
address bus test and integrity check of memory.

This mem_test routine has as parameter start and end address of testing
space. The last parameter can skip the integrity check.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-05 22:54:35 +02:00
Alexander Aring 49686838a9 common: add ALIGN_DOWN macro
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-05 22:54:34 +02:00
Alexander Aring 71218359af common: fix codestyle in ALIGN macros
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-05 22:54:34 +02:00
Sascha Hauer f696692b87 net: Set mac-address property
Linux normally has no idea how to retrieve MAC Addresses, but instead
expects the MAC address in the devicetree. This patch adds the MAC
address to the devicetree for Linux if we find a valid one in barebox.
This mechanism is limited of course to devices barebox has a driver for
and which are probed themselves from the devicetree.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-05 08:53:43 +02:00
Sascha Hauer 2302fc6076 mci: rename capabilities flags
Use MMC_CAP_ names instead of MMC_MODE_. This makes it more
clear that these are capabilities of host/card and do not refer
to the current mode. These are in line with the Linux Kernel
except for MMC_CAP_MMC_HIGHSPEED_52MHZ which could be fixed
later.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-03 10:59:53 +02:00
Masaki Muranaka fbb12b3b9e Fix typo.
This fix is harmless and obvious.

Signed-off-by: Masaki Muranaka <monaka@monami-ya.jp>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-03 10:07:47 +02:00
Masaki Muranaka af5c5c8fb2 Remove ftstc(). It is declared but not implemented.
Signed-off-by: Masaki Muranaka <monaka@monami-ya.jp>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-03 09:16:11 +02:00
Sascha Hauer eedf216ac7 Merge branch 'for-next/usb-chipidea' 2013-06-02 16:28:34 +02:00
Sascha Hauer 1f23a43924 Merge branch 'for-next/of-i2c' 2013-06-02 16:28:34 +02:00
Sascha Hauer 5f56c35060 Merge branch 'for-next/of' 2013-06-02 16:28:34 +02:00
Sascha Hauer 08f2dda59f Merge branch 'for-next/mips'
Conflicts:
	include/of.h
2013-06-02 16:28:31 +02:00
Sascha Hauer 8f9044927d Merge branch 'for-next/mci'
Conflicts:
	include/driver.h
2013-06-02 16:28:21 +02:00
Sascha Hauer 064fdcec9f Merge branch 'for-next/imx-oftree'
Conflicts:
	arch/arm/boards/freescale-mx51-pdk/board.c
2013-06-02 12:36:38 +02:00
Sascha Hauer 5e7f855847 Merge branch 'for-next/block' 2013-06-02 12:35:47 +02:00
Sascha Hauer df1dcc057e Merge branch 'for-next/misc' 2013-06-02 12:24:56 +02:00
Masaki Muranaka 9bdc30075f Enables to build bootm command on generic_x86.
I'm not sure but I guess we don't need defined(__I386__) check.
I kept it for now.

Signed-off-by: Masaki Muranaka <monaka@monami-ya.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-02 11:21:10 +02:00
Sascha Hauer ea9c911b8f mci: Add devicetree helper function
This adds helper code to parse the bus-width and max-frequency
property from devicetree.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-31 18:19:11 +02:00
Sascha Hauer 76e4198d89 usb: i.MX chipidea: Add overcurrent disable flag for i.MX6
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-31 15:55:58 +02:00
Sascha Hauer b1a4a659c6 i2c: Add devicetree support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-31 15:53:11 +02:00
Sascha Hauer 75ea5f1c0f of: Add of_modalias_node function
Directly from the Kernel.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-31 15:53:11 +02:00
Sascha Hauer dffbe91e8b mci: implement detect driver callback
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-31 12:32:10 +02:00
Sascha Hauer 95e7982f99 devices: add detect mechanism
We often encounter the situation where slow devices should not be
probed during startup since probing is slow and maybe unnecessary
for unused devices. With MMC we have the 'probe' device parameter,
for ata we have the same, for USB we have the 'usb' command. Overall
this is not very consistent.
With MMC there is the additional problem that the probe parameter
is attached to the logical device when we often have the information
which physical device we want to probe.
This patch adds a 'detect' callback for devices and adds a command
to detect devices and to list the devices which are actually detecable.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-31 12:32:05 +02:00
Sascha Hauer e82e40523f block: implement block_read/block_write functions
Some drivers use blk->ops->read/write. This bypasses the caching block
layer and was never intended like this. The upper API to the block layer
is the cdev layer. This patch adds block_read and block_write functions
and uses them where appropriate.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-31 09:34:48 +02:00
Sascha Hauer f79343dec4 block: remove unused read_start and read_done ops
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-31 09:23:48 +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
Sascha Hauer b5167ee51c bootm: print Kernel commandline in verbose mode
Without devicetree support we print the Kernel commandline in
verbose mode. Do the same with devicetree boot aswell.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-31 08:32:37 +02:00
Sascha Hauer bec599e5a0 usb: Add devicetree helpers
Add helpers to get the dr_mode and the phy_mode.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-30 12:48:01 +02:00
Sascha Hauer 1f0a3175ec of: Add of_alias_get function
This is used to retrieve the name of the alias for a given
devicenode.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-30 12:18:28 +02:00
Sascha Hauer 895c0bee6e mci: embed mci device into struct mci
To safe a separate allocation and to make the code simpler.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-30 12:18:28 +02:00
Sascha Hauer 73b0d228e5 driver: Attach info callback to device, not to driver
Since the info is device specific and not driver specific, attach
the callback to the device. This makes it possible to have a info
callback for a device which does not have a driver attached.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-30 12:18:27 +02:00
Sascha Hauer 4a4f2f20b8 mci: Add support for MMC boot partitions
Some MMC cards support boot partitions. These are special regions
on the MMC card intended to put a bootloader on.

This patch adds support for these partitions, they are accessible
as /dev/diskx.boot[0|1].

Additionally the partitions can be configured bootable using a
device parameter. This can be used to mark the user area or one
of the boot partitions as bootable.

Since this feature is mostly seen on eMMC cards it is made optional
to lower the size impact for boards which do not have eMMC.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-30 12:18:27 +02:00
Alexander Shiyan 425bf8b5c9 ARM: OMAP MCI: Move TWL6030 power initialization into OMAP directory
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-30 12:18:27 +02:00
Sascha Hauer a6afae76f1 param: Add helpers to provide an enum parameter
We recently gained helper functions for different types of
device parameters. One thing missing was a helper for an
enum type parameter. This patch adds this.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-23 15:40:26 +02:00
Sascha Hauer c5fa299862 param: Add info function
Some parameters may wish to provide some information about their
meaning or possible values. Provide an info callback for parameters.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-23 15:40:22 +02:00
Sascha Hauer 04fdd75d8a of: provide NULL of_get_root_node for \!CONFIG_OFTREE
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-23 15:10:07 +02:00
Sascha Hauer ab02b5a68d Merge branch 'for-next/of-misc' into for-next/imx-oftree 2013-05-23 09:19:13 +02:00
Sascha Hauer fe85ff4761 treewide: Fix typo seperate -> separate
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-21 21:38:21 +02:00
Sascha Hauer 2995752d75 net: Add of_register_ethaddr
We already have a possibility to register a MAC address provider
based on a ethernet device id. This adds a similar functionality
for devices probed from devicetree. Code can register itself to
be a MAC address provider for a certain devicetree node.

This helps on i.MX to let the IIM unit provide a MAC address for
the FEC.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-21 09:36:27 +02:00
Sascha Hauer 0cb87c4d1e of: Add of_match_node function
To match a of_device_id arrays against a device_node. Same functionality
as in the kernel.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-20 15:53:06 +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
Antony Pavlov 74c4acea0d of: separate out "generic" memory bank adding
This patch separates out the "generic" memory
segment registration function (of_add_memory_bank())
from of_add_memory().
The MIPS architecture has different view on memory
resources than the ARM and PPC architectures
so the "generic" of_add_memory_bank() is
unusable for the MIPS architecture.
We can add MIPS-specific of_add_memory_bank()
into arch/mips code.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-13 21:17:10 +02:00
Antony Pavlov 2924294da1 gpio: fix typos
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-12 12:30:34 +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 579b794b5d Merge branch 'for-next/of'
Conflicts:
	arch/arm/mach-imx/Makefile
2013-05-06 09:30:37 +02:00
Sascha Hauer 18ffa4da98 Merge branch 'for-next/mtd' 2013-05-06 09:30:28 +02:00
Sascha Hauer c8af035b41 Merge branch 'for-next/misc' 2013-05-06 09:30:28 +02:00
Sascha Hauer 3cdd18632e Merge branch 'for-next/memory-commands' 2013-05-06 09:30:28 +02:00
Hubert Feurstein c06956e15f common/filetype: move partition-table detection into own function
Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-29 09:32:54 +02:00
Sascha Hauer 7f63c0a246 Add initial pinctrl support
This is a massively stripped down pinctrl support. The upper API
consists of only of:

int pinctrl_select_state(struct device_d *dev, const char *state);

This is used to setup the pinmux for a device to a certain state.
This function normally does not need to be called manually. The
device core will setup the default state before probing a device.

The pinctrl core has the job of handling the devicetree. It parses
the pinctrl phandles for a device from devicetree, finds the correct
pinctrl device and calls its set_state callback with the pinctrl
setup device node.

The simplicity of this pinctrl framework comes from the fact that
we:

- Limit usage to devicetree only for now. For non devicetree use the
  old legacy SoC specific APIs still can be used.
- Do not parse the devicetree into internal data structures which
  are used by the drivers later. This adds the overhead that we
  may parse the devicetree multiple times for more dynamic setups,
  but on the other hand we do not need to parse devices from the
  devicetree we don't use in barebox
- Do not detect resource conflicts. Since the framework mainly is
  a devicetree parser this would be hard to implement. It should
  be easy for board maintainers to avoid resource conflicts though.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-23 09:36:13 +02:00
Sascha Hauer 66cd90abe7 of: partitions: pass struct cdev as argument
pass a struct cdev instead of the cdev name to of_parse_partitions.
This is available to the caller anyway and makes it easier to use
additional stuff from the cdev (like knowing whether it's a mtd
device).

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-22 09:25:33 +02:00
Sascha Hauer 6d1788ab34 of: Allow multiple resources in 'reg' property
Some devices need multiple resources in the reg property. This patch
adds support for it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-22 09:23:50 +02:00
Sascha Hauer 266dea34a5 of: Add of_property_read_string_index()
Directly imported from the Kernel

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-22 09:23:35 +02:00
Alexander Shiyan 7691202bdd Remove unimplemented usb_driver_unregister declaration
We do not have usb_driver_unregister function, so remove this declaration.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-18 08:00:07 +02:00
Sascha Hauer 4e3ce28973 Use a common define for RW_BUF_SIZE
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-17 13:36:31 +02:00
Sascha Hauer 255e5b4c42 memory commands: move memory_display to separate file
memory_display is a function which should generally be available.
Currently it depends on memory command support being compiled in,
so move the function to a separate file.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-17 13:35:17 +02:00
Sascha Hauer d91b7772c4 memory commands: export common functions
The memory commands all use open_and_lseek and mem_parse_options. Export
them to be able to split the memory commands into separate files.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-17 12:56:44 +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
Sascha Hauer ab855df99f console: Use dev_add_param_int for baudrate parameter
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-11 11:48:35 +02:00
Sascha Hauer c57fa97ee7 param: pass param to dev_remove_param
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-11 11:48:35 +02:00
Sascha Hauer fb3fcaf2cc fb: Use dev_add_param_bool for enable parameter
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-11 11:48:35 +02:00
Sascha Hauer f3b911c820 ata: Use dev_add_param_bool for probe parameter
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-11 11:48:35 +02:00
Sascha Hauer fff0e0f741 mci: Use dev_add_param_int for probe parameter
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-11 11:48:35 +02:00
Sascha Hauer a280858594 param: remove now unused dev_[gs]et_param_ip
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-11 11:48:35 +02:00
Sascha Hauer 6d0161d02a net: store ethernet device parameters in device
Rather than storing the parameters globally and trying to keep them
in sync with the device parameters, store the parameters in the ethernet
device directly. Also, update to dev_add_param_ip().

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-11 11:48:34 +02:00
Sascha Hauer f80e7c4920 param: Add ip address convenience function
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-11 11:48:31 +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 2df33a69bd param: Add integer and boolean parameter helpers
This adds convenience functions for directly registering integers
and bools as device parameter. This way driver no longer have to
fiddle with string handling. The format used to print the parameter
is passed to the functions to be able to print parameters in a
flexible way.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-11 10:20:56 +02:00
Sascha Hauer f1253fdf8e param: Add dev member to struct param_d
This will make it unnecessary to pass the dev pointer around later.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-06 08:23:45 +02:00
Sascha Hauer f72a4fd370 of/net: Add net related of helpers
of_get_phy_mode to parse the phy mode from the devicetree and
of_get_mac_address to parse a MAC address from the devicetree.
Directly taken from the Kernel.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-04 23:23:41 +02:00
Sascha Hauer 0a637bcc3c Merge branch 'for-next/zynq'
Conflicts:
	arch/arm/Makefile
2013-04-04 23:23:19 +02:00