Lines Matching +full:omap +full:- +full:usb2
1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * linux/arch/arm/mach-omap1/mux.c
7 * Copyright (C) 2003 - 2008 Nokia Corporation
79 /* UART2 (COM_UART_GATING), conflicts with USB2 */
120 /* USB2 master */
129 /* OMAP-1510 GPIO */
138 /* OMAP-1710 GPIO */
175 /* OMAP-1610 MMC2 */
187 /* OMAP-1610 External Trace Interface */
210 /* OMAP-1610 uWire */
218 /* OMAP-1610 SPI */
229 /* OMAP-1610 Flash */
244 /* OMAP-1610 USB0 alternate configuration */
254 /* USB2 interface */
341 if (cfg->mux_reg) { in omap1_cfg_reg()
345 reg_orig = omap_readl(cfg->mux_reg); in omap1_cfg_reg()
348 mask = (0x7 << cfg->mask_offset); in omap1_cfg_reg()
352 tmp2 = (cfg->mask << cfg->mask_offset); in omap1_cfg_reg()
358 omap_writel(reg, cfg->mux_reg); in omap1_cfg_reg()
364 if (cfg->pu_pd_reg && cfg->pull_val) { in omap1_cfg_reg()
366 pu_pd_orig = omap_readl(cfg->pu_pd_reg); in omap1_cfg_reg()
367 mask = 1 << cfg->pull_bit; in omap1_cfg_reg()
369 if (cfg->pu_pd_val) { in omap1_cfg_reg()
380 omap_writel(pu_pd, cfg->pu_pd_reg); in omap1_cfg_reg()
386 if (cfg->pull_reg) { in omap1_cfg_reg()
388 pull_orig = omap_readl(cfg->pull_reg); in omap1_cfg_reg()
389 mask = 1 << cfg->pull_bit; in omap1_cfg_reg()
391 if (cfg->pull_val) { in omap1_cfg_reg()
403 omap_writel(pull, cfg->pull_reg); in omap1_cfg_reg()
409 printk(KERN_WARNING "MUX: initialized %s\n", cfg->name); in omap1_cfg_reg()
414 if (cfg->debug || warn) { in omap1_cfg_reg()
415 printk("MUX: Setting register %s\n", cfg->name); in omap1_cfg_reg()
416 printk(" %s (0x%08x) = 0x%08x -> 0x%08x\n", in omap1_cfg_reg()
417 cfg->mux_reg_name, cfg->mux_reg, reg_orig, reg); in omap1_cfg_reg()
420 if (cfg->pu_pd_reg && cfg->pull_val) { in omap1_cfg_reg()
421 printk(" %s (0x%08x) = 0x%08x -> 0x%08x\n", in omap1_cfg_reg()
422 cfg->pu_pd_name, cfg->pu_pd_reg, in omap1_cfg_reg()
427 if (cfg->pull_reg) in omap1_cfg_reg()
428 printk(" %s (0x%08x) = 0x%08x -> 0x%08x\n", in omap1_cfg_reg()
429 cfg->pull_name, cfg->pull_reg, pull_orig, pull); in omap1_cfg_reg()
434 return warn ? -ETXTBSY : 0; in omap1_cfg_reg()
444 if (!arch_mux_cfg || !arch_mux_cfg->pins || arch_mux_cfg->size == 0 in omap_mux_register()
445 || !arch_mux_cfg->cfg_reg) { in omap_mux_register()
447 return -EINVAL; in omap_mux_register()
456 * Sets the Omap MUX and PULL_DWN registers based on the table
466 return -EINVAL; in omap_cfg_reg()
471 return -ENODEV; in omap_cfg_reg()
474 if (index >= mux_cfg->size) { in omap_cfg_reg()
476 index, mux_cfg->size); in omap_cfg_reg()
478 return -ENODEV; in omap_cfg_reg()
481 reg = &mux_cfg->pins[index]; in omap_cfg_reg()
483 if (!mux_cfg->cfg_reg) in omap_cfg_reg()
484 return -ENODEV; in omap_cfg_reg()
486 return mux_cfg->cfg_reg(reg); in omap_cfg_reg()