clk: ti: fix clk_init retry logic with generic of_clk_init use

Adding support for using generic of_clk_init caused an issue with retrying
clock init, in such way that retry init was never attempted for failed
clocks. Fixed by exporting the retry init call into its own driver API,
and calling this after of_clk_init from low level IO init.

Fixes: e80e55ebbf2856614 ("clk: ti: change clock init to use generic of_clk_init")
Reported-by: Carlos Hernandez <ceh@ti.com>
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Tested-by: Sekhar Nori <nsekhar@ti.com>
clk: ti: set CLK_SET_RATE_NO_REPARENT for ti,mux-clock

[ Upstream commit 7d5fc85d961b807c799786afd175f5d964a2109f ]

When setting the rate of a clock, by default the clock framework will
change the parent of the clock to the most suitable one in
__clk_mux_determine_rate() (most suitable by looking at the clock rate).

This is a rather dangerous default, and causes problems on AM43x when
using display and ethernet. There are multiple ways to select the clock
muxes on AM43x, and some of those clock paths have the same source
clocks for display and ethernet. When changing the clock rate for the
display subsystem, the clock framework decides to change the display mux
from the dedicated display PLL to a shared PLL which is used by the
ethernet, and then changes the rate of the shared PLL, breaking the
ethernet.

As I don't think there ever is a case where we want the clock framework
to automatically change the parent clock of a clock mux, this patch sets
the CLK_SET_RATE_NO_REPARENT for all ti,mux-clocks.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Jyri Sarha <jsarha@ti.com>
ARM: DTS: dra7-evm: Rename mmc2_3v3 regulator to the board level power name

mmc2_3v3 is derived from the board level evm_3v3_sw power line and other
components are using the same line for their power needs.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
ARM: DTS: dra72-evm: Rename mmc2_3v3 regulator to the board level power name

The power line feeding the SD card is also used by other devices on the EVM.
Use generic name instead of mmc2_3v3 so when other devices want to use the
same regulator it will look a bit better.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
ARM: dts: am43xx-evm: Use BCH16 ECC scheme instead of BCH8

Both the am43xx EVMs use a NAND chip with page size 4096 bytes
and spare area of 225 bytes per page.

For such a setup it is preferrable to use BCH16 ECC scheme over
BCH8. This also makes it compatible with ROM code ECC scheme so
we can boot with NAND after flashing from kernel.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
ARM: dts: am437x-gp-evm: Don't use read/write wait monitoring

NAND uses wait pin only to indicate device readiness after
a block/page operation. It is not use to extend individual
read/write cycle and so read/write wait pin monitoring must
be disabled for NAND.

This patch also gets rid of the below warning when NAND is
accessed for the first time.

omap_l3_noc 44000000.ocp: L3 application error: target 13 mod:1 (unclearable)

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
ARM: dts: am43xx-epos-evm: Don't use read/write wait monitoring

NAND uses wait pin only to indicate device readiness after
a block/page operation. It is not use to extend individual
read/write cycle and so read/write wait pin monitoring must
be disabled for NAND.

Add gpmc wait pin information as the NAND uses wait pin 0
for device ready indication.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
ARM: OMAP2+: gpmc: Don't complain if wait pin is used without r/w monitoring

For NAND read & write wait pin monitoring must be kept disabled as the
wait pin is only used to indicate NAND device ready status and not to
extend each read/write cycle.

So don't print a warning if wait pin is specified while read/write
monitoring is not in the device tree.

Sanity check wait pin number irrespective if read/write monitoring is
set or not.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
ARM: OMAP2+: gpmc: Sanity check GPMC fck on probe

This prevents potential division by zero errors
if GPMC fck turns out to be zero due to faulty clock
data.

Use resource managed clk_get() API.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
drivers: net: cpsw: switch-config: unknown vlan handling

Currently only known VLANs are handled inside the switch, when an
unknown VLAN is received the switch will drop the packets. This
ioctl allows user to subscribe the ports for unknown VLAN ids, then
switch will start forwarding unknown VLAN packets as configured by
the user. Additional features of the unknown vlan handling of the
switch other than port forwarding are untag on egress, registered
and unregistered multicast of the unknown VLAN ids

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
drivers: net: cpsw: switch-config: set/get port state

Configuring port states handling of the packet switching to the slave port
like disabling packet forwarding/learning.

Note: Using this interface an user can disable all the slave ports which
      will bring down the Ethernet interface.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Merge branch 'connectivity-ti-linux-3.14.y' of git://git.ti.com/connectivity-integration-tree/connectivity-ti-linux-kernel into ti-linux-3.14.y

TI-Feature: connectivity
TI-Tree: git://git.ti.com/connectivity-integration-tree/connectivity-ti-linux-kernel.git
TI-Branch: connectivity-ti-linux-3.14.y

* 'connectivity-ti-linux-3.14.y' of git://git.ti.com/connectivity-integration-tree/connectivity-ti-linux-kernel:
  drivers: net: cpsw: switch-config: set/get port state
  drivers: net: cpsw: switch-config: unknown vlan handling
  ARM: OMAP2+: gpmc: Sanity check GPMC fck on probe
  ARM: OMAP2+: gpmc: Don't complain if wait pin is used without r/w monitoring
  ARM: dts: am43xx-epos-evm: Don't use read/write wait monitoring
  ARM: dts: am437x-gp-evm: Don't use read/write wait monitoring
  ARM: dts: am43xx-evm: Use BCH16 ECC scheme instead of BCH8

Signed-off-by: Dan Murphy <DMurphy@ti.com>
clk: ti: add "ti,gpio-gate-clock" controlled clock

The added ti,gpio-gate-clock is a basic clock that can be enabled and
disabled trough a gpio output. The DT binding document for the clock
is also added. For EPROBE_DEFER handling the registering of the clock
has to be delayed until of_clk_get() call time.

Acked-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Jyri Sarha <jsarha@ti.com>
Merge branch 'platform-ti-linux-3.14.y' of git://git.ti.com/~rrnayak/ti-linux-kernel/platform-linux-feature-tree into ti-linux-3.14.y

TI-Feature: platform_base
TI-Tree: git://git.ti.com/~rrnayak/ti-linux-kernel/platform-linux-feature-tree.git
TI-Branch: platform-ti-linux-3.14.y

* 'platform-ti-linux-3.14.y' of git://git.ti.com/~rrnayak/ti-linux-kernel/platform-linux-feature-tree:
  clk: ti: add "ti,gpio-gate-clock" controlled clock
  ARM: DTS: dra72-evm: Rename mmc2_3v3 regulator to the board level power name
  ARM: DTS: dra7-evm: Rename mmc2_3v3 regulator to the board level power name
  clk: ti: set CLK_SET_RATE_NO_REPARENT for ti,mux-clock
  clk: ti: fix clk_init retry logic with generic of_clk_init use

Conflicts:
	arch/arm/boot/dts/dra7-evm.dts
	arch/arm/boot/dts/dra72-evm.dts

Signed-off-by: Dan Murphy <DMurphy@ti.com>