X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=arch%2Farm%2Fmach-s3c2440%2Fmach-anubis.c;h=441f4bc094729a8a04d82cdf699a74007dec7163;hb=af7a535688a758d15f06a98833e6a143b29af9de;hp=47258915a2f9da5a2208ca5581cc60e8b551a197;hpb=96916090f488986a4ebb8e9ffa6a3b50881d5ccd;p=linux-2.6 diff --git a/arch/arm/mach-s3c2440/mach-anubis.c b/arch/arm/mach-s3c2440/mach-anubis.c index 47258915a2..441f4bc094 100644 --- a/arch/arm/mach-s3c2440/mach-anubis.c +++ b/arch/arm/mach-s3c2440/mach-anubis.c @@ -1,6 +1,6 @@ /* linux/arch/arm/mach-s3c2440/mach-anubis.c * - * Copyright (c) 2003-2005 Simtec Electronics + * Copyright (c) 2003-2005,2008 Simtec Electronics * http://armlinux.simtec.co.uk/ * Ben Dooks * @@ -17,6 +17,8 @@ #include #include #include +#include +#include #include #include @@ -25,19 +27,19 @@ #include #include -#include -#include -#include +#include +#include +#include -#include +#include #include #include #include #include -#include -#include -#include +#include +#include +#include #include #include @@ -241,14 +243,18 @@ static struct s3c2410_platform_nand anubis_nand_info = { /* IDE channels */ +struct pata_platform_info anubis_ide_platdata = { + .ioport_shift = 5, +}; + static struct resource anubis_ide0_resource[] = { { .start = S3C2410_CS3, .end = S3C2410_CS3 + (8*32) - 1, .flags = IORESOURCE_MEM, }, { - .start = S3C2410_CS3 + (1<<26), - .end = S3C2410_CS3 + (1<<26) + (8*32) - 1, + .start = S3C2410_CS3 + (1<<26) + (6*32), + .end = S3C2410_CS3 + (1<<26) + (7*32) - 1, .flags = IORESOURCE_MEM, }, { .start = IRQ_IDE0, @@ -258,10 +264,14 @@ static struct resource anubis_ide0_resource[] = { }; static struct platform_device anubis_device_ide0 = { - .name = "simtec-ide", + .name = "pata_platform", .id = 0, .num_resources = ARRAY_SIZE(anubis_ide0_resource), .resource = anubis_ide0_resource, + .dev = { + .platform_data = &anubis_ide_platdata, + .coherent_dma_mask = ~0, + }, }; static struct resource anubis_ide1_resource[] = { @@ -270,8 +280,8 @@ static struct resource anubis_ide1_resource[] = { .end = S3C2410_CS4 + (8*32) - 1, .flags = IORESOURCE_MEM, }, { - .start = S3C2410_CS4 + (1<<26), - .end = S3C2410_CS4 + (1<<26) + (8*32) - 1, + .start = S3C2410_CS4 + (1<<26) + (6*32), + .end = S3C2410_CS4 + (1<<26) + (7*32) - 1, .flags = IORESOURCE_MEM, }, { .start = IRQ_IDE0, @@ -280,12 +290,15 @@ static struct resource anubis_ide1_resource[] = { }, }; - static struct platform_device anubis_device_ide1 = { - .name = "simtec-ide", + .name = "pata_platform", .id = 1, .num_resources = ARRAY_SIZE(anubis_ide1_resource), .resource = anubis_ide1_resource, + .dev = { + .platform_data = &anubis_ide_platdata, + .coherent_dma_mask = ~0, + }, }; /* Asix AX88796 10/100 ethernet controller */ @@ -401,7 +414,7 @@ static struct platform_device *anubis_devices[] __initdata = { &anubis_device_sm501, }; -static struct clk *anubis_clocks[] = { +static struct clk *anubis_clocks[] __initdata = { &s3c24xx_dclk0, &s3c24xx_dclk1, &s3c24xx_clkout0, @@ -409,6 +422,15 @@ static struct clk *anubis_clocks[] = { &s3c24xx_uclk, }; +/* I2C devices. */ + +static struct i2c_board_info anubis_i2c_devs[] __initdata = { + { + I2C_BOARD_INFO("tps65011", 0x48), + .irq = IRQ_EINT20, + } +}; + static void __init anubis_map_io(void) { /* initialise the clocks */ @@ -448,6 +470,9 @@ static void __init anubis_map_io(void) static void __init anubis_init(void) { platform_add_devices(anubis_devices, ARRAY_SIZE(anubis_devices)); + + i2c_register_board_info(0, anubis_i2c_devs, + ARRAY_SIZE(anubis_i2c_devs)); }