]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
3 months agotest: mbr: Adjust test to drop 0x
Simon Glass [Sun, 1 Sep 2024 22:26:22 +0000 (16:26 -0600)]
test: mbr: Adjust test to drop 0x

U-Boot commands typically don't need 0x to specify hex, since they use
hex by default. Adding 0x in this test is confusing since it suggests
that it is necessary. Drop it from the file.

Also use the %#x construct to get the 0x when needed.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 months agotest: mbr: Adjust test to use lower-case hex
Simon Glass [Sun, 1 Sep 2024 22:26:21 +0000 (16:26 -0600)]
test: mbr: Adjust test to use lower-case hex

Switch to lower-case hex which is more commonly used in U-Boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 months agodm: usb: Deal with USB keyboard persisting across tests
Simon Glass [Sun, 1 Sep 2024 22:26:20 +0000 (16:26 -0600)]
dm: usb: Deal with USB keyboard persisting across tests

Clear any USB-keyboard devices before running a unit test, to avoid
using a stale udevice pointer in stdio. Add a long comment to explain
this situation and why this solution seems best, at least for now.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 months agousb: Add DEV_FLAGS_DM to stdio for USB keyboard
Simon Glass [Sun, 1 Sep 2024 22:26:19 +0000 (16:26 -0600)]
usb: Add DEV_FLAGS_DM to stdio for USB keyboard

This device contains a pointer to struct udevice so set the flag
indicating that, just to be tidy.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 months agolog: Add a new log category for the console
Simon Glass [Sun, 1 Sep 2024 22:26:18 +0000 (16:26 -0600)]
log: Add a new log category for the console

Add a new category which covers the console, including the stdio
drivers.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 months agousb: Drop old non-DM code
Simon Glass [Sun, 1 Sep 2024 22:26:17 +0000 (16:26 -0600)]
usb: Drop old non-DM code

The driver model deadline for USB was in 2019, so drop the old USB
keyboard code, to avoid needing to deal with the extra code path.

Drop the unnecessary #ifdef around USB_KBD_BOOT_REPORT_SIZE while we
are here.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 months agobootstd: Create a function to reset USB
Simon Glass [Sun, 1 Sep 2024 22:26:16 +0000 (16:26 -0600)]
bootstd: Create a function to reset USB

Set up a function for this, since it needs to be used from multiple test
files.

This test file is only used on sandbox, where USB is enabled, so drop
the local declaration of usb_started

Signed-off-by: Simon Glass <sjg@chromium.org>
3 months agoscripts: Update pylint.base
Simon Glass [Sun, 1 Sep 2024 22:26:15 +0000 (16:26 -0600)]
scripts: Update pylint.base

There have been quite a few changes in the Python scripts, so update the
pylint baseline.

This was created using:

   make pylint
   cp pylint.cur scripts/pylint.base

Signed-off-by: Simon Glass <sjg@chromium.org>
3 months agotest/py: Fix some pylint warnings in test_ut.py
Simon Glass [Sun, 1 Sep 2024 22:26:14 +0000 (16:26 -0600)]
test/py: Fix some pylint warnings in test_ut.py

Tidy up most of these warnings. Remaining are four of these:

   R0914: Too many local variables

which can only by fixed by splitting things into functions, so that is
left for another time.

Part of this change was done by the flynt tool.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 months agonvmxip: Avoid probing on boot
Simon Glass [Sun, 1 Sep 2024 22:26:13 +0000 (16:26 -0600)]
nvmxip: Avoid probing on boot

Devices should be probed when they are used, not before. Drop this
boot-time probing.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 months agonvmxip: Drop the message on probe
Simon Glass [Sun, 1 Sep 2024 22:26:12 +0000 (16:26 -0600)]
nvmxip: Drop the message on probe

We should not need to announce this device. Drop the message.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 months agotest: Tidy up checking for console end
Simon Glass [Thu, 22 Aug 2024 13:58:03 +0000 (07:58 -0600)]
test: Tidy up checking for console end

Use the ut_assert_console_end() function provided, rather than doing it
separately.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 months agotest: Use UTF_CONSOLE in remaining tests
Simon Glass [Thu, 22 Aug 2024 13:58:02 +0000 (07:58 -0600)]
test: Use UTF_CONSOLE in remaining tests

Set this flag rather than doing things manually in the test.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 months agotest: log: Use UTF_CONSOLE in tests
Simon Glass [Thu, 22 Aug 2024 13:58:01 +0000 (07:58 -0600)]
test: log: Use UTF_CONSOLE in tests

Set this flag rather than doing things manually in the test.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 months agotest: hush: Use UTF_CONSOLE in tests
Simon Glass [Thu, 22 Aug 2024 13:58:00 +0000 (07:58 -0600)]
test: hush: Use UTF_CONSOLE in tests

Set this flag rather than doing things manually in the test.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
3 months agotest: dm: Use UTF_CONSOLE in tests
Simon Glass [Thu, 22 Aug 2024 13:57:59 +0000 (07:57 -0600)]
test: dm: Use UTF_CONSOLE in tests

Set this flag rather than doing things manually in the test.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 months agotest: cmd: Drop unnecessary console_record_reset_enable()
Simon Glass [Thu, 22 Aug 2024 13:57:58 +0000 (07:57 -0600)]
test: cmd: Drop unnecessary console_record_reset_enable()

