diff -uprN u-boot-orig/cpu/at32ap7xxx/ap7000/devices.c u-boot/cpu/at32ap7xxx/ap7000/devices.c --- u-boot-orig/cpu/at32ap7xxx/ap7000/devices.c 2007-01-01 19:26:46.000000000 +0100 +++ u-boot/cpu/at32ap7xxx/ap7000/devices.c 2006-12-22 14:51:26.000000000 +0100 @@ -223,6 +223,46 @@ static const struct resource macb1_resou }, }; #endif +#if defined(CFG_SPI0) +static const struct resource spi0_resource[] = { + { + .type = RESOURCE_CLOCK, + .u = { + .clock = { CLOCK_APBA, 0 }, + }, + }, { + .type = RESOURCE_GPIO, + .u = { + .gpio = { 6, DEVICE_PIOA, GPIO_FUNC_A, 0 }, + }, + }, { + .type = RESOURCE_GPIO, + .u = { + .gpio = { 1, DEVICE_PIOA, GPIO_FUNC_B, 20 }, + }, + }, +}; +#endif +#if defined(CFG_SPI1) +static const struct resource spi1_resource[] = { + { + .type = RESOURCE_CLOCK, + .u = { + .clock = { CLOCK_APBA, 1 }, + }, + }, { + .type = RESOURCE_GPIO, + .u = { + .gpio = { 6, DEVICE_PIOB, GPIO_FUNC_B, 0 }, + }, + }, { + .type = RESOURCE_GPIO, + .u = { + .gpio = { 1, DEVICE_PIOA, GPIO_FUNC_A, 27 }, + }, + }, +}; +#endif #if defined(CFG_LCDC) static const struct resource lcdc_resource[] = { { @@ -230,6 +270,16 @@ static const struct resource lcdc_resour .u = { .clock = { CLOCK_AHB, 7 }, }, + }, { + .type = RESOURCE_GPIO, + .u = { + .gpio = { 13, DEVICE_PIOC, GPIO_FUNC_A, 19 }, + }, + }, { + .type = RESOURCE_GPIO, + .u = { + .gpio = { 18, DEVICE_PIOD, GPIO_FUNC_A, 0 }, + }, }, }; #endif @@ -390,6 +440,20 @@ const struct device chip_device[] = { .resource = macb0_resource, }, #endif +#if defined(CFG_SPI0) + [DEVICE_SPI0] = { + .regs = (void *)SPI0_BASE, + .nr_resources = ARRAY_SIZE(spi0_resource), + .resource = spi0_resource, + }, +#endif +#if defined(CFG_SPI1) + [DEVICE_SPI1] = { + .regs = (void *)SPI1_BASE, + .nr_resources = ARRAY_SIZE(spi1_resource), + .resource = spi1_resource, + }, +#endif #if defined(CFG_MACB1) [DEVICE_MACB1] = { .regs = (void *)MACB1_BASE, @@ -399,6 +463,7 @@ const struct device chip_device[] = { #endif #if defined(CFG_LCDC) [DEVICE_LCDC] = { + .regs = (void *)LCDC_BASE, .nr_resources = ARRAY_SIZE(lcdc_resource), .resource = lcdc_resource, }, diff -uprN u-boot-orig/include/asm-avr32/arch-ap7000/platform.h u-boot/include/asm-avr32/arch-ap7000/platform.h --- u-boot-orig/include/asm-avr32/arch-ap7000/platform.h 2007-01-01 19:26:46.000000000 +0100 +++ u-boot/include/asm-avr32/arch-ap7000/platform.h 2006-12-22 14:20:39.000000000 +0100 @@ -66,6 +66,12 @@ enum device_id { #if defined(CFG_MACB1) DEVICE_MACB1, #endif +#if defined(CFG_SPI0) + DEVICE_SPI0, +#endif +#if defined(CFG_SPI1) + DEVICE_SPI1, +#endif #if defined(CFG_LCDC) DEVICE_LCDC, #endif