summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2020-06-30 11:14:41 -0400
committerTom Rini <[email protected]>2020-06-30 11:14:41 -0400
commit6b3c74428a3faca92701843c954b717e8d186b17 (patch)
tree4c62a2a7370ea7eb90e04dabee8e11ca7fcaa755 /include
parent50c9b0e1ddce280823484579c4ecc1f069e7833b (diff)
parent3c4aeaf7dc622a226d0d986fc5e8b989722e5bf4 (diff)
Merge branch '2020-06-30-pxa-dm_mmc-migration' into next
- Migrate the PXA MMC driver to driver model.
Diffstat (limited to 'include')
-rw-r--r--include/configs/pxa-common.h7
-rw-r--r--include/dm/platform_data/pxa_mmc_gen.h22
-rw-r--r--include/dm/platform_data/serial_pxa.h8
-rw-r--r--include/dm/read.h4
4 files changed, 30 insertions, 11 deletions
diff --git a/include/configs/pxa-common.h b/include/configs/pxa-common.h
index 2632d48cc9c..52d77e06acf 100644
--- a/include/configs/pxa-common.h
+++ b/include/configs/pxa-common.h
@@ -16,13 +16,6 @@
#endif
/*
- * MMC Card Configuration
- */
-#ifdef CONFIG_CMD_MMC
-#define CONFIG_PXA_MMC_GENERIC
-#endif
-
-/*
* OHCI USB
*/
#ifdef CONFIG_CMD_USB
diff --git a/include/dm/platform_data/pxa_mmc_gen.h b/include/dm/platform_data/pxa_mmc_gen.h
new file mode 100644
index 00000000000..9875bab2cf4
--- /dev/null
+++ b/include/dm/platform_data/pxa_mmc_gen.h
@@ -0,0 +1,22 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright (c) 2019 Marcel Ziswiler <[email protected]>
+ */
+
+#ifndef __PXA_MMC_GEN_H
+#define __PXA_MMC_GEN_H
+
+#include <mmc.h>
+
+/*
+ * struct pxa_mmc_platdata - information about a PXA MMC controller
+ *
+ * @base: MMC controller base register address
+ */
+struct pxa_mmc_plat {
+ struct mmc_config cfg;
+ struct mmc mmc;
+ struct pxa_mmc_regs *base;
+};
+
+#endif /* __PXA_MMC_GEN_H */
diff --git a/include/dm/platform_data/serial_pxa.h b/include/dm/platform_data/serial_pxa.h
index 408c00885de..b78bdb64094 100644
--- a/include/dm/platform_data/serial_pxa.h
+++ b/include/dm/platform_data/serial_pxa.h
@@ -17,7 +17,7 @@
#define FFUART_INDEX 1
#define STUART_INDEX 2
#elif CONFIG_CPU_PXA25X
-#define UART_CLK_BASE (1 << 4) /* HWUART */
+#define UART_CLK_BASE BIT(4) /* HWUART */
#define UART_CLK_REG CKEN
#define HWUART_INDEX 0
#define STUART_INDEX 1
@@ -42,9 +42,9 @@
/*
* struct pxa_serial_platdata - information about a PXA port
*
- * @base: Uart port base register address
- * @port: Uart port index, for cpu with pinmux for uart / gpio
- * baudrtatre: Uart port baudrate
+ * @base: Uart port base register address
+ * @port: Uart port index, for cpu with pinmux for uart / gpio
+ * baudrtatre: Uart port baudrate
*/
struct pxa_serial_platdata {
struct pxa_uart_regs *base;
diff --git a/include/dm/read.h b/include/dm/read.h
index 1c1bc3702fd..3711386f513 100644
--- a/include/dm/read.h
+++ b/include/dm/read.h
@@ -923,8 +923,12 @@ static inline const void *dev_read_prop_by_prop(struct ofprop *prop,
static inline int dev_read_alias_seq(const struct udevice *dev, int *devnump)
{
+#if CONFIG_IS_ENABLED(OF_CONTROL)
return fdtdec_get_alias_seq(gd->fdt_blob, dev->uclass->uc_drv->name,
dev_of_offset(dev), devnump);
+#else
+ return -ENOTSUPP;
+#endif
}
static inline int dev_read_u32_array(const struct udevice *dev,