It is seldom necessary to call this function. Drop its use in the
command tests.

Add a few extra checks to the wget test so that resetting is not
needed.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 months agotest: cmd: Use UTF_CONSOLE in tests
Simon Glass [Thu, 22 Aug 2024 13:57:57 +0000 (07:57 -0600)]
test: cmd: Use UTF_CONSOLE in tests

Set this flag rather than doing things manually in the test.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 months agotest: fdt: Move common code into the setup functions
Simon Glass [Thu, 22 Aug 2024 13:57:56 +0000 (07:57 -0600)]
test: fdt: Move common code into the setup functions

Quite a lot of tests have the same two lines of code at the start. Move
this into the two setup functions to reduce redundancy.

Add a line to check the output from set_working_fdt_addr() since this is
always emitted.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 months agotest: fdt: Check internal-function return values
Simon Glass [Thu, 22 Aug 2024 13:57:55 +0000 (07:57 -0600)]
test: fdt: Check internal-function return values

Some functions are using asserts but the result of the functions
themselves is not checked. This means that if a test fails, the result
is not noticed until later, which can be confusing to debug.

Add the missing asserts.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 months agotest: boot: Use UTF_CONSOLE in tests
Simon Glass [Thu, 22 Aug 2024 13:57:54 +0000 (07:57 -0600)]
test: boot: Use UTF_CONSOLE in tests

Set this flag rather than doing things manually in the test.

Drop unnecessary calls to console_record_reset_enable()

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
3 months agotest: bloblist: Use UTF_CONSOLE in tests
Simon Glass [Thu, 22 Aug 2024 13:57:53 +0000 (07:57 -0600)]
test: bloblist: Use UTF_CONSOLE in tests

Set this flag rather than doing things manually in the test.

Drop the code which is now unnecessary.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 months agotest: Update NAND test to avoid extra macros
Simon Glass [Thu, 22 Aug 2024 13:57:52 +0000 (07:57 -0600)]
test: Update NAND test to avoid extra macros

Write out the tests in full to allow the test to be found more easily
when there is a failure. We could use a single test function with a
for() loop but this would stop at the first failure, and some variations
might while other pass.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 months agommc: Drop the blank line before accesses
Simon Glass [Thu, 22 Aug 2024 13:57:51 +0000 (07:57 -0600)]
mmc: Drop the blank line before accesses

Several mmc subcommand print a blank line before starting and after
finishing. It isn't necessary to do both, so drop the first one.

It is questionable whether these command should produce any output at
all, but leave it for now.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 months agotest: Rename UTF_CONSOLE_REC to UTF_CONSOLE
Simon Glass [Thu, 22 Aug 2024 13:57:50 +0000 (07:57 -0600)]
test: Rename UTF_CONSOLE_REC to UTF_CONSOLE

The _REC suffix doesn't add much. Really what we want to know is whether
the test uses the console, so rename this flag.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
3 months agotest: Drop the blank line before test macros
Simon Glass [Thu, 22 Aug 2024 13:57:49 +0000 (07:57 -0600)]
test: Drop the blank line before test macros

Most tests don't have this. It helps to keep the test declaration
clearly associated with the function it relates to, rather than the next
one in the file. Remove the extra blank line and mention this in the
docs.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 months agotest: Rename unit-test flags
Simon Glass [Thu, 22 Aug 2024 13:57:48 +0000 (07:57 -0600)]
test: Rename unit-test flags

The UT_TESTF_ macros read as 'unit test test flags' which is not right.
Rename to UTF ('unit test flags').

This has the benefit of being shorter, which helps keep UNIT_TEST()
declarations on a single line.

Give the enum a name and reference it from the UNIT_TEST() macros while
we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 months agotest: Fail when an empty line is expected but not present
Simon Glass [Thu, 22 Aug 2024 13:57:47 +0000 (07:57 -0600)]
test: Fail when an empty line is expected but not present

The existing implementation of ut_assert_nextline_empty() cannot
distinguish between an empty line and no line at all. It can in fact be
called at the end of the recorded output and will happily return
success.

Adjust the logic so that this condition is detected. Show a failure
message in this case.

Fix the one test which falls foul of this fix.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: 400175b0a7d ("test: Add a way to check each line of console...")
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
3 months agobuildman: Make test_process_limit handle time.monotonic()
Simon Glass [Thu, 22 Aug 2024 13:57:46 +0000 (07:57 -0600)]
buildman: Make test_process_limit handle time.monotonic()

Newer versions of filelock use time.monotonic() instead of time.time().
Update the test the handle this.

It would be better if filelock had support for writing unit tests which
use locking.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 months agoMerge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-samsung...
Tom Rini [Thu, 22 Aug 2024 14:15:04 +0000 (08:15 -0600)]
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-samsung into next

4 months agoMerge tag 'u-boot-dfu-next-20240820' of https://source.denx.de/u-boot/custodians...
Tom Rini [Tue, 20 Aug 2024 14:08:52 +0000 (08:08 -0600)]
Merge tag 'u-boot-dfu-next-20240820' of https://source.denx.de/u-boot/custodians/u-boot-dfu into next

u-boot-dfu-next-20240820

