Skip to content

Commit 8825acd

Browse files
committed
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>
1 parent 21a3e6e commit 8825acd

File tree

23 files changed

+36
-696
lines changed

23 files changed

+36
-696
lines changed

arch/arm/mach-omap1/clock_data.c

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -720,8 +720,6 @@ int __init omap1_clk_init(void)
720720
cpu_mask |= CK_16XX;
721721
if (cpu_is_omap1510())
722722
cpu_mask |= CK_1510;
723-
if (cpu_is_omap7xx())
724-
cpu_mask |= CK_7XX;
725723
if (cpu_is_omap310())
726724
cpu_mask |= CK_310;
727725

@@ -730,9 +728,6 @@ int __init omap1_clk_init(void)
730728
ck_dpll1_p = &ck_dpll1;
731729
ck_ref_p = &ck_ref;
732730

733-
if (cpu_is_omap7xx())
734-
ck_ref.rate = 13000000;
735-
736731
pr_info("Clocks: ARM_SYSST: 0x%04x DPLL_CTL: 0x%04x ARM_CKCTL: 0x%04x\n",
737732
omap_readw(ARM_SYSST), omap_readw(DPLL_CTL),
738733
omap_readw(ARM_CKCTL));
@@ -771,24 +766,14 @@ int __init omap1_clk_init(void)
771766
}
772767
}
773768

774-
if (machine_is_omap_perseus2() || machine_is_omap_fsample()) {
775-
/* Select slicer output as OMAP input clock */
776-
omap_writew(omap_readw(OMAP7XX_PCC_UPLD_CTRL) & ~0x1,
777-
OMAP7XX_PCC_UPLD_CTRL);
778-
}
779-
780769
/* Amstrad Delta wants BCLK high when inactive */
781770
if (machine_is_ams_delta())
782771
omap_writel(omap_readl(ULPD_CLOCK_CTRL) |
783772
(1 << SDW_MCLK_INV_BIT),
784773
ULPD_CLOCK_CTRL);
785774

786775
/* Turn off DSP and ARM_TIMXO. Make sure ARM_INTHCK is not divided */
787-
/* (on 730, bit 13 must not be cleared) */
788-
if (cpu_is_omap7xx())
789-
omap_writew(omap_readw(ARM_CKCTL) & 0x2fff, ARM_CKCTL);
790-
else
791-
omap_writew(omap_readw(ARM_CKCTL) & 0x0fff, ARM_CKCTL);
776+
omap_writew(omap_readw(ARM_CKCTL) & 0x0fff, ARM_CKCTL);
792777

793778
/* Put DSP/MPUI into reset until needed */
794779
omap_writew(0, ARM_RSTCT1);

arch/arm/mach-omap1/common.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,6 @@
3535
#include "soc.h"
3636
#include "i2c.h"
3737

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-
4638
#ifdef CONFIG_ARCH_OMAP15XX
4739
void omap1510_fpga_init_irq(void);
4840
void omap15xx_map_io(void);

arch/arm/mach-omap1/devices.c

Lines changed: 4 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@ static void omap_init_rtc(void)
6363
static inline void omap_init_rtc(void) {}
6464
#endif
6565

66-
static inline void omap_init_mbox(void) { }
67-
6866
/*-------------------------------------------------------------------------*/
6967

