9
0
Fork 0
Commit Graph

2547 Commits

Author SHA1 Message Date
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