- Migrate Atmel usb gadget to DM_USB_GADGET
- More small cleanups/improvements on the atmel UDC driver
- Change udc uclass name from "usb" -> "usb_gadget"

4 months agousb: gadget: udc: Fix duplicate uclass name
Zixun LI [Fri, 2 Aug 2024 09:28:11 +0000 (11:28 +0200)]
usb: gadget: udc: Fix duplicate uclass name

Currently both USB host uclass and USB gadget uclass are using the same
name "usb" which break uclass functions like uclass_get_by_name().

Rename the uclass to "usb_gadget" to fix, also makes bind/unbind by class
index (or sequence) working.

This breaks the capacity of using "usb" as DT alias sequence numbering
which needs a fix afterwards.

Signed-off-by: Zixun LI <admin@hifiphile.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/all/20240802092820.917450-1-admin@hifiphile.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
4 months agoMerge tag 'v2024.10-rc3' into next
Tom Rini [Tue, 20 Aug 2024 00:24:58 +0000 (18:24 -0600)]
Merge tag 'v2024.10-rc3' into next

Prepare v2024.10-rc3

4 months agoPrepare v2024.10-rc3
Tom Rini [Mon, 19 Aug 2024 23:15:10 +0000 (17:15 -0600)]
Prepare v2024.10-rc3

Signed-off-by: Tom Rini <trini@konsulko.com>
4 months agoMerge patch series "clk: mediatek: mt7622: clk migration for OF_UPSTREAM"
Tom Rini [Mon, 19 Aug 2024 22:15:47 +0000 (16:15 -0600)]
Merge patch series "clk: mediatek: mt7622: clk migration for OF_UPSTREAM"

Christian Marangi <ansuelsmth@gmail.com> says:

These are all the required patches to migrate clk and correctly support
OF_UPSTREAM. This will align the clk index to upstream to support the same
clk implementation with downstream and upstream DTS.

4 months agoclk: mediatek: mt7622: add missing A1/2SYS clock ID
Christian Marangi [Sat, 3 Aug 2024 08:43:26 +0000 (10:43 +0200)]
clk: mediatek: mt7622: add missing A1/2SYS clock ID

Add missing A1/2SYS clock ID just as a reference for OF_UPSTREAM
support. These clocks are not defined and are not usable as current
clock topckgen OPs doesn't support gates.

These special node won't ever be used by uboot hence just add them for
reference.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>
4 months agoclk: mediatek: mt7622: add missing clock PERIBUS_SEL clock
Christian Marangi [Sat, 3 Aug 2024 08:43:25 +0000 (10:43 +0200)]
clk: mediatek: mt7622: add missing clock PERIBUS_SEL clock

Add missing PERIBUS_SEL clock to match upstream linux clk ID order. Also
convert pericfg to mux + gate implementation as now we have also mux on
top of gates.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7622: add missing clock PERI_UART4_PD
Christian Marangi [Sat, 3 Aug 2024 08:43:24 +0000 (10:43 +0200)]
clk: mediatek: mt7622: add missing clock PERI_UART4_PD

Add missing clock PERI_UART4_PD for peri clock gates. This is needed to
match upstream linux clk ID in preparation for OF_UPSTREAM.
Also convert infracfg to mux + gate implementation as now we have mux on
top of gates.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7622: add missing clock MUX1_SEL
Christian Marangi [Sat, 3 Aug 2024 08:43:23 +0000 (10:43 +0200)]
clk: mediatek: mt7622: add missing clock MUX1_SEL

Add missing infra clock MUX1_SEL needed for CPU clock. This is needed to
match the upstream clk ID order in preparation for OF_UPSTREAM.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7622: add missing clock define for MAIN_CORE_EN
Christian Marangi [Sat, 3 Aug 2024 08:43:22 +0000 (10:43 +0200)]
clk: mediatek: mt7622: add missing clock define for MAIN_CORE_EN

Add missing clock for MAIN_CORE_EN. This is a special clock as it's a
gate for the APMIXED clocks required as a parent for CPU clocks.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7622: move INFRA_TRNG to the bottom
Christian Marangi [Sat, 3 Aug 2024 08:43:21 +0000 (10:43 +0200)]
clk: mediatek: mt7622: move INFRA_TRNG to the bottom

Move INFRA_TRNG clock to the bottom of the clk ID to match upstream
linux order. This is in preparation of OF_UPSTREAM.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7622: rename AUDIO_AWB3 to AUDIO_AWB2
Christian Marangi [Sat, 3 Aug 2024 08:43:20 +0000 (10:43 +0200)]
clk: mediatek: mt7622: rename AUDIO_AWB3 to AUDIO_AWB2

Rename AUDIO_AWB3 to AUDIO_AWB2 to match upstream linux naming in
preparation for OF_UPSTREAM support.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7622: fix broken peri_cgs clk with XTAL parents
Christian Marangi [Sat, 3 Aug 2024 08:43:19 +0000 (10:43 +0200)]
clk: mediatek: mt7622: fix broken peri_cgs clk with XTAL parents

Fix broken peri_cgs clock with XTAL parents as they have wrong
definition of the parent type.