7068
#if IS_ENABLED(CONFIG_MMC_OMAP)
@@ -73,22 +71,16 @@ static inline void omap1_mmc_mux(struct omap_mmc_platform_data *mmc_controller,
7371
int controller_nr)
7472
{
7573
if (controller_nr == 0) {
76-
if (cpu_is_omap7xx()) {
77-
omap_cfg_reg(MMC_7XX_CMD);
78-
omap_cfg_reg(MMC_7XX_CLK);
79-
omap_cfg_reg(MMC_7XX_DAT0);
80-
} else {
81-
omap_cfg_reg(MMC_CMD);
82-
omap_cfg_reg(MMC_CLK);
83-
omap_cfg_reg(MMC_DAT0);
84-
}
74+
omap_cfg_reg(MMC_CMD);
75+
omap_cfg_reg(MMC_CLK);
76+
omap_cfg_reg(MMC_DAT0);
8577

8678
if (cpu_is_omap1710()) {
8779
omap_cfg_reg(M15_1710_MMC_CLKI);
8880
omap_cfg_reg(P19_1710_MMC_CMDDIR);
8981
omap_cfg_reg(P20_1710_MMC_DATDIR0);
9082
}
91-
if (mmc_controller->slots[0].wires == 4 && !cpu_is_omap7xx()) {
83+
if (mmc_controller->slots[0].wires == 4) {
9284
omap_cfg_reg(MMC_DAT1);
9385
/* NOTE: DAT2 can be on W10 (here) or M15 */
9486
if (!mmc_controller->slots[0].nomux)
@@ -154,8 +146,6 @@ static int __init omap_mmc_add(const char *name, int id, unsigned long base,
154146
res[3].name = "tx";
155147
res[3].flags = IORESOURCE_DMA;
156148

157-
if (cpu_is_omap7xx())
158-
data->slots[0].features = MMC_OMAP7XX;
159149
if (cpu_is_omap15xx())
160150
data->slots[0].features = MMC_OMAP15XX;
161151
if (cpu_is_omap16xx())
@@ -224,43 +214,6 @@ void __init omap1_init_mmc(struct omap_mmc_platform_data **mmc_data,
224214

225215
/*-------------------------------------------------------------------------*/
226216

227-
/* OMAP7xx SPI support */
228-
#if IS_ENABLED(CONFIG_SPI_OMAP_100K)
229-
230-
struct platform_device omap_spi1 = {
231-
.name = "omap1_spi100k",
232-
.id = 1,
233-
};
234-
235-
struct platform_device omap_spi2 = {
236-
.name = "omap1_spi100k",
237-
.id = 2,
238-
};
239-
240-
static void omap_init_spi100k(void)
241-
{
242-
if (!cpu_is_omap7xx())
243-
return;
244-
245-
omap_spi1.dev.platform_data = ioremap(OMAP7XX_SPI1_BASE, 0x7ff);
246-
if (omap_spi1.dev.platform_data)
247-
platform_device_register(&omap_spi1);
248-
249-
omap_spi2.dev.platform_data = ioremap(OMAP7XX_SPI2_BASE, 0x7ff);
250-
if (omap_spi2.dev.platform_data)
251-
platform_device_register(&omap_spi2);
252-
}
253-
254-
#else
255-
static inline void omap_init_spi100k(void)
256-
{
257-
}
258-
#endif
259-
260-
/*-------------------------------------------------------------------------*/
261-
262-
static inline void omap_init_sti(void) {}
263-
264217
/* Numbering for the SPI-capable controllers when used for SPI:
265218
* spi = 1
266219
* uwire = 2
@@ -363,10 +316,7 @@ static int __init omap1_init_devices(void)
363316
* in alphabetical order so they're easier to sort through.
364317
*/
365318

366-
omap_init_mbox();
367319
omap_init_rtc();
368-
omap_init_spi100k();
369-
omap_init_sti();
370320
omap_init_uwire();
371321
omap1_init_rng();
372322

arch/arm/mach-omap1/dma.c

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -261,22 +261,6 @@ static const struct platform_device_info omap_dma_dev_info = {
261261
.num_res = 1,
262262
};
263263

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-
280264
/* OMAP1510, OMAP1610*/
281265
static const struct dma_slave_map omap1xxx_sdma_map[] = {
282266
{ "omap-mcbsp.1", "tx", SDMA_FILTER_PARAM(8) },
@@ -371,13 +355,8 @@ static int __init omap1_system_dma_init(void)
371355
p.dma_attr = d;
372356
p.errata = configure_dma_errata();
373357

374-
if (cpu_is_omap7xx()) {
375-
p.slave_map = omap7xx_sdma_map;
376-
p.slavecnt = ARRAY_SIZE(omap7xx_sdma_map);
377-
} else {
378-
p.slave_map = omap1xxx_sdma_map;
379-
p.slavecnt = ARRAY_SIZE(omap1xxx_sdma_map);
380-
}
358+
p.slave_map = omap1xxx_sdma_map;
359+
p.slavecnt = ARRAY_SIZE(omap1xxx_sdma_map);
381360

382361
ret = platform_device_add_data(pdev, &p, sizeof(p));
383362
if (ret) {

arch/arm/mach-omap1/i2c.c

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,8 @@ static struct platform_device omap_i2c_devices[1] = {
2525

2626
static void __init omap1_i2c_mux_pins(int bus_id)
2727
{
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);
3530
}
3631

3732
int __init omap_i2c_add_bus(struct omap_i2c_bus_platform_data *pdata,
@@ -68,10 +63,7 @@ int __init omap_i2c_add_bus(struct omap_i2c_bus_platform_data *pdata,
6863

6964
/* how the cpu bus is wired up differs for 7xx only */
7065

71-
if (cpu_is_omap7xx())
72-
pdata->flags |= OMAP_I2C_FLAG_BUS_SHIFT_1;
73-
else
74-
pdata->flags |= OMAP_I2C_FLAG_BUS_SHIFT_2;
66+
pdata->flags |= OMAP_I2C_FLAG_BUS_SHIFT_2;
7567

7668
pdev->dev.platform_data = pdata;
7769

arch/arm/mach-omap1/io.c

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -22,27 +22,6 @@
2222
* The machine specific code may provide the extra mapping besides the
2323
* default mapping provided here.
2424
*/
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
4625

4726
#ifdef CONFIG_ARCH_OMAP15XX
4827
static struct map_desc omap1510_io_desc[] __initdata = {
@@ -88,13 +67,6 @@ static struct map_desc omap16xx_io_desc[] __initdata = {
8867
};
8968
#endif
9069

91-
#if defined (CONFIG_ARCH_OMAP730) || defined (CONFIG_ARCH_OMAP850)
92-
void __init omap7xx_map_io(void)
93-
{
94-
iotable_init(omap7xx_io_desc, ARRAY_SIZE(omap7xx_io_desc));
95-
}
96-
#endif
97-
9870
#ifdef CONFIG_ARCH_OMAP15XX
9971
void __init omap15xx_map_io(void)
10072
{

arch/arm/mach-omap1/irq.c

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -110,14 +110,6 @@ static void omap_irq_set_cfg(int irq, int fiq, int priority, int trigger)
110110
irq_bank_writel(val, bank, offset);
111111
}
112112

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-
121113
#ifdef CONFIG_ARCH_OMAP15XX
122114
static struct omap_irq_bank omap1510_irq_banks[] = {
123115
{ .base_reg = OMAP_IH1_BASE, .trigger_map = 0xb3febfff },
@@ -194,12 +186,6 @@ void __init omap1_init_irq(void)
194186
int i, j, irq_base;
195187
unsigned long nr_irqs;
196188

197-
#if defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850)
198-
if (cpu_is_omap7xx()) {
199-
irq_banks = omap7xx_irq_banks;
200-
irq_bank_count = ARRAY_SIZE(omap7xx_irq_banks);
201-
}
202-
#endif
203189
#ifdef CONFIG_ARCH_OMAP15XX
204190
if (cpu_is_omap1510()) {
205191
irq_banks = omap1510_irq_banks;
@@ -230,7 +216,7 @@ void __init omap1_init_irq(void)
230216
pr_warn("Couldn't allocate IRQ numbers\n");
231217
irq_base = 0;
232218
}
233-
omap_l2_irq = cpu_is_omap7xx() ? irq_base + 1 : irq_base;
219+
omap_l2_irq = irq_base;
234220
omap_l2_irq -= NR_IRQS_LEGACY;
235221

236222
domain = irq_domain_add_legacy(NULL, nr_irqs, irq_base, 0,
@@ -249,10 +235,6 @@ void __init omap1_init_irq(void)
249235
irq_bank_writel(0x03, 0, IRQ_CONTROL_REG_OFFSET);
250236
irq_bank_writel(0x03, 1, IRQ_CONTROL_REG_OFFSET);
251237

252-
/* Enable interrupts in global mask */
253-
if (cpu_is_omap7xx())
254-
irq_bank_writel(0x0, 0, IRQ_GMR_REG_OFFSET);
255-
256238
/* Install the interrupt handlers for each bank */
257239
for (i = 0; i < irq_bank_count; i++) {
258240
for (j = i * 32; j < (i + 1) * 32; j++) {

arch/arm/mach-omap1/irqs.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -231,15 +231,6 @@
231231
#define IH_MPUIO_BASE (OMAP_MAX_GPIO_LINES + IH_GPIO_BASE)
232232
#define OMAP_IRQ_END (IH_MPUIO_BASE + 16)
233233

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-
243234
#define OMAP_IRQ_BIT(irq) (1 << ((irq - NR_IRQS_LEGACY) % 32))
244235

245236
#ifdef CONFIG_FIQ

0 commit comments

Comments
 (0)