Skip to content

Commit

Permalink
ARM: OMAP2+: Remove unused platform init code and headers
Browse files Browse the repository at this point in the history
After converting mach-omap2 to boot with device tree only,
we can now remove some more unused platform init code and
headers:

- omap4-keypad related functions are no longer needed with
  with device tree

- board-rx51.h and hsmmc.h are now unused, and board-rx51.c
  has some unneded headers

- serial.h is no longer needed

- i2c_dev_attr is now set in the driver based on the
  compatible flag, and fifo_depth is unused

Signed-off-by: Tony Lindgren <[email protected]>
  • Loading branch information
tmlind committed Dec 8, 2013
1 parent 23b40b5 commit 736e812
Show file tree
Hide file tree
Showing 19 changed files with 0 additions and 273 deletions.
2 changes: 0 additions & 2 deletions arch/arm/mach-omap2/am33xx-restart.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#include <linux/kernel.h>
#include <linux/reboot.h>

#include "common.h"
#include "prm-regbits-33xx.h"
Expand Down
5 changes: 0 additions & 5 deletions arch/arm/mach-omap2/board-n8x0.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include <linux/init.h>
#include <linux/io.h>
#include <linux/irq.h>
#include <linux/stddef.h>
#include <linux/i2c.h>
#include <linux/spi/spi.h>
#include <linux/usb/musb.h>
Expand All @@ -26,13 +25,9 @@
#include <linux/mfd/menelaus.h>
#include <sound/tlv320aic3x.h>

#include <asm/mach/arch.h>
#include <asm/mach-types.h>

#include "common.h"
#include "mmc.h"
#include "soc.h"
#include "gpmc-onenand.h"

#define TUSB6010_ASYNC_CS 1
#define TUSB6010_SYNC_CS 4
Expand Down
11 changes: 0 additions & 11 deletions arch/arm/mach-omap2/board-rx51.h

This file was deleted.

6 changes: 0 additions & 6 deletions arch/arm/mach-omap2/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,12 @@

#include <linux/irq.h>
#include <linux/delay.h>
#include <linux/i2c.h>
#include <linux/i2c/twl.h>
#include <linux/i2c-omap.h>
#include <linux/reboot.h>

#include <asm/proc-fns.h>

#include "i2c.h"
#include "serial.h"

#include "usb.h"

#define OMAP_INTC_START NR_IRQS

#if defined(CONFIG_PM) && defined(CONFIG_ARCH_OMAP2)
Expand Down
32 changes: 0 additions & 32 deletions arch/arm/mach-omap2/devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include <linux/slab.h>
#include <linux/of.h>
#include <linux/pinctrl/machine.h>
#include <linux/platform_data/omap4-keypad.h>
#include <linux/platform_data/mailbox-omap.h>

#include <asm/mach-types.h>
Expand All @@ -29,7 +28,6 @@
#include "iomap.h"
#include "omap_hwmod.h"
#include "omap_device.h"
#include "omap4-keypad.h"

#include "soc.h"
#include "common.h"
Expand Down Expand Up @@ -251,36 +249,6 @@ static inline void omap_init_camera(void)
#endif
}

int __init omap4_keyboard_init(struct omap4_keypad_platform_data
*sdp4430_keypad_data, struct omap_board_data *bdata)
{
struct platform_device *pdev;
struct omap_hwmod *oh;
struct omap4_keypad_platform_data *keypad_data;
unsigned int id = -1;
char *oh_name = "kbd";
char *name = "omap4-keypad";

oh = omap_hwmod_lookup(oh_name);
if (!oh) {
pr_err("Could not look up %s\n", oh_name);
return -ENODEV;
}

keypad_data = sdp4430_keypad_data;

pdev = omap_device_build(name, id, oh, keypad_data,
sizeof(struct omap4_keypad_platform_data));

if (IS_ERR(pdev)) {
WARN(1, "Can't build omap_device for %s:%s.\n",
name, oh->name);
return PTR_ERR(pdev);
}

return 0;
}