Correctly fix them and use CLK_PARENT_XTAL for them.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoMerge patch series "clk: mediatek: mt7986: clk migration for OF_UPSTREAM"
Tom Rini [Mon, 19 Aug 2024 22:15:13 +0000 (16:15 -0600)]
Merge patch series "clk: mediatek: mt7986: clk migration for OF_UPSTREAM"

Christian Marangi <ansuelsmth@gmail.com> says:

These are all the required patches to migrate clk and correctly support
OF_UPSTREAM. This will align the clk index to upstream to support the same
clk implementation with downstream and upstream DTS.

4 months agoclk: mediatek: mt7986: rename CK to CLK
Christian Marangi [Sat, 3 Aug 2024 08:40:48 +0000 (10:40 +0200)]
clk: mediatek: mt7986: rename CK to CLK

Rename each entry from CK to CLK to match the include in upstream kernel
linux.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>
4 months agoclk: mediatek: mt7986: convert to unified infracfg gates + muxes
Christian Marangi [Sat, 3 Aug 2024 08:40:47 +0000 (10:40 +0200)]
clk: mediatek: mt7986: convert to unified infracfg gates + muxes

Convert to infracfg gates + muxes implementation now that it's
supported.

Drop infracfg-ao nodes and rename all infracfg-ao clocks to infracfg.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7986: replace infracfg ID with upstream linux
Christian Marangi [Sat, 3 Aug 2024 08:40:46 +0000 (10:40 +0200)]
clk: mediatek: mt7986: replace infracfg ID with upstream linux

Replace infracfg clk ID with upstream linux version.

The same format is used here with the factor first, then mux and then
gates.

To correctly reference the gates in clk_gate function, define the
gates_offs value in clk_tree now that they are at an offset from mux and
factor.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7986: move INFRA_TRNG_CK to the bottom of the list
Christian Marangi [Sat, 3 Aug 2024 08:40:45 +0000 (10:40 +0200)]
clk: mediatek: mt7986: move INFRA_TRNG_CK to the bottom of the list

Move INFRA_TRNG_CK to the bottom of the list to have a 1:1 match with
upstream linux clock ID.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7986: comment out CK_TOP_A_TUNER as not used
Christian Marangi [Sat, 3 Aug 2024 08:40:44 +0000 (10:40 +0200)]
clk: mediatek: mt7986: comment out CK_TOP_A_TUNER as not used

Comment out CK_TOP_A_TUNER as not used and not defined in upstream
kernel linux. This is to permit support of OF_UPSTREAM and have a 1:1
match with upstream linux clock ID.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7986: drop 1/1 spurious factor for topckgen
Christian Marangi [Sat, 3 Aug 2024 08:40:43 +0000 (10:40 +0200)]
clk: mediatek: mt7986: drop 1/1 spurious factor for topckgen

Now that we can have advanced parent handling for mux, we can drop
spurious topckgen 1/1 factor. This is in preparation to make the clk
ID match the ID in upstream include for mt7986.

Drop the factor entry from mt7986-clk.h and reference to them in
mt7981.dtsi. Muxes and gates are updated to reference the apmixed clk
following how it's done in upstream kernel linux. Add relevant clk type
flag in clk_tree for apmixed.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7986: reorder TOPCKGEN factor ID
Christian Marangi [Sat, 3 Aug 2024 08:40:42 +0000 (10:40 +0200)]
clk: mediatek: mt7986: reorder TOPCKGEN factor ID

Reorder TOPCKGEN factor ID to put TOP_FACTOR first and then PLL. This is
to match how it's done in upstream kernel linux and in preparation for
OF_UPSTREAM support.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7986: rename TOPCKGEN factor clock to upstream naming
Christian Marangi [Sat, 3 Aug 2024 08:40:41 +0000 (10:40 +0200)]
clk: mediatek: mt7986: rename TOPCKGEN factor clock to upstream naming

Rename TOPCKGEN factor clock to upstream neaming.
Upstream kernel linux reference the factor clock for apmixedpll with the
"pll" suffix. Align the naming to the upstream naming format in
preparation for OF_UPSTREAM support.

Also rename rtc clock to drop the CB_ as upstream doesn't have that.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7986: fix typo for infra_i2c0_ck
Christian Marangi [Sat, 3 Aug 2024 08:40:40 +0000 (10:40 +0200)]
clk: mediatek: mt7986: fix typo for infra_i2c0_ck

Fix a typo for infra_i2c0_ck where 0 was misspelled as O.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7986: add missing entry for IPCIE_PIPE_CK infra gate
Christian Marangi [Sat, 3 Aug 2024 08:40:39 +0000 (10:40 +0200)]
clk: mediatek: mt7986: add missing entry for IPCIE_PIPE_CK infra gate

Add missing entry for IPCIE_PIPE_CK infra gate clock. Renumber the clock
order to match the expected offset in the gate array.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7986: drop 1/1 infracfg spurious factor
Christian Marangi [Sat, 3 Aug 2024 08:40:38 +0000 (10:40 +0200)]
clk: mediatek: mt7986: drop 1/1 infracfg spurious factor

Now that we can have advanced parent handling for mux, we can drop
spurious infracfg 1/1 factor. This is in preparation to make the clk
ID match the ID in upstream include for mt7986.

