Commit 5297e1d7 authored by Suman Anna's avatar Suman Anna Committed by Tony Lindgren
Browse files

ARM: OMAP2+: Cleanup omap_i2c_dev_attr usage



The omap_i2c_dev_attr data was used to supply instance-specific
data for legacy non-DT devices. The I2C legacy device support has
been cleaned up in commit 65fa3e71 ("ARM: OMAP2+: Remove legacy
i2c.c platform init code") and this data is therefore no longer
needed. So, cleanup the structure and all the associated data in
various hwmod data files.

The i2c-omap.h header is still needed because of the need for
various OMAP_I2C_IP_VERSION_x macros.

Signed-off-by: default avatarSuman Anna <s-anna@ti.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent a0e37da2
Loading
Loading
Loading
Loading
+0 −13
Original line number Diff line number Diff line
@@ -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 */
+0 −9
Original line number Diff line number Diff line
@@ -97,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",
@@ -116,7 +109,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
@@ -137,7 +129,6 @@ static struct omap_hwmod omap2420_i2c2_hwmod = {
		},
	},
	.class		= &i2c_class,
	.dev_attr	= &i2c_dev_attr,
	.flags		= HWMOD_16BIT_REG,
};

+0 −8
Original line number Diff line number Diff line
@@ -75,12 +75,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",
@@ -102,7 +96,6 @@ static struct omap_hwmod omap2430_i2c1_hwmod = {
		},
	},
	.class		= &i2c_class,
	.dev_attr	= &i2c_dev_attr,
};

/* I2C2 */
@@ -118,7 +111,6 @@ static struct omap_hwmod omap2430_i2c2_hwmod = {
		},
	},
	.class		= &i2c_class,
	.dev_attr	= &i2c_dev_attr,
};

/* gpio5 */
+0 −7
Original line number Diff line number Diff line
@@ -647,10 +647,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",
@@ -663,7 +659,6 @@ struct omap_hwmod am33xx_i2c1_hwmod = {
			.modulemode	= MODULEMODE_SWCTRL,
		},
	},
	.dev_attr	= &i2c_dev_attr,
};

/* i2c1 */
@@ -678,7 +673,6 @@ struct omap_hwmod am33xx_i2c2_hwmod = {
			.modulemode	= MODULEMODE_SWCTRL,
		},
	},
	.dev_attr	= &i2c_dev_attr,
};

/* i2c3 */
@@ -693,7 +687,6 @@ struct omap_hwmod am33xx_i2c3_hwmod = {
			.modulemode	= MODULEMODE_SWCTRL,
		},
	},
	.dev_attr	= &i2c_dev_attr,
};

/*
+0 −20
Original line number Diff line number Diff line
@@ -682,11 +682,6 @@ static struct omap_hwmod omap3xxx_dss_venc_hwmod = {
};

/* I2C1 */
static struct omap_i2c_dev_attr i2c1_dev_attr = {
	.fifo_depth	= 8, /* bytes */
	.flags		= OMAP_I2C_FLAG_BUS_SHIFT_2,
};

static struct omap_hwmod omap3xxx_i2c1_hwmod = {
	.name		= "i2c1",
	.flags		= HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
@@ -699,15 +694,9 @@ static struct omap_hwmod omap3xxx_i2c1_hwmod = {
		},
	},
	.class		= &i2c_class,
	.dev_attr	= &i2c1_dev_attr,
};

/* I2C2 */
static struct omap_i2c_dev_attr i2c2_dev_attr = {
	.fifo_depth	= 8, /* bytes */
	.flags = OMAP_I2C_FLAG_BUS_SHIFT_2,
};

static struct omap_hwmod omap3xxx_i2c2_hwmod = {
	.name		= "i2c2",
	.flags		= HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
@@ -720,17 +709,9 @@ static struct omap_hwmod omap3xxx_i2c2_hwmod = {
		},
	},
	.class		= &i2c_class,
	.dev_attr	= &i2c2_dev_attr,
};

/* I2C3 */
static struct omap_i2c_dev_attr i2c3_dev_attr = {
	.fifo_depth	= 64, /* bytes */
	.flags = OMAP_I2C_FLAG_BUS_SHIFT_2,
};



static struct omap_hwmod omap3xxx_i2c3_hwmod = {
	.name		= "i2c3",
	.flags		= HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
@@ -743,7 +724,6 @@ static struct omap_hwmod omap3xxx_i2c3_hwmod = {
		},
	},
	.class		= &i2c_class,
	.dev_attr	= &i2c3_dev_attr,
};

/*
Loading