#if defined(CONFIG_OMAP2PLUS_MBOX) || defined(CONFIG_OMAP2PLUS_MBOX_MODULE)
static inline void __init omap_init_mbox(void)
{
Expand Down
53 changes: 0 additions & 53 deletions arch/arm/mach-omap2/hsmmc.h

This file was deleted.

13 changes: 0 additions & 13 deletions arch/arm/mach-omap2/i2c.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,6 @@
#ifndef __MACH_OMAP2_I2C_H
#define __MACH_OMAP2_I2C_H

/**
* i2c_dev_attr - OMAP I2C controller device attributes for omap_hwmod
* @fifo_depth: total controller FIFO size (in bytes)
* @flags: differences in hardware support capability
*
* @fifo_depth represents what exists on the hardware, not what is
* actually configured at runtime by the device driver.
*/
struct omap_i2c_dev_attr {
u8 fifo_depth;
u32 flags;
};

int omap_i2c_reset(struct omap_hwmod *oh);

#endif /* __MACH_OMAP2_I2C_H */
66 changes: 0 additions & 66 deletions arch/arm/mach-omap2/include/mach/serial.h

This file was deleted.

1 change: 0 additions & 1 deletion arch/arm/mach-omap2/io.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
#include "omap-pm.h"
#include "sdrc.h"
#include "control.h"
#include "serial.h"
#include "sram.h"
#include "cm2xxx.h"
#include "cm3xxx.h"
Expand Down
8 changes: 0 additions & 8 deletions arch/arm/mach-omap2/omap4-keypad.h

This file was deleted.

10 changes: 0 additions & 10 deletions arch/arm/mach-omap2/omap_hwmod_2420_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#include "prm-regbits-24xx.h"
#include "i2c.h"
#include "mmc.h"
#include "serial.h"
#include "wd_timer.h"

/*
Expand Down Expand Up @@ -98,13 +97,6 @@ static struct omap_hwmod_class i2c_class = {
.reset = &omap_i2c_reset,
};

static struct omap_i2c_dev_attr i2c_dev_attr = {
.flags = OMAP_I2C_FLAG_NO_FIFO |
OMAP_I2C_FLAG_SIMPLE_CLOCK |
OMAP_I2C_FLAG_16BIT_DATA_REG |
OMAP_I2C_FLAG_BUS_SHIFT_2,
};

/* I2C1 */
static struct omap_hwmod omap2420_i2c1_hwmod = {
.name = "i2c1",
Expand All @@ -119,7 +111,6 @@ static struct omap_hwmod omap2420_i2c1_hwmod = {
},
},
.class = &i2c_class,
.dev_attr = &i2c_dev_attr,
/*
* From mach-omap2/pm24xx.c: "Putting MPU into the WFI state
* while a transfer is active seems to cause the I2C block to
Expand All @@ -142,7 +133,6 @@ static struct omap_hwmod omap2420_i2c2_hwmod = {
},
},
.class = &i2c_class,
.dev_attr = &i2c_dev_attr,
.flags = HWMOD_16BIT_REG,
};

Expand Down
8 changes: 0 additions & 8 deletions arch/arm/mach-omap2/omap_hwmod_2430_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,6 @@ static struct omap_hwmod_class i2c_class = {
.reset = &omap_i2c_reset,
};

static struct omap_i2c_dev_attr i2c_dev_attr = {
.fifo_depth = 8, /* bytes */
.flags = OMAP_I2C_FLAG_BUS_SHIFT_2 |
OMAP_I2C_FLAG_FORCE_19200_INT_CLK,
};

/* I2C1 */
static struct omap_hwmod omap2430_i2c1_hwmod = {
.name = "i2c1",
Expand All @@ -105,7 +99,6 @@ static struct omap_hwmod omap2430_i2c1_hwmod = {
},
},
.class = &i2c_class,
.dev_attr = &i2c_dev_attr,
};

/* I2C2 */
Expand All @@ -123,7 +116,6 @@ static struct omap_hwmod omap2430_i2c2_hwmod = {
},
},
.class = &i2c_class,
.dev_attr = &i2c_dev_attr,
};

/* gpio5 */
Expand Down
1 change: 0 additions & 1 deletion arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include "omap_hwmod.h"
#include "l3_2xxx.h"
#include "l4_2xxx.h"
#include "serial.h"

#include "omap_hwmod_common_data.h"

Expand Down
7 changes: 0 additions & 7 deletions arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -695,10 +695,6 @@ static struct omap_hwmod_class i2c_class = {
.reset = &omap_i2c_reset,
};

static struct omap_i2c_dev_attr i2c_dev_attr = {
.flags = OMAP_I2C_FLAG_BUS_SHIFT_NONE,
};

/* i2c1 */
struct omap_hwmod am33xx_i2c1_hwmod = {
.name = "i2c1",
Expand All @@ -711,7 +707,6 @@ struct omap_hwmod am33xx_i2c1_hwmod = {
.modulemode = MODULEMODE_SWCTRL,
},
},
.dev_attr = &i2c_dev_attr,
};

/* i2c1 */
Expand All @@ -726,7 +721,6 @@ struct omap_hwmod am33xx_i2c2_hwmod = {
.modulemode = MODULEMODE_SWCTRL,
},
},
.dev_attr = &i2c_dev_attr,
};

/* i2c3 */
Expand All @@ -741,7 +735,6 @@ struct omap_hwmod am33xx_i2c3_hwmod = {
.modulemode = MODULEMODE_SWCTRL,
},
},
.dev_attr = &i2c_dev_attr,
};

/*
Expand Down
Loading

0 comments on commit 736e812

Please sign in to comment.