diff options
| author | Deepak Saxena <dsaxena@plexity.net> | 2005-01-05 23:05:54 -0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <greg@kroah.com> | 2005-01-05 23:05:54 -0800 |
| commit | 57683a86839aaba3b861c3baa0da94a6140e0c36 (patch) | |
| tree | 3a88563b121d76fd26a14f60ccf703ddf24578f4 /fs/jbd/commit.c | |
| parent | 3e4e417311ebcb8499a8ee10c23e8b59ee97a4d6 (diff) | |
[PATCH] Update IOP3xx I2C bus driver
The following patch is a major cleanup of the IOP3xx I2C bus driver
that is found on Intel's IOP and IXP chipsets. The existing driver in
the 2.6 tree uses hardcoded I/O addresses based on board configuration
which is just going to get ugly as more chips use this unit. The update
switches to using the driver model and passing in the I/O addresses
via platform_device resources. The patch also updates the ID name to
more closely match the actual usage of the device.
I have tested this new driver on IXP46x systems and Dave Jiang has
tested it on both IOP321 and IOP331 systems. ARM-specific patches
to provide platform-level hooks will go upstream after this patch
is integrated.
An example of using the new driver (from IXP46x ARM code) follows:
static struct resource ixp46x_i2c_resources[] = {
[0] = {
.start = 0xc8011000,
.end = 0xc801101c,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = IRQ_IXP4XX_I2C,
.end = IRQ_IXP4XX_I2C,
.flags = IORESOURCE_IRQ
}
};
static struct platform_device ixp46x_i2c_controller = {
.name = "IOP3xx-I2C",
.id = 0,
.num_resources = 2,
.resource = &ixp46x_i2c_resources
};
static struct platform_device *ixp46x_devices[] __initdata = {
&ixp46x_i2c_controller
};
void __init ixp4xx_init(void)
{
if (cpu_is_ixp46x()) {
platform_add_devices(ixp46x_devices,
ARRAY_SIZE(ixp46x_devices));
}
}
Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Diffstat (limited to 'fs/jbd/commit.c')
0 files changed, 0 insertions, 0 deletions