Drop the factor entry from mt7986-clk.h and reference to them in
mt7981.dtsi. Muxes and gates are updated to reference the topckgen clk
following how it's done in upstream kernel linux. Add relevant clk type
flag in clk_tree for infracfg and topckgen.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7986: fix wrong parent for INFRA_ADC_26M_CK
Christian Marangi [Sat, 3 Aug 2024 08:40:37 +0000 (10:40 +0200)]
clk: mediatek: mt7986: fix wrong parent for INFRA_ADC_26M_CK

Fix wrong parent for INFRA_ADC_26M_CK as should be INFRA_ADC_FRC_CK
instead of INFRA_CK_F26M. This is to match implementation on upstream
kernel linux.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7986: rename 66M_MCK to SYSAXI_D2
Christian Marangi [Sat, 3 Aug 2024 08:40:36 +0000 (10:40 +0200)]
clk: mediatek: mt7986: rename 66M_MCK to SYSAXI_D2

Upstream kernel linux clock include use SYSAXI_D2 instead of 66M_MCK.
Rename this clock to the upstream kernel in preparation for support of
OF_UPSTREAM.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7986: rename CB_CKSQ_40M to TOP_XTAL
Christian Marangi [Sat, 3 Aug 2024 08:40:35 +0000 (10:40 +0200)]
clk: mediatek: mt7986: rename CB_CKSQ_40M to TOP_XTAL

Upstream kernel linux clock include use TOP_XTAL instead of CB_CKSQ_40M.
Rename this clock to the upstream kernel in preparation for support of
OF_UPSTREAM.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7986: fix wrong shift for PCIe clocks
Christian Marangi [Sat, 3 Aug 2024 08:40:34 +0000 (10:40 +0200)]
clk: mediatek: mt7986: fix wrong shift for PCIe clocks

Fix wrong shift for PCIe clocks. This cause the PCIe port to malfunction
as the gate clocks weren't correctly enabled.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoMerge patch series "clk: mediatek: mt7988: clk migration for OF_UPSTREAM"
Tom Rini [Mon, 19 Aug 2024 22:14:29 +0000 (16:14 -0600)]
Merge patch series "clk: mediatek: mt7988: clk migration for OF_UPSTREAM"

Christian Marangi <ansuelsmth@gmail.com> says:

These are all the required patches to migrate clk and correctly support
OF_UPSTREAM. This will align the clk index to upstream to support the same
clk implementation with downstream and upstream DTS.

4 months agoclk: mediatek: mt7988: rename CK to CLK
Christian Marangi [Sat, 3 Aug 2024 08:33:02 +0000 (10:33 +0200)]
clk: mediatek: mt7988: rename CK to CLK

Rename each entry from CK to CLK to match the include in upstream kernel
linux.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>
4 months agoclk: mediatek: mt7988: convert to unified infracfg gates + muxes
Christian Marangi [Sat, 3 Aug 2024 08:33:01 +0000 (10:33 +0200)]
clk: mediatek: mt7988: convert to unified infracfg gates + muxes

Convert to infracfg gates + muxes implementation now that it's
supported.

Drop infracfg-ao nodes and rename all infracfg-ao clocks to infracfg.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7988: replace clock ID with upstream linux
Christian Marangi [Sat, 3 Aug 2024 08:33:00 +0000 (10:33 +0200)]
clk: mediatek: mt7988: replace clock ID with upstream linux

Replace infracfg clk ID with upstream linux version.

The same format is used here with the factor first, then mux and then
gates.

To correctly reference the gates in clk_gate function, define the
gates_offs value in clk_tree now that they are at an offset from mux and
factor.

Drop any comment that reference the clock ID as we now have a 1:1 match
with upstream kernel linux.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7988: comment out infracfg clk not defined
Christian Marangi [Sat, 3 Aug 2024 08:32:59 +0000 (10:32 +0200)]
clk: mediatek: mt7988: comment out infracfg clk not defined

Comment out infracfg clk not defined in upstream kernel linux clock ID
include. These clock are not used and can be safely commented. Keep them
just to have a reference of their existence.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7988: drop 1/1 spurious factor for topckgen
Christian Marangi [Sat, 3 Aug 2024 08:32:58 +0000 (10:32 +0200)]
clk: mediatek: mt7988: drop 1/1 spurious factor for topckgen

Now that we can have advanced parent handling for mux, we can drop
spurious topckgen 1/1 factor. This is in preparation to make the clk
ID match the ID in upstream include for mt7988.

Drop the factor entry from mt7988-clk.h and reference to them in
mt7988.dtsi. Muxes and gates are updated to reference the apmixed clk
following how it's done in upstream kernel linux. Add relevant clk type
flag in clk_tree for apmixed and topckgen.

Also move TOP_XTAL to the fixed clock table following how it's done in
upstream linux kernel.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7988: reorder TOPCKGEN factor ID
Christian Marangi [Sat, 3 Aug 2024 08:32:57 +0000 (10:32 +0200)]
clk: mediatek: mt7988: reorder TOPCKGEN factor ID

Reorder TOPCKGEN factor ID to put TOP_FACTOR first and then PLL. This is
to match how it's done in upstream kernel linux and in preparation for
OF_UPSTREAM support.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7988: rename TOPCKGEN factor clock to upstream naming
Christian Marangi [Sat, 3 Aug 2024 08:32:56 +0000 (10:32 +0200)]
clk: mediatek: mt7988: rename TOPCKGEN factor clock to upstream naming

