menu: Make action callback optional

Someone calling menu_show might only be interested in the entry the user
selected without having something in the action callback. Make it optional.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
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>
partitions: dos: fix memory leak in nt disk signature

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
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>
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>
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>
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>
ARM: MXS: Add MXS specific clk types

MXS needs some special MXS specific clock types:

- pll
- ref (fractional divider)
- busy divider (divider with additional busy bit to poll on a rate change)
- lcdif (Combined clock out of a fractional divider, a divider and a gate.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
ARM: MXS: add clk drivers

This adds support for the i.MX23 and i.MX28 clock modules. This mostly is
a copy from the kernel.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
ARM: MXS: remove board specific clock setups

Some boards have board specific special clock setups. These are now
done in the SoC specific clock drivers.

It is assumed that most board specific clock setup is done based on
copy/paste from U-Boot. The generalized clock setup differs from
some boards:

- ioclk are adjusted to 480MHz
- ssp clocks are adjusted to 96MHz
- enet out clock is enabled

Some boards adjusted the ioclk to 320MHz and the ssp clock to 160MHz.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
mci: mxs: Use dev_*

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
net: fec: Use clk API unconditionally

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
mci: mxs: use common clk API

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
mtd: gpmi-nand: switch to clk support

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
serial: auart: Use clk support

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
serial: stm: Use clk support

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
spi: mxs: Use clk support

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
ARM: MXS: octotp: switch to clk support

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
ARM: MXS: remove imx_enable_enetclk

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
video: stm: switch to clk support

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>