Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux...
[pandora-kernel.git] / arch / sh / kernel / cpu / sh4a / setup-sh7780.c
index 0f41486..08add7f 100644 (file)
@@ -20,6 +20,8 @@
 static struct plat_sci_port scif0_platform_data = {
        .mapbase        = 0xffe00000,
        .flags          = UPF_BOOT_AUTOCONF,
+       .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_CKE1,
+       .scbrr_algo_id  = SCBRR_ALGO_1,
        .type           = PORT_SCIF,
        .irqs           = { 40, 40, 40, 40 },
 };
@@ -35,6 +37,8 @@ static struct platform_device scif0_device = {
 static struct plat_sci_port scif1_platform_data = {
        .mapbase        = 0xffe10000,
        .flags          = UPF_BOOT_AUTOCONF,
+       .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_CKE1,
+       .scbrr_algo_id  = SCBRR_ALGO_1,
        .type           = PORT_SCIF,
        .irqs           = { 76, 76, 76, 76 },
 };
@@ -379,6 +383,7 @@ static int __init sh7780_devices_setup(void)
                                    ARRAY_SIZE(sh7780_devices));
 }
 arch_initcall(sh7780_devices_setup);
+
 static struct platform_device *sh7780_early_devices[] __initdata = {
        &scif0_device,
        &scif1_device,
@@ -392,6 +397,13 @@ static struct platform_device *sh7780_early_devices[] __initdata = {
 
 void __init plat_early_device_setup(void)
 {
+       if (mach_is_sh2007()) {
+               scif0_platform_data.scscr &= ~SCSCR_CKE1;
+               scif0_platform_data.scbrr_algo_id = SCBRR_ALGO_2;
+               scif1_platform_data.scscr &= ~SCSCR_CKE1;
+               scif1_platform_data.scbrr_algo_id = SCBRR_ALGO_2;
+       }
+
        early_platform_add_devices(sh7780_early_devices,
                                   ARRAY_SIZE(sh7780_early_devices));
 }