Rename TOPCKGEN factor clock to upstream neaming.
Upstream kernel linux reference the factor clock for apmixedpll with the
"pll" suffix. Align the naming to the upstream naming format in
preparation for OF_UPSTREAM support.

Also rename rtc clock to drop the CB_ as upstream doesn't have that.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7988: drop 1/1 infracfg spurious factor
Christian Marangi [Sat, 3 Aug 2024 08:32:55 +0000 (10:32 +0200)]
clk: mediatek: mt7988: drop 1/1 infracfg spurious factor

Now that we can have advanced parent handling for mux, we can drop
spurious infracfg 1/1 factor. This is in preparation to make the clk
ID match the ID in upstream include for mt7988.

Drop the factor entry from mt7988-clk.h and reference to them in
mt7988.dtsi. Muxes and gates are updated to reference the topckgen clk
following how it's done in upstream kernel linux.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7988: fix wrong parent for INFRA_PCIE_PERI_26M_CK_P2
Christian Marangi [Sat, 3 Aug 2024 08:32:54 +0000 (10:32 +0200)]
clk: mediatek: mt7988: fix wrong parent for INFRA_PCIE_PERI_26M_CK_P2

Fix wrong parent for INFRA_PCIE_PERI_26M_CK_P2 as should be
INFRA_PCIE_PERI_26M_CK_P3 instead of INFRA_F26M_O0. This is to match
implementation on upstream kernel linux.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7988: move INFRA_PCIE_PERI_26M_CK_Px clock at top
Christian Marangi [Sat, 3 Aug 2024 08:32:53 +0000 (10:32 +0200)]
clk: mediatek: mt7988: move INFRA_PCIE_PERI_26M_CK_Px clock at top

Move INFRA_PCIE_PERI_26M_CK_Px clock at top of the infracfg gates
in preparation for support of OF_UPSTREAM to have a 1:1 match with
upstream clock ID.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7988: rename TOP_CK_NPU_SEL_CM_TOPS_SEL to TOP_NPU_SEL
Christian Marangi [Sat, 3 Aug 2024 08:32:52 +0000 (10:32 +0200)]
clk: mediatek: mt7988: rename TOP_CK_NPU_SEL_CM_TOPS_SEL to TOP_NPU_SEL

Upstream kernel linux clock include use TOP_NPU_SEL instead of
TOP_CK_NPU_SEL_CM_TOPS_SEL.
Rename this clock to the upstream kernel in preparation for support of
OF_UPSTREAM.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7988: rename TOP_DA_SELM_XTAL_SEL to TOP_DA_SEL
Christian Marangi [Sat, 3 Aug 2024 08:32:51 +0000 (10:32 +0200)]
clk: mediatek: mt7988: rename TOP_DA_SELM_XTAL_SEL to TOP_DA_SEL

Upstream kernel linux clock include use TOP_DA_SEL instead of
TOP_DA_SELM_XTAL_SEL.
Rename this clock to the upstream kernel in preparation for support of
OF_UPSTREAM.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7988: rename CB_CKSQ_40M to TOP_XTAL
Christian Marangi [Sat, 3 Aug 2024 08:32:50 +0000 (10:32 +0200)]
clk: mediatek: mt7988: rename CB_CKSQ_40M to TOP_XTAL

Upstream kernel linux clock include use TOP_XTAL instead of CB_CKSQ_40M.
Rename this clock to the upstream kernel in preparation for support of
OF_UPSTREAM.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoMerge patch series "clk: mediatek: mt7981: clk migration for OF_UPSTREAM"
Tom Rini [Mon, 19 Aug 2024 22:13:51 +0000 (16:13 -0600)]
Merge patch series "clk: mediatek: mt7981: clk migration for OF_UPSTREAM"

Christian Marangi <ansuelsmth@gmail.com> says:

These are all the required patches to migrate clk and correctly support
OF_UPSTREAM. This will align the clk index to upstream to support the same
clk implementation with downstream and upstream DTS.

4 months agoclk: mediatek: mt7981: rename CK to CLK
Christian Marangi [Fri, 2 Aug 2024 13:53:15 +0000 (15:53 +0200)]
clk: mediatek: mt7981: rename CK to CLK

Rename each entry from CK to CLK to match the include in upstream kernel
linux.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7981: convert to unified infracfg gates + muxes
Christian Marangi [Fri, 2 Aug 2024 13:53:14 +0000 (15:53 +0200)]
clk: mediatek: mt7981: convert to unified infracfg gates + muxes

Convert to infracfg gates + muxes implementation now that it's
supported.

Drop infracfg-ao nodes and rename all infracfg-ao clocks to infracfg.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7981: fix support for pwm3 clock
Christian Marangi [Fri, 2 Aug 2024 13:53:13 +0000 (15:53 +0200)]
clk: mediatek: mt7981: fix support for pwm3 clock

Add and fix support for pwm3 clock. In the pwm DTSI node we were
actually using PWM2 clock for PWM3. Now that we have correct ID also add
the missing entry of gate and mux to support PWM3 clock.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7981: replace infracfg ID with upstream linux
Christian Marangi [Fri, 2 Aug 2024 13:53:12 +0000 (15:53 +0200)]
clk: mediatek: mt7981: replace infracfg ID with upstream linux

