Merge branch 'fix' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6
[safe/jmp/linux-2.6] / arch / arm / mach-u300 / core.c
index 89b3ccf..653e25b 100644 (file)
@@ -32,6 +32,8 @@
 
 #include "clock.h"
 #include "mmc.h"
+#include "spi.h"
+#include "i2c.h"
 
 /*
  * Static I/O mappings that are needed for booting the U300 platforms. The
@@ -378,14 +380,14 @@ static struct platform_device wdog_device = {
 };
 
 static struct platform_device i2c0_device = {
-       .name = "stddci2c",
+       .name = "stu300",
        .id = 0,
        .num_resources = ARRAY_SIZE(i2c0_resources),
        .resource = i2c0_resources,
 };
 
 static struct platform_device i2c1_device = {
-       .name = "stddci2c",
+       .name = "stu300",
        .id = 1,
        .num_resources = ARRAY_SIZE(i2c1_resources),
        .resource = i2c1_resources,
@@ -406,7 +408,7 @@ static struct platform_device keypad_device = {
 };
 
 static struct platform_device rtc_device = {
-       .name = "rtc0",
+       .name = "rtc-coh901331",
        .id = -1,
        .num_resources = ARRAY_SIZE(rtc_resources),
        .resource = rtc_resources,
@@ -455,8 +457,8 @@ void __init u300_init_irq(void)
        for (i = 0; i < NR_IRQS; i++)
                set_bit(i, (unsigned long *) &mask[0]);
        u300_enable_intcon_clock();
-       vic_init((void __iomem *) U300_INTCON0_VBASE, 0, mask[0], 0);
-       vic_init((void __iomem *) U300_INTCON1_VBASE, 32, mask[1], 0);
+       vic_init((void __iomem *) U300_INTCON0_VBASE, 0, mask[0], mask[0]);
+       vic_init((void __iomem *) U300_INTCON1_VBASE, 32, mask[1], mask[1]);
 }
 
 
@@ -510,7 +512,7 @@ static struct db_chip db_chips[] __initdata = {
        }
 };
 
-static void u300_init_check_chip(void)
+static void __init u300_init_check_chip(void)
 {
 
        u16 val;
@@ -611,6 +613,8 @@ void __init u300_init_devices(void)
        /* Wait for the PLL208 to lock if not locked in yet */
        while (!(readw(U300_SYSCON_VBASE + U300_SYSCON_CSR) &
                 U300_SYSCON_CSR_PLL208_LOCK_IND));
+       /* Initialize SPI device with some board specifics */
+       u300_spi_init(&pl022_device);
 
        /* Register the AMBA devices in the AMBA bus abstraction layer */
        u300_clock_primecells();
@@ -622,6 +626,12 @@ void __init u300_init_devices(void)
 
        u300_assign_physmem();
 
+       /* Register subdevices on the I2C buses */
+       u300_i2c_register_board_devices();
+
+       /* Register subdevices on the SPI bus */
+       u300_spi_register_board_devices();
+
        /* Register the platform devices */
        platform_add_devices(platform_devs, ARRAY_SIZE(platform_devs));