remoteproc: Do not use moduleloader.h in the driver

It is causing compilation failure for multi_v7_defconfig.

Reported-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
net: xilinx_emacps: Use pm_runtime_get_sync() in xemacps_open().

In xemacps_open(), use pm_runtime_get_sync(), not pm_runtime_get().
When the latter returns, the clocks may not be enabled, leading to
all kinds of problems when accessing the controller immediately
afterwards.

Signed-off-by: Thomas Betker <thomas.betker@rohde-schwarz.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
net: xilinx_emacps: Fix error handling in xemacps_open().

In xemacps_open(), call napi_enable() a bit later so that we don't have
to call napi_disable() when xemacps_mii_probe() fails. Also, call
xemacps_reset_hw() when the latter happens, to undo xemacps_init_hw().

Signed-off-by: Thomas Betker <thomas.betker@rohde-schwarz.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
net: xilinx_emacps: Use del_timer_sync() in xemacps_close().

In xemacps_close(), use del_timer_sync(), not del_timer(); otherwise,
xemacps_gen_purpose_timerhandler() may still be running afterwards.

Also, call xemacps_reset_hw() after phy_disconnect(), not before, since
the latter uses MDIO -- e.g., via phy_config_interrupt().

Signed-off-by: Thomas Betker <thomas.betker@rohde-schwarz.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
net: xilinx_emacps: Call synchronize_irq() in xemacps_reset_hw().

In xemacps_reset_hw(), call synchronize_irq() to make sure that the
interrupt routine has finished.

Signed-off-by: Thomas Betker <thomas.betker@rohde-schwarz.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
net: xilinx_emacps: Merge loops in xemacps_start_xmit().

In xemacps_start_xmit(), merge the loop for clearing the USED bits back
into the main loop; this simplifies the code and makes it more readable.

This is a supplement to the commit "xilinx_emacps: Fix the bug for
fragmented packets" on Apr 26, 2013.

Signed-off-by: Thomas Betker <thomas.betker@rohde-schwarz.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
net: xilinx_emacps: Allow nr_frags == freecnt in xemacps_start_xmit().

In xemacps_start_xmit(), allow nr_frags == tx_bd_freecnt so that the
whole Tx BD list can be used.

Signed-off-by: Thomas Betker <thomas.betker@rohde-schwarz.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
net: xilinx_emacps: Clean up xemacps_descriptor_init().

Improve some details in xemacps_descriptor_init():

* Initialize tx_skb, rx_skb, rx_bd, tx_bd; these are used by
  xemacps_descriptor_free() which is called in case of an error.

* Add subtitles for readability.

* Omit memset(); there is no need for it since we have to loop through
  the BD lists anyway.

* Set the WRAP bits directly in the main loops, simplifying the code.

* Clear bits [1:0] in cur_p->addr for Rx BDs.

* Remove the redundant loop which clears the NEW bit of the Rx BDs.

Signed-off-by: Thomas Betker <thomas.betker@rohde-schwarz.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
net: xilinx_emacps: Support half-duplex mode in xemacps_adjust_link().

In xemacps_adjust_link(), pass half-duplex modes to the gmii_to_rgmii
core. For full-duplex links, the behaviour is the same as before (the
duplex bit was always set).

Also, merge the two sets of "if" blocks (where the speed was checked
twice), and add a case for unexpected PHY speeds.

Signed-off-by: Thomas Betker <thomas.betker@rohde-schwarz.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
net: xilinx_emacps: Remove the __exit attribute from xemacps_remove().

xemacps_remove() is not a module exit function, so drop the __exit
attribute.

This is a supplement to the commit "Merge commit 'v3.8' into
master-next" on Mar 19, 2013.

Signed-off-by: Thomas Betker <thomas.betker@rohde-schwarz.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
net: xilinx_emacps: Remove PEEP remains.

Remove comments and macros which are no longer relevant because they
are associated with PEEP support.

This is a supplement to the commit "xilinx_emacps: Clean up to remove
code related to PEEP" on Apr 26, 2013.

Signed-off-by: Thomas Betker <thomas.betker@rohde-schwarz.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
microblaze: Enable KGDB in defconfig

Enable KGDB in defconfig to be sure that support
is regularly compiled.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>