FogBugz #205636: nios2: check exception handler address

Don't copy exception handler if it is already at the exception address.
The CPU may be configured with the exception address already pointing
to the kernel's exception handler. Don't unnecessarily copy the handler
in this case, although the code appears harmless. But, this can optimize
boot up time.

Signed-off-by: Yuriy Kozlov <ykozlov@ptcusa.com>
Signed-off-by: Ley Foon Tan <lftan@altera.com>
FogBugz #205930: Add a second parent option for the dbg_base_clk

The debug base clock can be bypassed from the main PLL to the OSC1 clock.
The bypass register is the staysoc1(0x10) register that is in the clock
manager.

This patch adds the option to get the correct parent for the debug base
clock.

Signed-off-by: Dinh Nguyen <dinguyen@altera.com>
FogBugz #198256: Fix unnecessary USB overcurrent condition

The CycloneV and ArriaV devkit has a small C_VBUS capacitor on the devkit.
Because of this, the USB driver sometimes detects an unnecessary
overcurrent error condition.

This patch uses the external VbusValid signal instead.

Signed-off-by: Dinh Nguyen <dinguyen@altera.com>
FogBugz #206007: Fix gpio dts entry for the correct clock

The correct clock for the HPS gpio(s) should be the l4_mp_clk.

Signed-off-by: Dinh Nguyen <dinguyen@altera.com>
Altera TSE: Disable Multicast filtering to workaround problem

This patch disables multicast hash filtering if present in the hardware
and uses promiscuous mode instead until the problem with multicast
filtering has been debugged, integrated and tested.

Signed-off-by: Vince Bridgers <vbridgers2013@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
FogBugz #208834: Add SD/MMC card detect

Revision D of the Cyclone5 devkit adds support for a GPIO card detect for
the SD/MMC.

Signed-off-by: Dinh Nguyen <dinguyen@altera.com>
FogBugz #209258: hotplug: put cpu1 in wfi

Use WFI when putting CPU1 to sleep.  Don't hold CPU1 in reset
since that results in increased power consumption.

Reset CPU1 briefly during CPU1 bootup.

This has been tested for hotplug and suspend/resume and results
in no increased power consumption.

Signed-off-by: Alan Tull <atull@altera.com>

v2: remove panic after cpu_do_idle loop.
FogBugz #208682: Denali NAND driver misidentifies Hynix chips

The denali driver was not reading enough id bytes to determine the
parameters for a Hynix chip.  The chip was therefore not identified
properly, and the page size and oob size were calculated incorrectly.

This resulted in a message stating the OOB area was not big enough
for 8-bit ECC.

Signed-off-by: Graham Moore <grmoore@altera.com>