Replace infracfg clk ID with upstream linux version.

Add some missing clk for PWM3 and for PCIe. The same format is used here
with the factor first, then mux and then gates.

To correctly reference the gates in clk_gate function, define the
gates_offs value in clk_tree now that they are at an offset from mux and
factor.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7981: drop 1/1 spurious factor
Christian Marangi [Fri, 2 Aug 2024 13:53:11 +0000 (15:53 +0200)]
clk: mediatek: mt7981: drop 1/1 spurious factor

Now that we can have advanced parent handling for mux, we can drop
spurious infracfg 1/1 factor. This is in preparation to make the clk
ID match the ID in upstream include for mt7981.

Drop the factor entry from mt7981-clk.h and reference to them in
mt7981.dtsi. Muxes and gates are updated to reference the topckgen clk
following how it's done in upstream kernel linux. Add relevant clk type
flag in clk_tree for infracfg and topckgen.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7981: implement sgmii0/1 clock
Christian Marangi [Fri, 2 Aug 2024 13:53:10 +0000 (15:53 +0200)]
clk: mediatek: mt7981: implement sgmii0/1 clock

Implement missing sgmii0/1 clock and update the compatible the DTS to
match upstream kernel linux and in preparation for OF_UPSTREAM support
since the ethernet node define these additional clocks.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7981: fix wrong parent list for INFRA_PWM1_SEL mux
Christian Marangi [Fri, 2 Aug 2024 13:53:09 +0000 (15:53 +0200)]
clk: mediatek: mt7981: fix wrong parent list for INFRA_PWM1_SEL mux

Fix wrong parent list for INFRA_PWM1_SEL mux. The list is incorrect and
the parents are just 2. This also match the upstream linux
implementation.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7981: fix wrong parent for TOP_FAUD clock
Christian Marangi [Fri, 2 Aug 2024 13:53:08 +0000 (15:53 +0200)]
clk: mediatek: mt7981: fix wrong parent for TOP_FAUD clock

Fix wrong parent for TOP_FAUD clock. Upstream linux sets the parent for
TOP_FAUD to TOP_AUD_SEL instead of CB_CKSQ_40M.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7981: swap wrong clock-names for spi nodes
Christian Marangi [Fri, 2 Aug 2024 13:53:07 +0000 (15:53 +0200)]
clk: mediatek: mt7981: swap wrong clock-names for spi nodes

Swap wrong clock-names for spi nodes as they were wrong and the spi-clk
was referencing the sel-clk and the sel-clk was referencing the spi-clk.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7981: add missing clock for spi1 node
Christian Marangi [Fri, 2 Aug 2024 13:53:06 +0000 (15:53 +0200)]
clk: mediatek: mt7981: add missing clock for spi1 node

Add missing clock for spi1 node. Clocks taken from upstream clock
definition and clock mux.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7981: fix wrong clock definition for spi2
Christian Marangi [Fri, 2 Aug 2024 13:53:05 +0000 (15:53 +0200)]
clk: mediatek: mt7981: fix wrong clock definition for spi2

Fix wrong clock definition for spi2 node as they reference spi0 clock
instead of spi2.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7981: fix wrong mux width for pwm2 and pwm1 clock
Christian Marangi [Fri, 2 Aug 2024 13:53:04 +0000 (15:53 +0200)]
clk: mediatek: mt7981: fix wrong mux width for pwm2 and pwm1 clock

Fix wrong mux width for pwm2 and pwm1. Upstream have width 1 but U-Boot
have width set to 2. Change the value to follow upstream implementation.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7981: fix typo for infra_i2c0_ck
Christian Marangi [Fri, 2 Aug 2024 13:53:03 +0000 (15:53 +0200)]
clk: mediatek: mt7981: fix typo for infra_i2c0_ck

Fix a typo for infra_i2c0_ck where 0 was misspelled as O.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7981: add missing clock for infra_ipcie_pipe
Christian Marangi [Fri, 2 Aug 2024 13:53:02 +0000 (15:53 +0200)]
clk: mediatek: mt7981: add missing clock for infra_ipcie_pipe

Add missing clock for infra_ipcie_pipe to make PCIe correctly work. This
clock is a parent of the fixed clock from topckgen cb_cksq_40m.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoMerge patch series "clk: mediatek: mt7623: clk migration for OF_UPSTREAM"
Tom Rini [Mon, 19 Aug 2024 22:13:01 +0000 (16:13 -0600)]
Merge patch series "clk: mediatek: mt7623: clk migration for OF_UPSTREAM"

Christian Marangi <ansuelsmth@gmail.com> says:

These are all the required patches to migrate clk and correctly support
OF_UPSTREAM. This will align the clk index to upstream to support the same
clk implementation with downstream and upstream DTS.

4 months agoclk: mediatek: mt7623: remap peri clock ID and add MUX
Christian Marangi [Fri, 2 Aug 2024 13:45:05 +0000 (15:45 +0200)]
clk: mediatek: mt7623: remap peri clock ID and add MUX

Upstream kernel linux makes use of peri clock MUX to setup UART.

Add definition for these and add remap table as in the upstream clock ID
order gates are before MUX but we require MUX first and then clocks in
our downstream driver.

