X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fppc%2Fplatforms%2F4xx%2Fredwood5.c;h=edf4d37d1a5251f5f650aec7cbf7776b45580cc4;hb=97bf2856c6014879bd04983a3e9dfcdac1e7fe85;hp=85f0a0f82d3b1b323da757cda2bb452941437a88;hpb=9213980e6a70d8473e0ffd4b39ab5b6caaba9ff5;p=linux-2.6.git diff --git a/arch/ppc/platforms/4xx/redwood5.c b/arch/ppc/platforms/4xx/redwood5.c index 85f0a0f82..edf4d37d1 100644 --- a/arch/ppc/platforms/4xx/redwood5.c +++ b/arch/ppc/platforms/4xx/redwood5.c @@ -1,6 +1,4 @@ /* - * arch/ppc/platforms/4xx/redwood5.c - * * Support for the IBM redwood5 eval board file * * Author: Armin Kuster @@ -11,11 +9,55 @@ * or implied. */ -#include #include #include +#include +#include #include #include +#include + +/* + * Define external IRQ senses and polarities. + */ +unsigned char ppc4xx_uic_ext_irq_cfg[] __initdata = { + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* Ext Int 0 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* Ext Int 1 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* Ext Int 2 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* Ext Int 3 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* Ext Int 4 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* Ext Int 5 */ +}; + +static struct resource smc91x_resources[] = { + [0] = { + .start = SMC91111_BASE_ADDR, + .end = SMC91111_BASE_ADDR + SMC91111_REG_SIZE - 1, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = SMC91111_IRQ, + .end = SMC91111_IRQ, + .flags = IORESOURCE_IRQ, + }, +}; + +static struct platform_device smc91x_device = { + .name = "smc91x", + .id = 0, + .num_resources = ARRAY_SIZE(smc91x_resources), + .resource = smc91x_resources, +}; + +static struct platform_device *redwood5_devs[] __initdata = { + &smc91x_device, +}; + +static int __init +redwood5_platform_add_devices(void) +{ + return platform_add_devices(redwood5_devs, ARRAY_SIZE(redwood5_devs)); +} void __init redwood5_setup_arch(void) @@ -44,7 +86,7 @@ redwood5_setup_arch(void) printk("\n"); #endif - + device_initcall(redwood5_platform_add_devices); } void __init