Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: omap1: remove dead code

After the removal of the unused board files, I went through the
omap1 code to look for code that no longer has any callers
and remove that.

In particular, support for the omap7xx/omap8xx family is now
completely unused, so I'm only leaving omap15xx/omap16xx/omap59xx.

Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Janusz Krzysztofik <jmkrzyszt@gmail.com>
Cc: linux-omap@vger.kernel.org
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Tony Lindgren <tony@atomide.com>
Acked-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

+36 -696
+1 -16
arch/arm/mach-omap1/clock_data.c
··· 720 720 cpu_mask |= CK_16XX; 721 721 if (cpu_is_omap1510()) 722 722 cpu_mask |= CK_1510; 723 - if (cpu_is_omap7xx()) 724 - cpu_mask |= CK_7XX; 725 723 if (cpu_is_omap310()) 726 724 cpu_mask |= CK_310; 727 725 ··· 727 729 api_ck_p = &api_ck.clk; 728 730 ck_dpll1_p = &ck_dpll1; 729 731 ck_ref_p = &ck_ref; 730 - 731 - if (cpu_is_omap7xx()) 732 - ck_ref.rate = 13000000; 733 732 734 733 pr_info("Clocks: ARM_SYSST: 0x%04x DPLL_CTL: 0x%04x ARM_CKCTL: 0x%04x\n", 735 734 omap_readw(ARM_SYSST), omap_readw(DPLL_CTL), ··· 766 771 } 767 772 } 768 773 769 - if (machine_is_omap_perseus2() || machine_is_omap_fsample()) { 770 - /* Select slicer output as OMAP input clock */ 771 - omap_writew(omap_readw(OMAP7XX_PCC_UPLD_CTRL) & ~0x1, 772 - OMAP7XX_PCC_UPLD_CTRL); 773 - } 774 - 775 774 /* Amstrad Delta wants BCLK high when inactive */ 776 775 if (machine_is_ams_delta()) 777 776 omap_writel(omap_readl(ULPD_CLOCK_CTRL) | ··· 773 784 ULPD_CLOCK_CTRL); 774 785 775 786 /* Turn off DSP and ARM_TIMXO. Make sure ARM_INTHCK is not divided */ 776 - /* (on 730, bit 13 must not be cleared) */ 777 - if (cpu_is_omap7xx()) 778 - omap_writew(omap_readw(ARM_CKCTL) & 0x2fff, ARM_CKCTL); 779 - else 780 - omap_writew(omap_readw(ARM_CKCTL) & 0x0fff, ARM_CKCTL); 787 + omap_writew(omap_readw(ARM_CKCTL) & 0x0fff, ARM_CKCTL); 781 788 782 789 /* Put DSP/MPUI into reset until needed */ 783 790 omap_writew(0, ARM_RSTCT1);
-8
arch/arm/mach-omap1/common.h
··· 35 35 #include "soc.h" 36 36 #include "i2c.h" 37 37 38 - #if defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850) 39 - void omap7xx_map_io(void); 40 - #else 41 - static inline void omap7xx_map_io(void) 42 - { 43 - } 44 - #endif 45 - 46 38 #ifdef CONFIG_ARCH_OMAP15XX 47 39 void omap1510_fpga_init_irq(void); 48 40 void omap15xx_map_io(void);
+4 -54
arch/arm/mach-omap1/devices.c
··· 63 63 static inline void omap_init_rtc(void) {} 64 64 #endif 65 65 66 - static inline void omap_init_mbox(void) { } 67 - 68 66 /*-------------------------------------------------------------------------*/ 69 67 70 68 #if IS_ENABLED(CONFIG_MMC_OMAP) ··· 71 73 int controller_nr) 72 74 { 73 75 if (controller_nr == 0) { 74 - if (cpu_is_omap7xx()) { 75 - omap_cfg_reg(MMC_7XX_CMD); 76 - omap_cfg_reg(MMC_7XX_CLK); 77 - omap_cfg_reg(MMC_7XX_DAT0); 78 - } else { 79 - omap_cfg_reg(MMC_CMD); 80 - omap_cfg_reg(MMC_CLK); 81 - omap_cfg_reg(MMC_DAT0); 82 - } 76 + omap_cfg_reg(MMC_CMD); 77 + omap_cfg_reg(MMC_CLK); 78 + omap_cfg_reg(MMC_DAT0); 83 79 84 80 if (cpu_is_omap1710()) { 85 81 omap_cfg_reg(M15_1710_MMC_CLKI); 86 82 omap_cfg_reg(P19_1710_MMC_CMDDIR); 87 83 omap_cfg_reg(P20_1710_MMC_DATDIR0); 88 84 } 89 - if (mmc_controller->slots[0].wires == 4 && !cpu_is_omap7xx()) { 85 + if (mmc_controller->slots[0].wires == 4) { 90 86 omap_cfg_reg(MMC_DAT1); 91 87 /* NOTE: DAT2 can be on W10 (here) or M15 */ 92 88 if (!mmc_controller->slots[0].nomux) ··· 146 154 res[3].name = "tx"; 147 155 res[3].flags = IORESOURCE_DMA; 148 156 149 - if (cpu_is_omap7xx()) 150 - data->slots[0].features = MMC_OMAP7XX; 151 157 if (cpu_is_omap15xx()) 152 158 data->slots[0].features = MMC_OMAP15XX; 153 159 if (cpu_is_omap16xx()) ··· 213 223 #endif 214 224 215 225 /*-------------------------------------------------------------------------*/ 216 - 217 - /* OMAP7xx SPI support */ 218 - #if IS_ENABLED(CONFIG_SPI_OMAP_100K) 219 - 220 - struct platform_device omap_spi1 = { 221 - .name = "omap1_spi100k", 222 - .id = 1, 223 - }; 224 - 225 - struct platform_device omap_spi2 = { 226 - .name = "omap1_spi100k", 227 - .id = 2, 228 - }; 229 - 230 - static void omap_init_spi100k(void) 231 - { 232 - if (!cpu_is_omap7xx()) 233 - return; 234 - 235 - omap_spi1.dev.platform_data = ioremap(OMAP7XX_SPI1_BASE, 0x7ff); 236 - if (omap_spi1.dev.platform_data) 237 - platform_device_register(&omap_spi1); 238 - 239 - omap_spi2.dev.platform_data = ioremap(OMAP7XX_SPI2_BASE, 0x7ff); 240 - if (omap_spi2.dev.platform_data) 241 - platform_device_register(&omap_spi2); 242 - } 243 - 244 - #else 245 - static inline void omap_init_spi100k(void) 246 - { 247 - } 248 - #endif 249 - 250 - /*-------------------------------------------------------------------------*/ 251 - 252 - static inline void omap_init_sti(void) {} 253 226 254 227 /* Numbering for the SPI-capable controllers when used for SPI: 255 228 * spi = 1 ··· 316 363 * in alphabetical order so they're easier to sort through. 317 364 */ 318 365 319 - omap_init_mbox(); 320 366 omap_init_rtc(); 321 - omap_init_spi100k(); 322 - omap_init_sti(); 323 367 omap_init_uwire(); 324 368 omap1_init_rng(); 325 369
+2 -23
arch/arm/mach-omap1/dma.c
··· 261 261 .num_res = 1, 262 262 }; 263 263 264 - /* OMAP730, OMAP850 */ 265 - static const struct dma_slave_map omap7xx_sdma_map[] = { 266 - { "omap-mcbsp.1", "tx", SDMA_FILTER_PARAM(8) }, 267 - { "omap-mcbsp.1", "rx", SDMA_FILTER_PARAM(9) }, 268 - { "omap-mcbsp.2", "tx", SDMA_FILTER_PARAM(10) }, 269 - { "omap-mcbsp.2", "rx", SDMA_FILTER_PARAM(11) }, 270 - { "mmci-omap.0", "tx", SDMA_FILTER_PARAM(21) }, 271 - { "mmci-omap.0", "rx", SDMA_FILTER_PARAM(22) }, 272 - { "omap_udc", "rx0", SDMA_FILTER_PARAM(26) }, 273 - { "omap_udc", "rx1", SDMA_FILTER_PARAM(27) }, 274 - { "omap_udc", "rx2", SDMA_FILTER_PARAM(28) }, 275 - { "omap_udc", "tx0", SDMA_FILTER_PARAM(29) }, 276 - { "omap_udc", "tx1", SDMA_FILTER_PARAM(30) }, 277 - { "omap_udc", "tx2", SDMA_FILTER_PARAM(31) }, 278 - }; 279 - 280 264 /* OMAP1510, OMAP1610*/ 281 265 static const struct dma_slave_map omap1xxx_sdma_map[] = { 282 266 { "omap-mcbsp.1", "tx", SDMA_FILTER_PARAM(8) }, ··· 355 371 p.dma_attr = d; 356 372 p.errata = configure_dma_errata(); 357 373 358 - if (cpu_is_omap7xx()) { 359 - p.slave_map = omap7xx_sdma_map; 360 - p.slavecnt = ARRAY_SIZE(omap7xx_sdma_map); 361 - } else { 362 - p.slave_map = omap1xxx_sdma_map; 363 - p.slavecnt = ARRAY_SIZE(omap1xxx_sdma_map); 364 - } 374 + p.slave_map = omap1xxx_sdma_map; 375 + p.slavecnt = ARRAY_SIZE(omap1xxx_sdma_map); 365 376 366 377 ret = platform_device_add_data(pdev, &p, sizeof(p)); 367 378 if (ret) {
+3 -11
arch/arm/mach-omap1/i2c.c
··· 25 25 26 26 static void __init omap1_i2c_mux_pins(int bus_id) 27 27 { 28 - if (cpu_is_omap7xx()) { 29 - omap_cfg_reg(I2C_7XX_SDA); 30 - omap_cfg_reg(I2C_7XX_SCL); 31 - } else { 32 - omap_cfg_reg(I2C_SDA); 33 - omap_cfg_reg(I2C_SCL); 34 - } 28 + omap_cfg_reg(I2C_SDA); 29 + omap_cfg_reg(I2C_SCL); 35 30 } 36 31 37 32 int __init omap_i2c_add_bus(struct omap_i2c_bus_platform_data *pdata, ··· 63 68 64 69 /* how the cpu bus is wired up differs for 7xx only */ 65 70 66 - if (cpu_is_omap7xx()) 67 - pdata->flags |= OMAP_I2C_FLAG_BUS_SHIFT_1; 68 - else 69 - pdata->flags |= OMAP_I2C_FLAG_BUS_SHIFT_2; 71 + pdata->flags |= OMAP_I2C_FLAG_BUS_SHIFT_2; 70 72 71 73 pdev->dev.platform_data = pdata; 72 74
-28
arch/arm/mach-omap1/io.c
··· 22 22 * The machine specific code may provide the extra mapping besides the 23 23 * default mapping provided here. 24 24 */ 25 - #if defined (CONFIG_ARCH_OMAP730) || defined (CONFIG_ARCH_OMAP850) 26 - static struct map_desc omap7xx_io_desc[] __initdata = { 27 - { 28 - .virtual = OMAP1_IO_VIRT, 29 - .pfn = __phys_to_pfn(OMAP1_IO_PHYS), 30 - .length = OMAP1_IO_SIZE, 31 - .type = MT_DEVICE 32 - }, 33 - { 34 - .virtual = OMAP7XX_DSP_BASE, 35 - .pfn = __phys_to_pfn(OMAP7XX_DSP_START), 36 - .length = OMAP7XX_DSP_SIZE, 37 - .type = MT_DEVICE 38 - }, { 39 - .virtual = OMAP7XX_DSPREG_BASE, 40 - .pfn = __phys_to_pfn(OMAP7XX_DSPREG_START), 41 - .length = OMAP7XX_DSPREG_SIZE, 42 - .type = MT_DEVICE 43 - } 44 - }; 45 - #endif 46 25 47 26 #ifdef CONFIG_ARCH_OMAP15XX 48 27 static struct map_desc omap1510_io_desc[] __initdata = { ··· 65 86 .type = MT_DEVICE 66 87 } 67 88 }; 68 - #endif 69 - 70 - #if defined (CONFIG_ARCH_OMAP730) || defined (CONFIG_ARCH_OMAP850) 71 - void __init omap7xx_map_io(void) 72 - { 73 - iotable_init(omap7xx_io_desc, ARRAY_SIZE(omap7xx_io_desc)); 74 - } 75 89 #endif 76 90 77 91 #ifdef CONFIG_ARCH_OMAP15XX
+1 -19
arch/arm/mach-omap1/irq.c
··· 110 110 irq_bank_writel(val, bank, offset); 111 111 } 112 112 113 - #if defined (CONFIG_ARCH_OMAP730) || defined (CONFIG_ARCH_OMAP850) 114 - static struct omap_irq_bank omap7xx_irq_banks[] = { 115 - { .base_reg = OMAP_IH1_BASE, .trigger_map = 0xb3f8e22f }, 116 - { .base_reg = OMAP_IH2_BASE, .trigger_map = 0xfdb9c1f2 }, 117 - { .base_reg = OMAP_IH2_BASE + 0x100, .trigger_map = 0x800040f3 }, 118 - }; 119 - #endif 120 - 121 113 #ifdef CONFIG_ARCH_OMAP15XX 122 114 static struct omap_irq_bank omap1510_irq_banks[] = { 123 115 { .base_reg = OMAP_IH1_BASE, .trigger_map = 0xb3febfff }, ··· 186 194 int i, j, irq_base; 187 195 unsigned long nr_irqs; 188 196 189 - #if defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850) 190 - if (cpu_is_omap7xx()) { 191 - irq_banks = omap7xx_irq_banks; 192 - irq_bank_count = ARRAY_SIZE(omap7xx_irq_banks); 193 - } 194 - #endif 195 197 #ifdef CONFIG_ARCH_OMAP15XX 196 198 if (cpu_is_omap1510()) { 197 199 irq_banks = omap1510_irq_banks; ··· 216 230 pr_warn("Couldn't allocate IRQ numbers\n"); 217 231 irq_base = 0; 218 232 } 219 - omap_l2_irq = cpu_is_omap7xx() ? irq_base + 1 : irq_base; 233 + omap_l2_irq = irq_base; 220 234 omap_l2_irq -= NR_IRQS_LEGACY; 221 235 222 236 domain = irq_domain_add_legacy(NULL, nr_irqs, irq_base, 0, ··· 234 248 /* Clear any pending interrupts */ 235 249 irq_bank_writel(0x03, 0, IRQ_CONTROL_REG_OFFSET); 236 250 irq_bank_writel(0x03, 1, IRQ_CONTROL_REG_OFFSET); 237 - 238 - /* Enable interrupts in global mask */ 239 - if (cpu_is_omap7xx()) 240 - irq_bank_writel(0x0, 0, IRQ_GMR_REG_OFFSET); 241 251 242 252 /* Install the interrupt handlers for each bank */ 243 253 for (i = 0; i < irq_bank_count; i++) {
-9
arch/arm/mach-omap1/irqs.h
··· 231 231 #define IH_MPUIO_BASE (OMAP_MAX_GPIO_LINES + IH_GPIO_BASE) 232 232 #define OMAP_IRQ_END (IH_MPUIO_BASE + 16) 233 233 234 - /* External FPGA handles interrupts on Innovator boards */ 235 - #define OMAP_FPGA_IRQ_BASE (OMAP_IRQ_END) 236 - #ifdef CONFIG_MACH_OMAP_INNOVATOR 237 - #define OMAP_FPGA_NR_IRQS 24 238 - #else 239 - #define OMAP_FPGA_NR_IRQS 0 240 - #endif 241 - #define OMAP_FPGA_IRQ_END (OMAP_FPGA_IRQ_BASE + OMAP_FPGA_NR_IRQS) 242 - 243 234 #define OMAP_IRQ_BIT(irq) (1 << ((irq - NR_IRQS_LEGACY) % 32)) 244 235 245 236 #ifdef CONFIG_FIQ
-76
arch/arm/mach-omap1/mcbsp.c
··· 89 89 #define OMAP1610_MCBSP2_BASE 0xfffb1000 90 90 #define OMAP1610_MCBSP3_BASE 0xe1017000 91 91 92 - struct resource omap7xx_mcbsp_res[][6] = { 93 - { 94 - { 95 - .start = OMAP7XX_MCBSP1_BASE, 96 - .end = OMAP7XX_MCBSP1_BASE + SZ_256, 97 - .flags = IORESOURCE_MEM, 98 - }, 99 - { 100 - .name = "rx", 101 - .start = INT_7XX_McBSP1RX, 102 - .flags = IORESOURCE_IRQ, 103 - }, 104 - { 105 - .name = "tx", 106 - .start = INT_7XX_McBSP1TX, 107 - .flags = IORESOURCE_IRQ, 108 - }, 109 - { 110 - .name = "rx", 111 - .start = 9, 112 - .flags = IORESOURCE_DMA, 113 - }, 114 - { 115 - .name = "tx", 116 - .start = 8, 117 - .flags = IORESOURCE_DMA, 118 - }, 119 - }, 120 - { 121 - { 122 - .start = OMAP7XX_MCBSP2_BASE, 123 - .end = OMAP7XX_MCBSP2_BASE + SZ_256, 124 - .flags = IORESOURCE_MEM, 125 - }, 126 - { 127 - .name = "rx", 128 - .start = INT_7XX_McBSP2RX, 129 - .flags = IORESOURCE_IRQ, 130 - }, 131 - { 132 - .name = "tx", 133 - .start = INT_7XX_McBSP2TX, 134 - .flags = IORESOURCE_IRQ, 135 - }, 136 - { 137 - .name = "rx", 138 - .start = 11, 139 - .flags = IORESOURCE_DMA, 140 - }, 141 - { 142 - .name = "tx", 143 - .start = 10, 144 - .flags = IORESOURCE_DMA, 145 - }, 146 - }, 147 - }; 148 - 149 - #define omap7xx_mcbsp_res_0 omap7xx_mcbsp_res[0] 150 - 151 - static struct omap_mcbsp_platform_data omap7xx_mcbsp_pdata[] = { 152 - { 153 - .ops = &omap1_mcbsp_ops, 154 - }, 155 - { 156 - .ops = &omap1_mcbsp_ops, 157 - }, 158 - }; 159 - #define OMAP7XX_MCBSP_RES_SZ ARRAY_SIZE(omap7xx_mcbsp_res[1]) 160 - #define OMAP7XX_MCBSP_COUNT ARRAY_SIZE(omap7xx_mcbsp_res) 161 - 162 92 struct resource omap15xx_mcbsp_res[][6] = { 163 93 { 164 94 { ··· 326 396 { 327 397 if (!cpu_class_is_omap1()) 328 398 return -ENODEV; 329 - 330 - if (cpu_is_omap7xx()) 331 - omap_mcbsp_register_board_cfg(omap7xx_mcbsp_res_0, 332 - OMAP7XX_MCBSP_RES_SZ, 333 - omap7xx_mcbsp_pdata, 334 - OMAP7XX_MCBSP_COUNT); 335 399 336 400 if (cpu_is_omap15xx()) 337 401 omap_mcbsp_register_board_cfg(omap15xx_mcbsp_res_0,
-4
arch/arm/mach-omap1/mtd-xip.h
··· 42 42 * (see linux/mtd/xip.h) 43 43 */ 44 44 45 - #ifdef CONFIG_MACH_OMAP_PERSEUS2 46 - #define xip_elapsed_since(x) (signed)((~xip_omap_mpu_timer_read(0) - (x)) / 7) 47 - #else 48 45 #define xip_elapsed_since(x) (signed)((~xip_omap_mpu_timer_read(0) - (x)) / 6) 49 - #endif 50 46 51 47 /* 52 48 * xip_cpu_idle() is used when waiting for a delay equal or larger than
-52
arch/arm/mach-omap1/mux.c
··· 21 21 22 22 static struct omap_mux_cfg arch_mux_cfg; 23 23 24 - #if defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850) 25 - static struct pin_config omap7xx_pins[] = { 26 - MUX_CFG_7XX("E2_7XX_KBR0", 12, 21, 0, 20, 1, 0) 27 - MUX_CFG_7XX("J7_7XX_KBR1", 12, 25, 0, 24, 1, 0) 28 - MUX_CFG_7XX("E1_7XX_KBR2", 12, 29, 0, 28, 1, 0) 29 - MUX_CFG_7XX("F3_7XX_KBR3", 13, 1, 0, 0, 1, 0) 30 - MUX_CFG_7XX("D2_7XX_KBR4", 13, 5, 0, 4, 1, 0) 31 - MUX_CFG_7XX("C2_7XX_KBC0", 13, 9, 0, 8, 1, 0) 32 - MUX_CFG_7XX("D3_7XX_KBC1", 13, 13, 0, 12, 1, 0) 33 - MUX_CFG_7XX("E4_7XX_KBC2", 13, 17, 0, 16, 1, 0) 34 - MUX_CFG_7XX("F4_7XX_KBC3", 13, 21, 0, 20, 1, 0) 35 - MUX_CFG_7XX("E3_7XX_KBC4", 13, 25, 0, 24, 1, 0) 36 - 37 - MUX_CFG_7XX("AA17_7XX_USB_DM", 2, 21, 0, 20, 0, 0) 38 - MUX_CFG_7XX("W16_7XX_USB_PU_EN", 2, 25, 0, 24, 0, 0) 39 - MUX_CFG_7XX("W17_7XX_USB_VBUSI", 2, 29, 6, 28, 1, 0) 40 - MUX_CFG_7XX("W18_7XX_USB_DMCK_OUT",3, 3, 1, 2, 0, 0) 41 - MUX_CFG_7XX("W19_7XX_USB_DCRST", 3, 7, 1, 6, 0, 0) 42 - 43 - /* MMC Pins */ 44 - MUX_CFG_7XX("MMC_7XX_CMD", 2, 9, 0, 8, 1, 0) 45 - MUX_CFG_7XX("MMC_7XX_CLK", 2, 13, 0, 12, 1, 0) 46 - MUX_CFG_7XX("MMC_7XX_DAT0", 2, 17, 0, 16, 1, 0) 47 - 48 - /* I2C interface */ 49 - MUX_CFG_7XX("I2C_7XX_SCL", 5, 1, 0, 0, 1, 0) 50 - MUX_CFG_7XX("I2C_7XX_SDA", 5, 5, 0, 0, 1, 0) 51 - 52 - /* SPI pins */ 53 - MUX_CFG_7XX("SPI_7XX_1", 6, 5, 4, 4, 1, 0) 54 - MUX_CFG_7XX("SPI_7XX_2", 6, 9, 4, 8, 1, 0) 55 - MUX_CFG_7XX("SPI_7XX_3", 6, 13, 4, 12, 1, 0) 56 - MUX_CFG_7XX("SPI_7XX_4", 6, 17, 4, 16, 1, 0) 57 - MUX_CFG_7XX("SPI_7XX_5", 8, 25, 0, 24, 0, 0) 58 - MUX_CFG_7XX("SPI_7XX_6", 9, 5, 0, 4, 0, 0) 59 - 60 - /* UART pins */ 61 - MUX_CFG_7XX("UART_7XX_1", 3, 21, 0, 20, 0, 0) 62 - MUX_CFG_7XX("UART_7XX_2", 8, 1, 6, 0, 0, 0) 63 - }; 64 - #define OMAP7XX_PINS_SZ ARRAY_SIZE(omap7xx_pins) 65 - #else 66 - #define omap7xx_pins NULL 67 - #define OMAP7XX_PINS_SZ 0 68 - #endif /* CONFIG_ARCH_OMAP730 || CONFIG_ARCH_OMAP850 */ 69 - 70 24 #if defined(CONFIG_ARCH_OMAP15XX) || defined(CONFIG_ARCH_OMAP16XX) 71 25 static struct pin_config omap1xxx_pins[] = { 72 26 /* ··· 443 489 444 490 int __init omap1_mux_init(void) 445 491 { 446 - if (cpu_is_omap7xx()) { 447 - arch_mux_cfg.pins = omap7xx_pins; 448 - arch_mux_cfg.size = OMAP7XX_PINS_SZ; 449 - arch_mux_cfg.cfg_reg = omap1_cfg_reg; 450 - } 451 - 452 492 if (cpu_is_omap15xx() || cpu_is_omap16xx()) { 453 493 arch_mux_cfg.pins = omap1xxx_pins; 454 494 arch_mux_cfg.size = OMAP1XXX_PINS_SZ;
+11 -65
arch/arm/mach-omap1/pm.c
··· 69 69 static unsigned int arm_sleep_save[ARM_SLEEP_SAVE_SIZE]; 70 70 static unsigned short dsp_sleep_save[DSP_SLEEP_SAVE_SIZE]; 71 71 static unsigned short ulpd_sleep_save[ULPD_SLEEP_SAVE_SIZE]; 72 - static unsigned int mpui7xx_sleep_save[MPUI7XX_SLEEP_SAVE_SIZE]; 73 72 static unsigned int mpui1510_sleep_save[MPUI1510_SLEEP_SAVE_SIZE]; 74 73 static unsigned int mpui1610_sleep_save[MPUI1610_SLEEP_SAVE_SIZE]; 75 74 ··· 165 166 * drivers must still separately call omap_set_gpio_wakeup() to 166 167 * wake up to a GPIO interrupt. 167 168 */ 168 - if (cpu_is_omap7xx()) 169 - level1_wake = OMAP_IRQ_BIT(INT_7XX_GPIO_BANK1) | 170 - OMAP_IRQ_BIT(INT_7XX_IH2_IRQ); 171 - else if (cpu_is_omap15xx()) 169 + if (cpu_is_omap15xx()) 172 170 level1_wake = OMAP_IRQ_BIT(INT_GPIO_BANK1) | 173 171 OMAP_IRQ_BIT(INT_1510_IH2_IRQ); 174 172 else if (cpu_is_omap16xx()) ··· 174 178 175 179 omap_writel(~level1_wake, OMAP_IH1_MIR); 176 180 177 - if (cpu_is_omap7xx()) { 178 - omap_writel(~level2_wake, OMAP_IH2_0_MIR); 179 - omap_writel(~(OMAP_IRQ_BIT(INT_7XX_WAKE_UP_REQ) | 180 - OMAP_IRQ_BIT(INT_7XX_MPUIO_KEYPAD)), 181 - OMAP_IH2_1_MIR); 182 - } else if (cpu_is_omap15xx()) { 181 + if (cpu_is_omap15xx()) { 183 182 level2_wake |= OMAP_IRQ_BIT(INT_KEYBOARD); 184 183 omap_writel(~level2_wake, OMAP_IH2_MIR); 185 184 } else if (cpu_is_omap16xx()) { ··· 227 236 * Save interrupt, MPUI, ARM and UPLD control registers. 228 237 */ 229 238 230 - if (cpu_is_omap7xx()) { 231 - MPUI7XX_SAVE(OMAP_IH1_MIR); 232 - MPUI7XX_SAVE(OMAP_IH2_0_MIR); 233 - MPUI7XX_SAVE(OMAP_IH2_1_MIR); 234 - MPUI7XX_SAVE(MPUI_CTRL); 235 - MPUI7XX_SAVE(MPUI_DSP_BOOT_CONFIG); 236 - MPUI7XX_SAVE(MPUI_DSP_API_CONFIG); 237 - MPUI7XX_SAVE(EMIFS_CONFIG); 238 - MPUI7XX_SAVE(EMIFF_SDRAM_CONFIG); 239 - 240 - } else if (cpu_is_omap15xx()) { 239 + if (cpu_is_omap15xx()) { 241 240 MPUI1510_SAVE(OMAP_IH1_MIR); 242 241 MPUI1510_SAVE(OMAP_IH2_MIR); 243 242 MPUI1510_SAVE(MPUI_CTRL); ··· 269 288 /* stop DSP */ 270 289 omap_writew(omap_readw(ARM_RSTCT1) & ~(1 << DSP_EN), ARM_RSTCT1); 271 290 272 - /* shut down dsp_ck */ 273 - if (!cpu_is_omap7xx()) 274 - omap_writew(omap_readw(ARM_CKCTL) & ~(1 << EN_DSPCK), ARM_CKCTL); 291 + /* shut down dsp_ck */ 292 + omap_writew(omap_readw(ARM_CKCTL) & ~(1 << EN_DSPCK), ARM_CKCTL); 275 293 276 294 /* temporarily enabling api_ck to access DSP registers */ 277 295 omap_writew(omap_readw(ARM_IDLECT2) | 1 << EN_APICK, ARM_IDLECT2); ··· 346 366 ULPD_RESTORE(ULPD_CLOCK_CTRL); 347 367 ULPD_RESTORE(ULPD_STATUS_REQ); 348 368 349 - if (cpu_is_omap7xx()) { 350 - MPUI7XX_RESTORE(EMIFS_CONFIG); 351 - MPUI7XX_RESTORE(EMIFF_SDRAM_CONFIG); 352 - MPUI7XX_RESTORE(OMAP_IH1_MIR); 353 - MPUI7XX_RESTORE(OMAP_IH2_0_MIR); 354 - MPUI7XX_RESTORE(OMAP_IH2_1_MIR); 355 - } else if (cpu_is_omap15xx()) { 369 + if (cpu_is_omap15xx()) { 356 370 MPUI1510_RESTORE(MPUI_CTRL); 357 371 MPUI1510_RESTORE(MPUI_DSP_BOOT_CONFIG); 358 372 MPUI1510_RESTORE(MPUI_DSP_API_CONFIG); ··· 407 433 ULPD_SAVE(ULPD_DPLL_CTRL); 408 434 ULPD_SAVE(ULPD_POWER_CTRL); 409 435 410 - if (cpu_is_omap7xx()) { 411 - MPUI7XX_SAVE(MPUI_CTRL); 412 - MPUI7XX_SAVE(MPUI_DSP_STATUS); 413 - MPUI7XX_SAVE(MPUI_DSP_BOOT_CONFIG); 414 - MPUI7XX_SAVE(MPUI_DSP_API_CONFIG); 415 - MPUI7XX_SAVE(EMIFF_SDRAM_CONFIG); 416 - MPUI7XX_SAVE(EMIFS_CONFIG); 417 - } else if (cpu_is_omap15xx()) { 436 + if (cpu_is_omap15xx()) { 418 437 MPUI1510_SAVE(MPUI_CTRL); 419 438 MPUI1510_SAVE(MPUI_DSP_STATUS); 420 439 MPUI1510_SAVE(MPUI_DSP_BOOT_CONFIG); ··· 453 486 ULPD_SHOW(ULPD_STATUS_REQ), 454 487 ULPD_SHOW(ULPD_POWER_CTRL)); 455 488 456 - if (cpu_is_omap7xx()) { 457 - seq_printf(m, 458 - "MPUI7XX_CTRL_REG 0x%-8x \n" 459 - "MPUI7XX_DSP_STATUS_REG: 0x%-8x \n" 460 - "MPUI7XX_DSP_BOOT_CONFIG_REG: 0x%-8x \n" 461 - "MPUI7XX_DSP_API_CONFIG_REG: 0x%-8x \n" 462 - "MPUI7XX_SDRAM_CONFIG_REG: 0x%-8x \n" 463 - "MPUI7XX_EMIFS_CONFIG_REG: 0x%-8x \n", 464 - MPUI7XX_SHOW(MPUI_CTRL), 465 - MPUI7XX_SHOW(MPUI_DSP_STATUS), 466 - MPUI7XX_SHOW(MPUI_DSP_BOOT_CONFIG), 467 - MPUI7XX_SHOW(MPUI_DSP_API_CONFIG), 468 - MPUI7XX_SHOW(EMIFF_SDRAM_CONFIG), 469 - MPUI7XX_SHOW(EMIFS_CONFIG)); 470 - } else if (cpu_is_omap15xx()) { 489 + if (cpu_is_omap15xx()) { 471 490 seq_printf(m, 472 491 "MPUI1510_CTRL_REG 0x%-8x \n" 473 492 "MPUI1510_DSP_STATUS_REG: 0x%-8x \n" ··· 587 634 * These routines need to be in SRAM as that's the only 588 635 * memory the MPU can see when it wakes up. 589 636 */ 590 - if (cpu_is_omap7xx()) { 591 - omap_sram_suspend = omap_sram_push(omap7xx_cpu_suspend, 592 - omap7xx_cpu_suspend_sz); 593 - } else if (cpu_is_omap15xx()) { 637 + if (cpu_is_omap15xx()) { 594 638 omap_sram_suspend = omap_sram_push(omap1510_cpu_suspend, 595 639 omap1510_cpu_suspend_sz); 596 640 } else if (cpu_is_omap16xx()) { ··· 602 652 603 653 arm_pm_idle = omap1_pm_idle; 604 654 605 - if (cpu_is_omap7xx()) 606 - irq = INT_7XX_WAKE_UP_REQ; 607 - else if (cpu_is_omap16xx()) 655 + if (cpu_is_omap16xx()) 608 656 irq = INT_1610_WAKE_UP_REQ; 609 657 else 610 658 irq = -1; ··· 621 673 omap_writew(ULPD_POWER_CTRL_REG_VAL, ULPD_POWER_CTRL); 622 674 623 675 /* Configure IDLECT3 */ 624 - if (cpu_is_omap7xx()) 625 - omap_writel(OMAP7XX_IDLECT3_VAL, OMAP7XX_IDLECT3); 626 - else if (cpu_is_omap16xx()) 676 + if (cpu_is_omap16xx()) 627 677 omap_writel(OMAP1610_IDLECT3_VAL, OMAP1610_IDLECT3); 628 678 629 679 suspend_set_ops(&omap_pm_ops);
-35
arch/arm/mach-omap1/pm.h
··· 100 100 #define OMAP1610_IDLECT3 0xfffece24 101 101 #define OMAP1610_IDLE_LOOP_REQUEST 0x0400 102 102 103 - #define OMAP7XX_IDLECT1_SLEEP_VAL 0x16c7 104 - #define OMAP7XX_IDLECT2_SLEEP_VAL 0x09c7 105 - #define OMAP7XX_IDLECT3_VAL 0x3f 106 - #define OMAP7XX_IDLECT3 0xfffece24 107 - #define OMAP7XX_IDLE_LOOP_REQUEST 0x0C00 108 - 109 103 #ifndef __ASSEMBLER__ 110 104 111 105 #include <linux/clk.h> ··· 112 118 extern void omap1_pm_idle(void); 113 119 extern void omap1_pm_suspend(void); 114 120 115 - extern void omap7xx_cpu_suspend(unsigned long, unsigned long); 116 121 extern void omap1510_cpu_suspend(unsigned long, unsigned long); 117 122 extern void omap1610_cpu_suspend(unsigned long, unsigned long); 118 - extern void omap7xx_idle_loop_suspend(void); 119 123 extern void omap1510_idle_loop_suspend(void); 120 124 extern void omap1610_idle_loop_suspend(void); 121 125 122 - extern unsigned int omap7xx_cpu_suspend_sz; 123 126 extern unsigned int omap1510_cpu_suspend_sz; 124 127 extern unsigned int omap1610_cpu_suspend_sz; 125 - extern unsigned int omap7xx_idle_loop_suspend_sz; 126 128 extern unsigned int omap1510_idle_loop_suspend_sz; 127 129 extern unsigned int omap1610_idle_loop_suspend_sz; 128 130 ··· 140 150 #define ULPD_SAVE(x) ulpd_sleep_save[ULPD_SLEEP_SAVE_##x] = omap_readw(x) 141 151 #define ULPD_RESTORE(x) omap_writew((ulpd_sleep_save[ULPD_SLEEP_SAVE_##x]), (x)) 142 152 #define ULPD_SHOW(x) ulpd_sleep_save[ULPD_SLEEP_SAVE_##x] 143 - 144 - #define MPUI7XX_SAVE(x) mpui7xx_sleep_save[MPUI7XX_SLEEP_SAVE_##x] = omap_readl(x) 145 - #define MPUI7XX_RESTORE(x) omap_writel((mpui7xx_sleep_save[MPUI7XX_SLEEP_SAVE_##x]), (x)) 146 - #define MPUI7XX_SHOW(x) mpui7xx_sleep_save[MPUI7XX_SLEEP_SAVE_##x] 147 153 148 154 #define MPUI1510_SAVE(x) mpui1510_sleep_save[MPUI1510_SLEEP_SAVE_##x] = omap_readl(x) 149 155 #define MPUI1510_RESTORE(x) omap_writel((mpui1510_sleep_save[MPUI1510_SLEEP_SAVE_##x]), (x)) ··· 211 225 MPUI1510_SLEEP_SAVE_SIZE 212 226 #else 213 227 MPUI1510_SLEEP_SAVE_SIZE = 0 214 - #endif 215 - }; 216 - 217 - enum mpui7xx_save_state { 218 - MPUI7XX_SLEEP_SAVE_START = 0, 219 - /* 220 - * MPUI registers 32 bits 221 - */ 222 - MPUI7XX_SLEEP_SAVE_MPUI_CTRL, 223 - MPUI7XX_SLEEP_SAVE_MPUI_DSP_BOOT_CONFIG, 224 - MPUI7XX_SLEEP_SAVE_MPUI_DSP_API_CONFIG, 225 - MPUI7XX_SLEEP_SAVE_MPUI_DSP_STATUS, 226 - MPUI7XX_SLEEP_SAVE_EMIFF_SDRAM_CONFIG, 227 - MPUI7XX_SLEEP_SAVE_EMIFS_CONFIG, 228 - MPUI7XX_SLEEP_SAVE_OMAP_IH1_MIR, 229 - MPUI7XX_SLEEP_SAVE_OMAP_IH2_0_MIR, 230 - MPUI7XX_SLEEP_SAVE_OMAP_IH2_1_MIR, 231 - #if defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850) 232 - MPUI7XX_SLEEP_SAVE_SIZE 233 - #else 234 - MPUI7XX_SLEEP_SAVE_SIZE = 0 235 228 #endif 236 229 }; 237 230
-15
arch/arm/mach-omap1/serial.c
··· 106 106 { 107 107 int i; 108 108 109 - if (cpu_is_omap7xx()) { 110 - serial_platform_data[0].regshift = 0; 111 - serial_platform_data[1].regshift = 0; 112 - serial_platform_data[0].irq = INT_7XX_UART_MODEM_1; 113 - serial_platform_data[1].irq = INT_7XX_UART_MODEM_IRDA_2; 114 - } 115 - 116 109 if (cpu_is_omap15xx()) { 117 110 serial_platform_data[0].uartclk = OMAP1510_BASE_BAUD * 16; 118 111 serial_platform_data[1].uartclk = OMAP1510_BASE_BAUD * 16; ··· 113 120 } 114 121 115 122 for (i = 0; i < ARRAY_SIZE(serial_platform_data) - 1; i++) { 116 - 117 - /* Don't look at UARTs higher than 2 for omap7xx */ 118 - if (cpu_is_omap7xx() && i > 1) { 119 - serial_platform_data[i].membase = NULL; 120 - serial_platform_data[i].mapbase = 0; 121 - continue; 122 - } 123 - 124 123 /* Static mapping, never released */ 125 124 serial_platform_data[i].membase = 126 125 ioremap(serial_platform_data[i].mapbase, SZ_2K);
-80
arch/arm/mach-omap1/sleep.S
··· 61 61 * 62 62 */ 63 63 64 - #if defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850) 65 - .align 3 66 - ENTRY(omap7xx_cpu_suspend) 67 - 68 - @ save registers on stack 69 - stmfd sp!, {r0 - r12, lr} 70 - 71 - @ Drain write cache 72 - mov r4, #0 73 - mcr p15, 0, r0, c7, c10, 4 74 - nop 75 - 76 - @ load base address of Traffic Controller 77 - mov r6, #TCMIF_ASM_BASE & 0xff000000 78 - orr r6, r6, #TCMIF_ASM_BASE & 0x00ff0000 79 - orr r6, r6, #TCMIF_ASM_BASE & 0x0000ff00 80 - 81 - @ prepare to put SDRAM into self-refresh manually 82 - ldr r7, [r6, #EMIFF_SDRAM_CONFIG_ASM_OFFSET & 0xff] 83 - orr r9, r7, #SELF_REFRESH_MODE & 0xff000000 84 - orr r9, r9, #SELF_REFRESH_MODE & 0x000000ff 85 - str r9, [r6, #EMIFF_SDRAM_CONFIG_ASM_OFFSET & 0xff] 86 - 87 - @ prepare to put EMIFS to Sleep 88 - ldr r8, [r6, #EMIFS_CONFIG_ASM_OFFSET & 0xff] 89 - orr r9, r8, #IDLE_EMIFS_REQUEST & 0xff 90 - str r9, [r6, #EMIFS_CONFIG_ASM_OFFSET & 0xff] 91 - 92 - @ load base address of ARM_IDLECT1 and ARM_IDLECT2 93 - mov r4, #CLKGEN_REG_ASM_BASE & 0xff000000 94 - orr r4, r4, #CLKGEN_REG_ASM_BASE & 0x00ff0000 95 - orr r4, r4, #CLKGEN_REG_ASM_BASE & 0x0000ff00 96 - 97 - @ turn off clock domains 98 - @ do not disable PERCK (0x04) 99 - mov r5, #OMAP7XX_IDLECT2_SLEEP_VAL & 0xff 100 - orr r5, r5, #OMAP7XX_IDLECT2_SLEEP_VAL & 0xff00 101 - strh r5, [r4, #ARM_IDLECT2_ASM_OFFSET & 0xff] 102 - 103 - @ request ARM idle 104 - mov r3, #OMAP7XX_IDLECT1_SLEEP_VAL & 0xff 105 - orr r3, r3, #OMAP7XX_IDLECT1_SLEEP_VAL & 0xff00 106 - strh r3, [r4, #ARM_IDLECT1_ASM_OFFSET & 0xff] 107 - 108 - @ disable instruction cache 109 - mrc p15, 0, r9, c1, c0, 0 110 - bic r2, r9, #0x1000 111 - mcr p15, 0, r2, c1, c0, 0 112 - nop 113 - 114 - /* 115 - * Let's wait for the next wake up event to wake us up. r0 can't be 116 - * used here because r0 holds ARM_IDLECT1 117 - */ 118 - mov r2, #0 119 - mcr p15, 0, r2, c7, c0, 4 @ wait for interrupt 120 - /* 121 - * omap7xx_cpu_suspend()'s resume point. 122 - * 123 - * It will just start executing here, so we'll restore stuff from the 124 - * stack. 125 - */ 126 - @ re-enable Icache 127 - mcr p15, 0, r9, c1, c0, 0 128 - 129 - @ reset the ARM_IDLECT1 and ARM_IDLECT2. 130 - strh r1, [r4, #ARM_IDLECT2_ASM_OFFSET & 0xff] 131 - strh r0, [r4, #ARM_IDLECT1_ASM_OFFSET & 0xff] 132 - 133 - @ Restore EMIFF controls 134 - str r7, [r6, #EMIFF_SDRAM_CONFIG_ASM_OFFSET & 0xff] 135 - str r8, [r6, #EMIFS_CONFIG_ASM_OFFSET & 0xff] 136 - 137 - @ restore regs and return 138 - ldmfd sp!, {r0 - r12, pc} 139 - 140 - ENTRY(omap7xx_cpu_suspend_sz) 141 - .word . - omap7xx_cpu_suspend 142 - #endif /* CONFIG_ARCH_OMAP730 || CONFIG_ARCH_OMAP850 */ 143 - 144 64 #ifdef CONFIG_ARCH_OMAP15XX 145 65 .align 3 146 66 ENTRY(omap1510_cpu_suspend)
+1 -6
arch/arm/mach-omap1/sram-init.c
··· 94 94 omap_sram_skip = SRAM_BOOTLOADER_SZ; 95 95 omap_sram_start = OMAP1_SRAM_PA; 96 96 97 - if (cpu_is_omap7xx()) 98 - omap_sram_size = 0x32000; /* 200K */ 99 - else if (cpu_is_omap15xx()) 97 + if (cpu_is_omap15xx()) 100 98 omap_sram_size = 0x30000; /* 192K */ 101 99 else if (cpu_is_omap1610() || cpu_is_omap1611() || 102 100 cpu_is_omap1621() || cpu_is_omap1710()) ··· 131 133 void omap_sram_reprogram_clock(u32 dpllctl, u32 ckctl) 132 134 { 133 135 BUG_ON(!_omap_sram_reprogram_clock); 134 - /* On 730, bit 13 must always be 1 */ 135 - if (cpu_is_omap7xx()) 136 - ckctl |= 0x2000; 137 136 _omap_sram_reprogram_clock(dpllctl, ckctl); 138 137 } 139 138
+7 -27
arch/arm/mach-omap1/usb.c
··· 190 190 191 191 static inline void udc_device_init(struct omap_usb_config *pdata) 192 192 { 193 - /* IRQ numbers for omap7xx */ 194 - if(cpu_is_omap7xx()) { 195 - udc_resources[1].start = INT_7XX_USB_GENI; 196 - udc_resources[2].start = INT_7XX_USB_NON_ISO; 197 - udc_resources[3].start = INT_7XX_USB_ISO; 198 - } 199 193 pdata->udc_device = &udc_device; 200 194 } 201 195 ··· 232 238 if (!IS_ENABLED(CONFIG_USB_OHCI_HCD)) 233 239 return; 234 240 235 - if (cpu_is_omap7xx()) 236 - ohci_resources[1].start = INT_7XX_USB_HHC_1; 237 241 pdata->ohci_device = &ohci_device; 238 242 pdata->ocpi_enable = &ocpi_enable; 239 243 } ··· 259 267 260 268 static inline void otg_device_init(struct omap_usb_config *pdata) 261 269 { 262 - if (cpu_is_omap7xx()) 263 - otg_resources[1].start = INT_7XX_USB_OTG; 264 270 pdata->otg_device = &otg_device; 265 271 } 266 272 ··· 287 297 } 288 298 289 299 if (is_device) { 290 - if (cpu_is_omap7xx()) { 291 - omap_cfg_reg(AA17_7XX_USB_DM); 292 - omap_cfg_reg(W16_7XX_USB_PU_EN); 293 - omap_cfg_reg(W17_7XX_USB_VBUSI); 294 - omap_cfg_reg(W18_7XX_USB_DMCK_OUT); 295 - omap_cfg_reg(W19_7XX_USB_DCRST); 296 - } else 297 - omap_cfg_reg(W4_USB_PUEN); 300 + omap_cfg_reg(W4_USB_PUEN); 298 301 } 299 302 300 303 if (nwires == 2) { ··· 307 324 * - OTG support on this port not yet written 308 325 */ 309 326 310 - /* Don't do this for omap7xx -- it causes USB to not work correctly */ 311 - if (!cpu_is_omap7xx()) { 312 - l = omap_readl(USB_TRANSCEIVER_CTRL); 313 - l &= ~(7 << 4); 314 - if (!is_device) 315 - l |= (3 << 1); 316 - omap_writel(l, USB_TRANSCEIVER_CTRL); 317 - } 327 + l = omap_readl(USB_TRANSCEIVER_CTRL); 328 + l &= ~(7 << 4); 329 + if (!is_device) 330 + l |= (3 << 1); 331 + omap_writel(l, USB_TRANSCEIVER_CTRL); 318 332 319 333 return 3 << 16; 320 334 } ··· 678 698 ohci_device_init(pdata); 679 699 otg_device_init(pdata); 680 700 681 - if (cpu_is_omap7xx() || cpu_is_omap16xx()) 701 + if (cpu_is_omap16xx()) 682 702 omap_otg_init(pdata); 683 703 else if (cpu_is_omap15xx()) 684 704 omap_1510_usb_init(pdata);
+1 -15
drivers/spi/spi-omap-uwire.c
··· 99 99 * Or, put it in a structure which is used throughout the driver; 100 100 * that avoids having to issue two loads for each bit of static data. 101 101 */ 102 - static unsigned int uwire_idx_shift; 102 + static unsigned int uwire_idx_shift = 2; 103 103 static void __iomem *uwire_base; 104 104 105 105 static inline void uwire_write_reg(int idx, u16 val) ··· 481 481 } 482 482 clk_prepare_enable(uwire->ck); 483 483 484 - if (cpu_is_omap7xx()) 485 - uwire_idx_shift = 1; 486 - else 487 - uwire_idx_shift = 2; 488 - 489 484 uwire_write_reg(UWIRE_SR3, 1); 490 485 491 486 /* the spi->mode bits understood by this driver: */ ··· 531 536 532 537 static int __init omap_uwire_init(void) 533 538 { 534 - /* FIXME move these into the relevant board init code. also, include 535 - * H3 support; it uses tsc2101 like H2 (on a different chipselect). 536 - */ 537 - 538 - if (machine_is_omap_h2()) { 539 - /* defaults: W21 SDO, U18 SDI, V19 SCL */ 540 - omap_cfg_reg(N14_1610_UWIRE_CS0); 541 - omap_cfg_reg(N15_1610_UWIRE_CS1); 542 - } 543 539 return platform_driver_register(&uwire_driver); 544 540 } 545 541
+3 -21
drivers/usb/gadget/udc/omap_udc.c
··· 2036 2036 2037 2037 static inline int machine_without_vbus_sense(void) 2038 2038 { 2039 - return machine_is_omap_innovator() 2040 - || machine_is_omap_osk() 2041 - || machine_is_omap_palmte() 2042 - || machine_is_sx1() 2043 - /* No known omap7xx boards with vbus sense */ 2044 - || cpu_is_omap7xx(); 2039 + return machine_is_omap_osk() || machine_is_sx1(); 2045 2040 } 2046 2041 2047 2042 static int omap_udc_start(struct usb_gadget *g, ··· 2754 2759 struct clk *dc_clk = NULL; 2755 2760 struct clk *hhc_clk = NULL; 2756 2761 2757 - if (cpu_is_omap7xx()) 2758 - use_dma = 0; 2759 - 2760 2762 /* NOTE: "knows" the order of the resources! */ 2761 2763 if (!request_mem_region(pdev->resource[0].start, 2762 2764 resource_size(&pdev->resource[0]), ··· 2765 2773 if (cpu_is_omap16xx()) { 2766 2774 dc_clk = clk_get(&pdev->dev, "usb_dc_ck"); 2767 2775 hhc_clk = clk_get(&pdev->dev, "usb_hhc_ck"); 2768 - BUG_ON(IS_ERR(dc_clk) || IS_ERR(hhc_clk)); 2769 - /* can't use omap_udc_enable_clock yet */ 2770 - clk_prepare_enable(dc_clk); 2771 - clk_prepare_enable(hhc_clk); 2772 - udelay(100); 2773 - } 2774 - 2775 - if (cpu_is_omap7xx()) { 2776 - dc_clk = clk_get(&pdev->dev, "usb_dc_ck"); 2777 - hhc_clk = clk_get(&pdev->dev, "l3_ocpi_ck"); 2778 2776 BUG_ON(IS_ERR(dc_clk) || IS_ERR(hhc_clk)); 2779 2777 /* can't use omap_udc_enable_clock yet */ 2780 2778 clk_prepare_enable(dc_clk); ··· 2896 2914 goto cleanup1; 2897 2915 } 2898 2916 #endif 2899 - if (cpu_is_omap16xx() || cpu_is_omap7xx()) { 2917 + if (cpu_is_omap16xx()) { 2900 2918 udc->dc_clk = dc_clk; 2901 2919 udc->hhc_clk = hhc_clk; 2902 2920 clk_disable(hhc_clk); ··· 2915 2933 if (!IS_ERR_OR_NULL(xceiv)) 2916 2934 usb_put_phy(xceiv); 2917 2935 2918 - if (cpu_is_omap16xx() || cpu_is_omap7xx()) { 2936 + if (cpu_is_omap16xx()) { 2919 2937 clk_disable_unprepare(hhc_clk); 2920 2938 clk_disable_unprepare(dc_clk); 2921 2939 clk_put(hhc_clk);
+1 -5
drivers/usb/host/ohci-omap.c
··· 107 107 hcd->power_budget = 8; 108 108 } 109 109 110 - /* boards can use OTG transceivers in non-OTG modes */ 111 - need_transceiver = need_transceiver 112 - || machine_is_omap_h2() || machine_is_omap_h3(); 113 - 114 110 /* XXX OMAP16xx only */ 115 111 if (config->ocpi_enable) 116 112 config->ocpi_enable(); ··· 146 150 } 147 151 148 152 /* board-specific power switching and overcurrent support */ 149 - if (machine_is_omap_osk() || machine_is_omap_innovator()) { 153 + if (machine_is_omap_osk()) { 150 154 u32 rh = roothub_a (ohci); 151 155 152 156 /* power switching (ganged by default) */
+1 -90
drivers/usb/phy/phy-isp1301-omap.c
··· 77 77 78 78 /*-------------------------------------------------------------------------*/ 79 79 80 - /* board-specific PM hooks */ 81 - 82 - #if defined(CONFIG_MACH_OMAP_H2) || defined(CONFIG_MACH_OMAP_H3) 83 - 84 - #if IS_REACHABLE(CONFIG_TPS65010) 85 - 86 - #include <linux/mfd/tps65010.h> 87 - 88 - #else 89 - 90 - static inline int tps65010_set_vbus_draw(unsigned mA) 91 - { 92 - pr_debug("tps65010: draw %d mA (STUB)\n", mA); 93 - return 0; 94 - } 95 - 96 - #endif 97 - 98 - static void enable_vbus_draw(struct isp1301 *isp, unsigned mA) 99 - { 100 - int status = tps65010_set_vbus_draw(mA); 101 - if (status < 0) 102 - pr_debug(" VBUS %d mA error %d\n", mA, status); 103 - } 104 - 105 - #else 106 - 107 - static void enable_vbus_draw(struct isp1301 *isp, unsigned mA) 108 - { 109 - /* H4 controls this by DIP switch S2.4; no soft control. 110 - * ON means the charger is always enabled. Leave it OFF 111 - * unless the OTG port is used only in B-peripheral mode. 112 - */ 113 - } 114 - 115 - #endif 116 - 117 - static void enable_vbus_source(struct isp1301 *isp) 118 - { 119 - /* this board won't supply more than 8mA vbus power. 120 - * some boards can switch a 100ma "unit load" (or more). 121 - */ 122 - } 123 - 124 - 125 80 /* products will deliver OTG messages with LEDs, GUI, etc */ 126 81 static inline void notresponding(struct isp1301 *isp) 127 82 { ··· 871 916 usb_gadget_vbus_connect(isp->phy.otg->gadget); 872 917 873 918 #ifdef CONFIG_USB_OTG 874 - enable_vbus_draw(isp, 8); 875 919 otg_update_isp(isp); 876 920 #else 877 - enable_vbus_draw(isp, 100); 878 921 /* UDC driver just set OTG_BSESSVLD */ 879 922 isp1301_set_bits(isp, ISP1301_OTG_CONTROL_1, OTG1_DP_PULLUP); 880 923 isp1301_clear_bits(isp, ISP1301_OTG_CONTROL_1, OTG1_DP_PULLDOWN); ··· 900 947 a_idle(isp, "idle"); 901 948 fallthrough; 902 949 case OTG_STATE_A_IDLE: 903 - enable_vbus_source(isp); 904 950 fallthrough; 905 951 case OTG_STATE_A_WAIT_VRISE: 906 952 /* we skip over OTG_STATE_A_WAIT_BCON, since ··· 975 1023 case OTG_STATE_B_HOST: 976 1024 if (likely(isp_bstat & OTG_B_SESS_VLD)) 977 1025 break; 978 - enable_vbus_draw(isp, 0); 979 1026 #ifndef CONFIG_USB_OTG 980 1027 /* UDC driver will clear OTG_BSESSVLD */ 981 1028 isp1301_set_bits(isp, ISP1301_OTG_CONTROL_1, ··· 1234 1283 1235 1284 power_up(isp); 1236 1285 1237 - if (machine_is_omap_h2()) 1238 - isp1301_set_bits(isp, ISP1301_MODE_CONTROL_1, MC1_DAT_SE0); 1239 - 1240 1286 dev_info(&isp->client->dev, "A-Host sessions ok\n"); 1241 1287 isp1301_set_bits(isp, ISP1301_INTERRUPT_RISING, 1242 1288 INTR_ID_GND); ··· 1268 1320 1269 1321 if (!gadget) { 1270 1322 omap_writew(0, OTG_IRQ_EN); 1271 - if (!otg->default_a) 1272 - enable_vbus_draw(isp, 0); 1273 1323 usb_gadget_vbus_disconnect(otg->gadget); 1274 1324 otg->gadget = NULL; 1275 1325 power_down(isp); ··· 1298 1352 power_up(isp); 1299 1353 isp->phy.otg->state = OTG_STATE_B_IDLE; 1300 1354 1301 - if (machine_is_omap_h2() || machine_is_omap_h3()) 1302 - isp1301_set_bits(isp, ISP1301_MODE_CONTROL_1, MC1_DAT_SE0); 1303 - 1304 1355 isp1301_set_bits(isp, ISP1301_INTERRUPT_RISING, 1305 1356 INTR_SESS_VLD); 1306 1357 isp1301_set_bits(isp, ISP1301_INTERRUPT_FALLING, ··· 1322 1379 1323 1380 1324 1381 /*-------------------------------------------------------------------------*/ 1325 - 1326 - static int 1327 - isp1301_set_power(struct usb_phy *dev, unsigned mA) 1328 - { 1329 - if (!the_transceiver) 1330 - return -ENODEV; 1331 - if (dev->otg->state == OTG_STATE_B_PERIPHERAL) 1332 - enable_vbus_draw(the_transceiver, mA); 1333 - return 0; 1334 - } 1335 1382 1336 1383 static int 1337 1384 isp1301_start_srp(struct usb_otg *otg) ··· 1471 1538 } 1472 1539 #endif 1473 1540 1474 - if (machine_is_omap_h2()) { 1475 - struct gpio_desc *gpiod; 1476 - 1477 - /* full speed signaling by default */ 1478 - isp1301_set_bits(isp, ISP1301_MODE_CONTROL_1, 1479 - MC1_SPEED); 1480 - isp1301_set_bits(isp, ISP1301_MODE_CONTROL_2, 1481 - MC2_SPD_SUSP_CTRL); 1482 - 1483 - gpiod = devm_gpiod_get(&i2c->dev, NULL, GPIOD_IN); 1484 - if (IS_ERR(gpiod)) { 1485 - dev_err(&i2c->dev, "cannot obtain H2 GPIO\n"); 1486 - goto fail; 1487 - } 1488 - gpiod_set_consumer_name(gpiod, "isp1301"); 1489 - irq = gpiod_to_irq(gpiod); 1490 - isp->irq_type = IRQF_TRIGGER_FALLING; 1491 - } else { 1492 - irq = i2c->irq; 1493 - } 1541 + irq = i2c->irq; 1494 1542 1495 1543 status = request_irq(irq, isp1301_irq, 1496 1544 isp->irq_type, DRIVER_NAME, isp); ··· 1483 1569 1484 1570 isp->phy.dev = &i2c->dev; 1485 1571 isp->phy.label = DRIVER_NAME; 1486 - isp->phy.set_power = isp1301_set_power; 1487 - 1488 1572 isp->phy.otg->usb_phy = &isp->phy; 1489 1573 isp->phy.otg->set_host = isp1301_set_host; 1490 1574 isp->phy.otg->set_peripheral = isp1301_set_peripheral; 1491 1575 isp->phy.otg->start_srp = isp1301_start_srp; 1492 1576 isp->phy.otg->start_hnp = isp1301_start_hnp; 1493 1577 1494 - enable_vbus_draw(isp, 0); 1495 1578 power_down(isp); 1496 1579 the_transceiver = isp; 1497 1580
-2
drivers/video/fbdev/omap/lcdc.c
··· 706 706 707 707 if (machine_is_ams_delta()) 708 708 rate /= 4; 709 - if (machine_is_omap_h3()) 710 - rate /= 3; 711 709 r = clk_set_rate(lcdc.lcd_ck, rate); 712 710 if (r) { 713 711 dev_err(fbdev->dev, "failed to adjust LCD rate\n");
-35
include/linux/soc/ti/omap1-soc.h
··· 20 20 #undef MULTI_OMAP1 21 21 #undef OMAP_NAME 22 22 23 - #ifdef CONFIG_ARCH_OMAP730 24 - # ifdef OMAP_NAME 25 - # undef MULTI_OMAP1 26 - # define MULTI_OMAP1 27 - # else 28 - # define OMAP_NAME omap730 29 - # endif 30 - #endif 31 - #ifdef CONFIG_ARCH_OMAP850 32 - # ifdef OMAP_NAME 33 - # undef MULTI_OMAP1 34 - # define MULTI_OMAP1 35 - # else 36 - # define OMAP_NAME omap850 37 - # endif 38 - #endif 39 23 #ifdef CONFIG_ARCH_OMAP15XX 40 24 # ifdef OMAP_NAME 41 25 # undef MULTI_OMAP1 ··· 53 69 /* 54 70 * Macros to group OMAP into cpu classes. 55 71 * These can be used in most places. 56 - * cpu_is_omap7xx(): True for OMAP730, OMAP850 57 72 * cpu_is_omap15xx(): True for OMAP1510, OMAP5910 and OMAP310 58 73 * cpu_is_omap16xx(): True for OMAP1610, OMAP5912 and OMAP1710 59 74 */ ··· 72 89 return (GET_OMAP_SUBCLASS == (id)) ? 1 : 0; \ 73 90 } 74 91 75 - IS_OMAP_CLASS(7xx, 0x07) 76 92 IS_OMAP_CLASS(15xx, 0x15) 77 93 IS_OMAP_CLASS(16xx, 0x16) 78 94 79 - #define cpu_is_omap7xx() 0 80 95 #define cpu_is_omap15xx() 0 81 96 #define cpu_is_omap16xx() 0 82 97 83 98 #if defined(MULTI_OMAP1) 84 - # if defined(CONFIG_ARCH_OMAP730) 85 - # undef cpu_is_omap7xx 86 - # define cpu_is_omap7xx() is_omap7xx() 87 - # endif 88 - # if defined(CONFIG_ARCH_OMAP850) 89 - # undef cpu_is_omap7xx 90 - # define cpu_is_omap7xx() is_omap7xx() 91 - # endif 92 99 # if defined(CONFIG_ARCH_OMAP15XX) 93 100 # undef cpu_is_omap15xx 94 101 # define cpu_is_omap15xx() is_omap15xx() ··· 88 115 # define cpu_is_omap16xx() is_omap16xx() 89 116 # endif 90 117 #else 91 - # if defined(CONFIG_ARCH_OMAP730) 92 - # undef cpu_is_omap7xx 93 - # define cpu_is_omap7xx() 1 94 - # endif 95 - # if defined(CONFIG_ARCH_OMAP850) 96 - # undef cpu_is_omap7xx 97 - # define cpu_is_omap7xx() 1 98 - # endif 99 118 # if defined(CONFIG_ARCH_OMAP15XX) 100 119 # undef cpu_is_omap15xx 101 120 # define cpu_is_omap15xx() 1