aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2023-01-19 09:41:54 -0500
committerTom Rini <trini@konsulko.com>2023-01-19 09:41:54 -0500
commit7aec35be4b5fa7aabc0ece03dc8825495d86a1be (patch)
tree483d9f85e8184cb91f00e3345391bff13eee580a /drivers
parent5b958dea5c678dbdb2aeb6ac3c0c8cc8dfea065c (diff)
parentace75d642fa71034b248cde30709c79e06c52d61 (diff)
Merge branch '2022-01-18-assorted-updates'
- A few TI platform fixes, compression test cleanup and zstd update, npcm7xx update, add "part type" subcommand, VBE bugfix on some platforms, cleanup EVENT related Kconfig option logic (and fix some platforms), other minor cleanups.
Diffstat (limited to 'drivers')
-rw-r--r--drivers/core/Kconfig9
-rw-r--r--drivers/cpu/Kconfig1
-rw-r--r--drivers/firmware/ti_sci.c2
-rw-r--r--drivers/firmware/ti_sci.h2
-rw-r--r--drivers/usb/musb-new/omap2430.c53
5 files changed, 42 insertions, 25 deletions
diff --git a/drivers/core/Kconfig b/drivers/core/Kconfig
index 8fde77c23e..6fc8854b57 100644
--- a/drivers/core/Kconfig
+++ b/drivers/core/Kconfig
@@ -109,13 +109,14 @@ config DM_DEVICE_REMOVE
causes USB host controllers to not be stopped when booting the OS.
config DM_EVENT
- bool "Support events with driver model"
- depends on DM && EVENT
- default y if SANDBOX
+ bool
+ depends on DM
+ select EVENT
help
This enables support for generating events related to driver model
operations, such as prbing or removing a device. Subsystems can
- register a 'spy' function that is called when the event occurs.
+ register a 'spy' function that is called when the event occurs. Such
+ subsystems must select this option.
config SPL_DM_DEVICE_REMOVE
bool "Support device removal in SPL"
diff --git a/drivers/cpu/Kconfig b/drivers/cpu/Kconfig
index 21874335c8..3bf04105e5 100644
--- a/drivers/cpu/Kconfig
+++ b/drivers/cpu/Kconfig
@@ -23,7 +23,6 @@ config CPU_RISCV
config CPU_MICROBLAZE
bool "Enable Microblaze CPU driver"
depends on CPU && MICROBLAZE
- select EVENT
select DM_EVENT
select XILINX_MICROBLAZE0_PVR
help
diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c
index 727e090e8a..bd7379ae55 100644
--- a/drivers/firmware/ti_sci.c
+++ b/drivers/firmware/ti_sci.c
@@ -1935,7 +1935,7 @@ static int ti_sci_cmd_proc_auth_boot_image(const struct ti_sci_handle *handle,
info = handle_to_ti_sci_info(handle);
- xfer = ti_sci_setup_one_xfer(info, TISCI_MSG_PROC_AUTH_BOOT_IMIAGE,
+ xfer = ti_sci_setup_one_xfer(info, TISCI_MSG_PROC_AUTH_BOOT_IMAGE,
TI_SCI_FLAG_REQ_ACK_ON_PROCESSED,
(u32 *)&req, sizeof(req), sizeof(*resp));
if (IS_ERR(xfer)) {
diff --git a/drivers/firmware/ti_sci.h b/drivers/firmware/ti_sci.h
index e4a087c2ba..101210eb21 100644
--- a/drivers/firmware/ti_sci.h
+++ b/drivers/firmware/ti_sci.h
@@ -49,7 +49,7 @@
#define TISCI_MSG_PROC_HANDOVER 0xc005
#define TISCI_MSG_SET_PROC_BOOT_CONFIG 0xc100
#define TISCI_MSG_SET_PROC_BOOT_CTRL 0xc101
-#define TISCI_MSG_PROC_AUTH_BOOT_IMIAGE 0xc120
+#define TISCI_MSG_PROC_AUTH_BOOT_IMAGE 0xc120
#define TISCI_MSG_GET_PROC_BOOT_STATUS 0xc400
#define TISCI_MSG_WAIT_PROC_BOOT_STATUS 0xc401
diff --git a/drivers/usb/musb-new/omap2430.c b/drivers/usb/musb-new/omap2430.c
index 7d15b94a6c..42e7abddbc 100644
--- a/drivers/usb/musb-new/omap2430.c
+++ b/drivers/usb/musb-new/omap2430.c
@@ -46,6 +46,15 @@ static inline void omap2430_low_level_init(struct musb *musb)
musb_writel(musb->mregs, OTG_FORCESTDBY, l);
}
+#ifdef CONFIG_DM_USB_GADGET
+int dm_usb_gadget_handle_interrupts(struct udevice *dev)
+{
+ struct musb_host_data *host = dev_get_priv(dev);
+
+ host->host->isr(0, host->host);
+ return 0;
+}
+#endif
static int omap2430_musb_init(struct musb *musb)
{
@@ -214,37 +223,45 @@ static int omap2430_musb_of_to_plat(struct udevice *dev)
static int omap2430_musb_probe(struct udevice *dev)
{
-#ifdef CONFIG_USB_MUSB_HOST
- struct musb_host_data *host = dev_get_priv(dev);
-#else
- struct musb *musbp;
-#endif
struct omap2430_musb_plat *plat = dev_get_plat(dev);
- struct usb_bus_priv *priv = dev_get_uclass_priv(dev);
struct omap_musb_board_data *otg_board_data;
int ret = 0;
void *base = dev_read_addr_ptr(dev);
-
- priv->desc_before_addr = true;
+ struct musb *musbp;
otg_board_data = &plat->otg_board_data;
-#ifdef CONFIG_USB_MUSB_HOST
- host->host = musb_init_controller(&plat->plat,
- (struct device *)otg_board_data,
- plat->base);
- if (!host->host) {
- return -EIO;
+ if (CONFIG_IS_ENABLED(USB_MUSB_HOST)) {
+ struct musb_host_data *host = dev_get_priv(dev);
+ struct usb_bus_priv *priv = dev_get_uclass_priv(dev);
+
+ priv->desc_before_addr = true;
+
+ host->host = musb_init_controller(&plat->plat,
+ (struct device *)otg_board_data,
+ plat->base);
+ if (!host->host)
+ return -EIO;
+
+ return musb_lowlevel_init(host);
+ } else if (CONFIG_IS_ENABLED(DM_USB_GADGET)) {
+ struct musb_host_data *host = dev_get_priv(dev);
+
+ host->host = musb_init_controller(&plat->plat,
+ (struct device *)otg_board_data,
+ plat->base);
+ if (!host->host)
+ return -EIO;
+
+ return usb_add_gadget_udc((struct device *)otg_board_data, &host->host->g);
}
- ret = musb_lowlevel_init(host);
-#else
musbp = musb_register(&plat->plat, (struct device *)otg_board_data,
plat->base);
if (IS_ERR_OR_NULL(musbp))
return -EINVAL;
-#endif
- return ret;
+
+ return 0;
}
static int omap2430_musb_remove(struct udevice *dev)