Convert the peri clk tree to MUX + GATE implementation.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>
4 months agoclk: mediatek: mt7623: remap apmixedsys clock ID
Christian Marangi [Fri, 2 Aug 2024 13:45:04 +0000 (15:45 +0200)]
clk: mediatek: mt7623: remap apmixedsys clock ID

Define remap table also for apmixedsys clock ID. The clock ID starts
from 1 instead of 0 in upstream kernel linux.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7623: define id_offs_map and import clk ID from upstream
Christian Marangi [Fri, 2 Aug 2024 13:45:03 +0000 (15:45 +0200)]
clk: mediatek: mt7623: define id_offs_map and import clk ID from upstream

Define id_offs_map and use clk ID form upstream linux kernel to have a
1:1 match for the TOPCKGEN clock and permit usage of OF_UPSTREAM with
upstream dtsi.

For all the gate clock, the clk ID starts from 1 instead of zero. Define
an additional clock tree for them and set the .gates_offs to 1 to
account for this.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7623: split clk tree to dedicated topckgen and apmixed
Christian Marangi [Fri, 2 Aug 2024 13:45:02 +0000 (15:45 +0200)]
clk: mediatek: mt7623: split clk tree to dedicated topckgen and apmixed

Split clk tree to dedicated topckgen and apmixed in preparation for
remap table.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7623: fix broken peri_cgs clk with XTAL parents
Christian Marangi [Fri, 2 Aug 2024 13:45:01 +0000 (15:45 +0200)]
clk: mediatek: mt7623: fix broken peri_cgs clk with XTAL parents

Fix broken peri_cgs and infra_cgs clock with XTAL parents as they have
wrong definition of the parent type.

Correctly fix them and use CLK_PARENT_XTAL for them.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agodoc: samsung: Mention enabled eMMC in E850-96 board doc
Sam Protsenko [Thu, 8 Aug 2024 03:14:44 +0000 (22:14 -0500)]
doc: samsung: Mention enabled eMMC in E850-96 board doc

eMMC is enabled on E850-96 board now. Mention that in the board
documentation.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
4 months agoconfigs: e850-96: Enable MMC
Sam Protsenko [Thu, 8 Aug 2024 03:14:43 +0000 (22:14 -0500)]
configs: e850-96: Enable MMC

Enable MMC subsystem and DW MMC driver support to make eMMC functional.
Also enable a couple of related commands so the user can make use of
eMMC from U-Boot shell.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
4 months agoarm: dts: exynos: Remove outdated DW MMC properties in all Exynos dts
Sam Protsenko [Thu, 8 Aug 2024 03:14:42 +0000 (22:14 -0500)]
arm: dts: exynos: Remove outdated DW MMC properties in all Exynos dts

Upstream properties were added to device trees to follow current Linux
kernel. DW MMC driver was updated accordingly. Safely remove outdated
MMC properties. Details on removed properties are as follows:

* samsung,removable: replaced by non-removable
* samsung,bus-width: replaced by bus-width
* samsung,timing:
  - replaced by samsung,dw-mshc-ciu-div and samsung,dw-mshc-sdr-timing
    in dw_mmc nodes
  - removed from sdhci nodes (it's neither described in bindings, nor
    it's used in s5p_sdhci.c driver)
* fifoth_val: replaced by fifo-depth
* bus_hz: replaced by clock-frequency
* div: the fixed CIU clock divider value was moved to the chip data in
  exynos_dw_mmc.c driver

No functional change.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
4 months agommc: exynos_dw_mmc: Improve coding style
Sam Protsenko [Thu, 8 Aug 2024 03:14:41 +0000 (22:14 -0500)]
mmc: exynos_dw_mmc: Improve coding style

Fix most of checkpatch warnings and other obvious style issues.

No functional change.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
4 months agommc: exynos_dw_mmc: Use dev->name as driver's displayed name
Sam Protsenko [Thu, 8 Aug 2024 03:14:40 +0000 (22:14 -0500)]
mmc: exynos_dw_mmc: Use dev->name as driver's displayed name

Reduce U-Boot footprint by reusing dev->name as a driver's displayed
name. This changes boot device name (and "mmc info" output) from "EXYNOS
DWMMC" to something like "mmc@12100000".

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
4 months agommc: exynos_dw_mmc: Don't call dwmci_setup_cfg() after add_dwmci()
Sam Protsenko [Thu, 8 Aug 2024 03:14:39 +0000 (22:14 -0500)]
mmc: exynos_dw_mmc: Don't call dwmci_setup_cfg() after add_dwmci()

add_dwmci() is already calling dwmci_setup_cfg() internally, there is no
needed to call dwmci_setup_cfg() again in case when add_dwmci() is used
(for non-DM cases). Fix it by calling dwmci_setup_cfg() only in DM
cases, when add_dwmci() wasn't called. Also, this assignment:

    host->mmc = &plat->mmc;

is wrong in non-DM case when add_dwmci() was called, as it's creating
mmc object internally. Fix that by pulling that assignment into DM case,
when add_dwmci() isn't called.

While at it, add also this missing assignment:

    host->mmc->dev = dev;

Fixes: 3537ee879e04 ("mmc: exynos_dw_mmc: support the Driver mode for Exynos")
Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>