Merge branch 'common/serial-rework' into sh-latest
authorPaul Mundt <lethal@linux-sh.org>
Thu, 13 Jan 2011 06:21:27 +0000 (15:21 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Thu, 13 Jan 2011 06:21:27 +0000 (15:21 +0900)
1  2 
arch/sh/kernel/cpu/sh4a/setup-sh7343.c
arch/sh/kernel/cpu/sh4a/setup-sh7366.c
arch/sh/kernel/cpu/sh4a/setup-sh7722.c
arch/sh/kernel/cpu/sh4a/setup-sh7723.c
arch/sh/kernel/cpu/sh4a/setup-sh7724.c

index b8e5bc80aa4a3f08cd46353df432f3019b46349e,0d1be5d1fb86976612474f860e044f4efc78dd84..1b8848317e9c1bc65b90b7aa101215f9592f30f6
@@@ -19,6 -19,8 +19,8 @@@
  static struct plat_sci_port scif0_platform_data = {
        .mapbase        = 0xffe00000,
        .flags          = UPF_BOOT_AUTOCONF,
+       .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_CKE1,
+       .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
        .irqs           = { 80, 80, 80, 80 },
  };
@@@ -34,6 -36,8 +36,8 @@@ static struct platform_device scif0_dev
  static struct plat_sci_port scif1_platform_data = {
        .mapbase        = 0xffe10000,
        .flags          = UPF_BOOT_AUTOCONF,
+       .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_CKE1,
+       .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
        .irqs           = { 81, 81, 81, 81 },
  };
@@@ -49,6 -53,8 +53,8 @@@ static struct platform_device scif1_dev
  static struct plat_sci_port scif2_platform_data = {
        .mapbase        = 0xffe20000,
        .flags          = UPF_BOOT_AUTOCONF,
+       .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_CKE1,
+       .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
        .irqs           = { 82, 82, 82, 82 },
  };
@@@ -64,6 -70,8 +70,8 @@@ static struct platform_device scif2_dev
  static struct plat_sci_port scif3_platform_data = {
        .mapbase        = 0xffe30000,
        .flags          = UPF_BOOT_AUTOCONF,
+       .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_CKE1,
+       .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
        .irqs           = { 83, 83, 83, 83 },
  };
@@@ -360,8 -368,6 +368,8 @@@ void __init plat_early_device_setup(voi
  
  enum {
        UNUSED = 0,
 +      ENABLED,
 +      DISABLED,
  
        /* interrupt sources */
        IRQ0, IRQ1, IRQ2, IRQ3, IRQ4, IRQ5, IRQ6, IRQ7,
        I2C0_ALI, I2C0_TACKI, I2C0_WAITI, I2C0_DTEI,
        I2C1_ALI, I2C1_TACKI, I2C1_WAITI, I2C1_DTEI,
        SIM_TEI, SIM_TXI, SIM_RXI, SIM_ERI,
 -      IRDA,
 -      SDHI0, SDHI1, SDHI2, SDHI3,
 -      CMT, TSIF, SIU,
 +      IRDA, SDHI, CMT, TSIF, SIU,
        TMU0, TMU1, TMU2,
        JPU, LCDC,
  
        /* interrupt groups */
  
 -      DMAC0123, VIOVOU, MMC, DMAC45, FLCTL, I2C0, I2C1, SIM, SDHI, USB,
 +      DMAC0123, VIOVOU, MMC, DMAC45, FLCTL, I2C0, I2C1, SIM, USB,
  };
  
  static struct intc_vect vectors[] __initdata = {
        INTC_VECT(FLCTL_FLTREQ0I, 0xdc0), INTC_VECT(FLCTL_FLTREQ1I, 0xde0),
        INTC_VECT(I2C0_ALI, 0xe00), INTC_VECT(I2C0_TACKI, 0xe20),
        INTC_VECT(I2C0_WAITI, 0xe40), INTC_VECT(I2C0_DTEI, 0xe60),
 -      INTC_VECT(SDHI0, 0xe80), INTC_VECT(SDHI1, 0xea0),
 -      INTC_VECT(SDHI2, 0xec0), INTC_VECT(SDHI3, 0xee0),
 +      INTC_VECT(SDHI, 0xe80), INTC_VECT(SDHI, 0xea0),
 +      INTC_VECT(SDHI, 0xec0), INTC_VECT(SDHI, 0xee0),
        INTC_VECT(CMT, 0xf00), INTC_VECT(TSIF, 0xf20),
        INTC_VECT(SIU, 0xf80),
        INTC_VECT(TMU0, 0x400), INTC_VECT(TMU1, 0x420),
@@@ -431,6 -439,7 +439,6 @@@ static struct intc_group groups[] __ini
        INTC_GROUP(I2C0, I2C0_ALI, I2C0_TACKI, I2C0_WAITI, I2C0_DTEI),
        INTC_GROUP(I2C1, I2C1_ALI, I2C1_TACKI, I2C1_WAITI, I2C1_DTEI),
        INTC_GROUP(SIM, SIM_TEI, SIM_TXI, SIM_RXI, SIM_ERI),
 -      INTC_GROUP(SDHI, SDHI0, SDHI1, SDHI2, SDHI3),
        INTC_GROUP(USB, USBI0, USBI1),
  };
  
@@@ -451,7 -460,7 +459,7 @@@ static struct intc_mask_reg mask_regist
          { I2C0_DTEI, I2C0_WAITI, I2C0_TACKI, I2C0_ALI,
            FLCTL_FLTREQ1I, FLCTL_FLTREQ0I, FLCTL_FLENDI, FLCTL_FLSTEI } },
        { 0xa40800a0, 0xa40800e0, 8, /* IMR8 / IMCR8 */
 -        { SDHI3, SDHI2, SDHI1, SDHI0, 0, 0, 0, SIU } },
 +        { DISABLED, ENABLED, ENABLED, ENABLED, 0, 0, 0, SIU } },
        { 0xa40800a4, 0xa40800e4, 8, /* IMR9 / IMCR9 */
          { 0, 0, 0, CMT, 0, USBI1, USBI0 } },
        { 0xa40800a8, 0xa40800e8, 8, /* IMR10 / IMCR10 */
@@@ -487,13 -496,9 +495,13 @@@ static struct intc_mask_reg ack_registe
          { IRQ0, IRQ1, IRQ2, IRQ3, IRQ4, IRQ5, IRQ6, IRQ7 } },
  };
  
 -static DECLARE_INTC_DESC_ACK(intc_desc, "sh7343", vectors, groups,
 -                           mask_registers, prio_registers, sense_registers,
 -                           ack_registers);
 +static struct intc_desc intc_desc __initdata = {
 +      .name = "sh7343",
 +      .force_enable = ENABLED,
 +      .force_disable = DISABLED,
 +      .hw = INTC_HW_DESC(vectors, groups, mask_registers,
 +                         prio_registers, sense_registers, ack_registers),
 +};
  
  void __init plat_irq_setup(void)
  {
index 9b3a6aa9081c1f233e46c30be4ad871611907d57,f96b7eeb21ebf4b5f22ddf6cb18e68dd66814913..82616af64d62279465402d4d296171ee8f34e6be
@@@ -21,6 -21,8 +21,8 @@@
  static struct plat_sci_port scif0_platform_data = {
        .mapbase        = 0xffe00000,
        .flags          = UPF_BOOT_AUTOCONF,
+       .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
+       .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
        .irqs           = { 80, 80, 80, 80 },
  };
@@@ -319,8 -321,6 +321,8 @@@ void __init plat_early_device_setup(voi
  
  enum {
        UNUSED=0,
 +      ENABLED,
 +      DISABLED,
  
        /* interrupt sources */
        IRQ0, IRQ1, IRQ2, IRQ3, IRQ4, IRQ5, IRQ6, IRQ7,
        DENC, MSIOF,
        FLCTL_FLSTEI, FLCTL_FLENDI, FLCTL_FLTREQ0I, FLCTL_FLTREQ1I,
        I2C_ALI, I2C_TACKI, I2C_WAITI, I2C_DTEI,
 -      SDHI0, SDHI1, SDHI2, SDHI3,
 -      CMT, TSIF, SIU,
 +      SDHI, CMT, TSIF, SIU,
        TMU0, TMU1, TMU2,
        VEU2, LCDC,
  
        /* interrupt groups */
  
 -      DMAC0123, VIOVOU, MMC, DMAC45, FLCTL, I2C, SDHI,
 +      DMAC0123, VIOVOU, MMC, DMAC45, FLCTL, I2C,
  };
  
  static struct intc_vect vectors[] __initdata = {
        INTC_VECT(FLCTL_FLTREQ0I, 0xdc0), INTC_VECT(FLCTL_FLTREQ1I, 0xde0),
        INTC_VECT(I2C_ALI, 0xe00), INTC_VECT(I2C_TACKI, 0xe20),
        INTC_VECT(I2C_WAITI, 0xe40), INTC_VECT(I2C_DTEI, 0xe60),
 -      INTC_VECT(SDHI0, 0xe80), INTC_VECT(SDHI1, 0xea0),
 -      INTC_VECT(SDHI2, 0xec0), INTC_VECT(SDHI3, 0xee0),
 +      INTC_VECT(SDHI, 0xe80), INTC_VECT(SDHI, 0xea0),
 +      INTC_VECT(SDHI, 0xec0), INTC_VECT(SDHI, 0xee0),
        INTC_VECT(CMT, 0xf00), INTC_VECT(TSIF, 0xf20),
        INTC_VECT(SIU, 0xf80),
        INTC_VECT(TMU0, 0x400), INTC_VECT(TMU1, 0x420),
@@@ -382,6 -383,7 +384,6 @@@ static struct intc_group groups[] __ini
        INTC_GROUP(FLCTL, FLCTL_FLSTEI, FLCTL_FLENDI,
                   FLCTL_FLTREQ0I, FLCTL_FLTREQ1I),
        INTC_GROUP(I2C, I2C_ALI, I2C_TACKI, I2C_WAITI, I2C_DTEI),
 -      INTC_GROUP(SDHI, SDHI0, SDHI1, SDHI2, SDHI3),
  };
  
  static struct intc_mask_reg mask_registers[] __initdata = {
          { I2C_DTEI, I2C_WAITI, I2C_TACKI, I2C_ALI,
            FLCTL_FLTREQ1I, FLCTL_FLTREQ0I, FLCTL_FLENDI, FLCTL_FLSTEI } },
        { 0xa40800a0, 0xa40800e0, 8, /* IMR8 / IMCR8 */
 -        { SDHI3, SDHI2, SDHI1, SDHI0, 0, 0, 0, SIU } },
 +        { DISABLED, ENABLED, ENABLED, ENABLED, 0, 0, 0, SIU } },
        { 0xa40800a4, 0xa40800e4, 8, /* IMR9 / IMCR9 */
          { 0, 0, 0, CMT, 0, USB, } },
        { 0xa40800a8, 0xa40800e8, 8, /* IMR10 / IMCR10 */
@@@ -441,13 -443,9 +443,13 @@@ static struct intc_mask_reg ack_registe
          { IRQ0, IRQ1, IRQ2, IRQ3, IRQ4, IRQ5, IRQ6, IRQ7 } },
  };
  
 -static DECLARE_INTC_DESC_ACK(intc_desc, "sh7366", vectors, groups,
 -                           mask_registers, prio_registers, sense_registers,
 -                           ack_registers);
 +static struct intc_desc intc_desc __initdata = {
 +      .name = "sh7366",
 +      .force_enable = ENABLED,
 +      .force_disable = DISABLED,
 +      .hw = INTC_HW_DESC(vectors, groups, mask_registers,
 +                         prio_registers, sense_registers, ack_registers),
 +};
  
  void __init plat_irq_setup(void)
  {
index a164f8924258308b8a3cfd550f5a83a3745ab174,73737d00e2e761a668e131b6075404b50a6253ee..5813d8023619d1f0e0da06bb51808017d30f2d97
@@@ -181,6 -181,8 +181,8 @@@ struct platform_device dma_device = 
  static struct plat_sci_port scif0_platform_data = {
        .mapbase        = 0xffe00000,
        .flags          = UPF_BOOT_AUTOCONF,
+       .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
+       .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
        .irqs           = { 80, 80, 80, 80 },
  };
@@@ -196,6 -198,8 +198,8 @@@ static struct platform_device scif0_dev
  static struct plat_sci_port scif1_platform_data = {
        .mapbase        = 0xffe10000,
        .flags          = UPF_BOOT_AUTOCONF,
+       .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
+       .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
        .irqs           = { 81, 81, 81, 81 },
  };
@@@ -211,6 -215,8 +215,8 @@@ static struct platform_device scif1_dev
  static struct plat_sci_port scif2_platform_data = {
        .mapbase        = 0xffe20000,
        .flags          = UPF_BOOT_AUTOCONF,
+       .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
+       .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
        .irqs           = { 82, 82, 82, 82 },
  };
@@@ -699,7 -705,7 +705,7 @@@ static struct intc_mask_reg mask_regist
          { I2C_DTEI, I2C_WAITI, I2C_TACKI, I2C_ALI,
            FLCTL_FLTREQ1I, FLCTL_FLTREQ0I, FLCTL_FLENDI, FLCTL_FLSTEI } },
        { 0xa40800a0, 0xa40800e0, 8, /* IMR8 / IMCR8 */
 -        { DISABLED, DISABLED, ENABLED, ENABLED, 0, 0, TWODG, SIU } },
 +        { DISABLED, ENABLED, ENABLED, ENABLED, 0, 0, TWODG, SIU } },
        { 0xa40800a4, 0xa40800e4, 8, /* IMR9 / IMCR9 */
          { 0, 0, 0, CMT, 0, USB_USBI1, USB_USBI0, } },
        { 0xa40800a8, 0xa40800e8, 8, /* IMR10 / IMCR10 */
index d7641221ee42027b8980ff817752c258902494d4,264983ddc8da299ba9fc8cb0a01cb1056fb50ab0..072382280f96b8650c6f565bc181c60275152a53
@@@ -24,6 -24,8 +24,8 @@@
  static struct plat_sci_port scif0_platform_data = {
        .mapbase        = 0xffe00000,
        .flags          = UPF_BOOT_AUTOCONF,
+       .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
+       .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
        .irqs           = { 80, 80, 80, 80 },
  };
@@@ -39,6 -41,8 +41,8 @@@ static struct platform_device scif0_dev
  static struct plat_sci_port scif1_platform_data = {
        .mapbase        = 0xffe10000,
        .flags          = UPF_BOOT_AUTOCONF,
+       .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
+       .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
        .irqs           = { 81, 81, 81, 81 },
  };
@@@ -54,6 -58,8 +58,8 @@@ static struct platform_device scif1_dev
  static struct plat_sci_port scif2_platform_data = {
        .mapbase        = 0xffe20000,
        .flags          = UPF_BOOT_AUTOCONF,
+       .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
+       .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
        .irqs           = { 82, 82, 82, 82 },
  };
@@@ -69,6 -75,8 +75,8 @@@ static struct platform_device scif2_dev
  static struct plat_sci_port scif3_platform_data = {
        .mapbase        = 0xa4e30000,
        .flags          = UPF_BOOT_AUTOCONF,
+       .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
+       .scbrr_algo_id  = SCBRR_ALGO_3,
        .type           = PORT_SCIFA,
        .irqs           = { 56, 56, 56, 56 },
  };
@@@ -84,6 -92,8 +92,8 @@@ static struct platform_device scif3_dev
  static struct plat_sci_port scif4_platform_data = {
        .mapbase        = 0xa4e40000,
        .flags          = UPF_BOOT_AUTOCONF,
+       .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
+       .scbrr_algo_id  = SCBRR_ALGO_3,
        .type           = PORT_SCIFA,
        .irqs           = { 88, 88, 88, 88 },
  };
@@@ -99,6 -109,8 +109,8 @@@ static struct platform_device scif4_dev
  static struct plat_sci_port scif5_platform_data = {
        .mapbase        = 0xa4e50000,
        .flags          = UPF_BOOT_AUTOCONF,
+       .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
+       .scbrr_algo_id  = SCBRR_ALGO_3,
        .type           = PORT_SCIFA,
        .irqs           = { 109, 109, 109, 109 },
  };
@@@ -719,7 -731,7 +731,7 @@@ static struct intc_group groups[] __ini
  static struct intc_mask_reg mask_registers[] __initdata = {
        { 0xa4080080, 0xa40800c0, 8, /* IMR0 / IMCR0 */
          { 0, TMU1_TUNI2, TMU1_TUNI1, TMU1_TUNI0,
 -          0, DISABLED, ENABLED, ENABLED } },
 +          0, ENABLED, ENABLED, ENABLED } },
        { 0xa4080084, 0xa40800c4, 8, /* IMR1 / IMCR1 */
          { VIO_VOUI, VIO_VEU2HI,VIO_BEUI,VIO_CEUI,DMAC0A_DEI3,DMAC0A_DEI2,DMAC0A_DEI1,DMAC0A_DEI0 } },
        { 0xa4080088, 0xa40800c8, 8, /* IMR2 / IMCR2 */
          { I2C_DTEI, I2C_WAITI, I2C_TACKI, I2C_ALI,
            FLCTL_FLTREQ1I, FLCTL_FLTREQ0I, FLCTL_FLTENDI, FLCTL_FLSTEI } },
        { 0xa40800a0, 0xa40800e0, 8, /* IMR8 / IMCR8 */
 -        { 0, DISABLED, ENABLED, ENABLED,
 +        { 0, ENABLED, ENABLED, ENABLED,
            0, 0, SCIFA_SCIFA2, SIU_SIUI } },
        { 0xa40800a4, 0xa40800e4, 8, /* IMR9 / IMCR9 */
          { 0, 0, 0, CMT_CMTI, 0, 0, USB_USI0,0 } },
index c598a7f61b7f71fbea97d36a07014e19f0c215f4,4a8b751c5f17aaeadab6468f583985fda58554bf..0333fe9e3881913e82c5458b45e4f6aef5d867dd
@@@ -257,6 -257,8 +257,8 @@@ static struct platform_device dma1_devi
  static struct plat_sci_port scif0_platform_data = {
        .mapbase        = 0xffe00000,
        .flags          = UPF_BOOT_AUTOCONF,
+       .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
+       .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
        .irqs           = { 80, 80, 80, 80 },
  };
@@@ -272,6 -274,8 +274,8 @@@ static struct platform_device scif0_dev
  static struct plat_sci_port scif1_platform_data = {
        .mapbase        = 0xffe10000,
        .flags          = UPF_BOOT_AUTOCONF,
+       .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
+       .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
        .irqs           = { 81, 81, 81, 81 },
  };
@@@ -287,6 -291,8 +291,8 @@@ static struct platform_device scif1_dev
  static struct plat_sci_port scif2_platform_data = {
        .mapbase        = 0xffe20000,
        .flags          = UPF_BOOT_AUTOCONF,
+       .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
+       .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
        .irqs           = { 82, 82, 82, 82 },
  };
@@@ -302,6 -308,8 +308,8 @@@ static struct platform_device scif2_dev
  static struct plat_sci_port scif3_platform_data = {
        .mapbase        = 0xa4e30000,
        .flags          = UPF_BOOT_AUTOCONF,
+       .scscr          = SCSCR_RE | SCSCR_TE,
+       .scbrr_algo_id  = SCBRR_ALGO_3,
        .type           = PORT_SCIFA,
        .irqs           = { 56, 56, 56, 56 },
  };
@@@ -317,6 -325,8 +325,8 @@@ static struct platform_device scif3_dev
  static struct plat_sci_port scif4_platform_data = {
        .mapbase        = 0xa4e40000,
        .flags          = UPF_BOOT_AUTOCONF,
+       .scscr          = SCSCR_RE | SCSCR_TE,
+       .scbrr_algo_id  = SCBRR_ALGO_3,
        .type           = PORT_SCIFA,
        .irqs           = { 88, 88, 88, 88 },
  };
@@@ -332,6 -342,8 +342,8 @@@ static struct platform_device scif4_dev
  static struct plat_sci_port scif5_platform_data = {
        .mapbase        = 0xa4e50000,
        .flags          = UPF_BOOT_AUTOCONF,
+       .scscr          = SCSCR_RE | SCSCR_TE,
+       .scbrr_algo_id  = SCBRR_ALGO_3,
        .type           = PORT_SCIFA,
        .irqs           = { 109, 109, 109, 109 },
  };
@@@ -1144,7 -1156,7 +1156,7 @@@ static struct intc_group groups[] __ini
  static struct intc_mask_reg mask_registers[] __initdata = {
        { 0xa4080080, 0xa40800c0, 8, /* IMR0 / IMCR0 */
          { 0, TMU1_TUNI2, TMU1_TUNI1, TMU1_TUNI0,
 -          0, DISABLED, ENABLED, ENABLED } },
 +          0, ENABLED, ENABLED, ENABLED } },
        { 0xa4080084, 0xa40800c4, 8, /* IMR1 / IMCR1 */
          { VIO_VOU, VIO_VEU1, VIO_BEU0, VIO_CEU0,
            DMAC0A_DEI3, DMAC0A_DEI2, DMAC0A_DEI1, DMAC0A_DEI0 } },
          { I2C0_DTEI, I2C0_WAITI, I2C0_TACKI, I2C0_ALI,
            I2C1_DTEI, I2C1_WAITI, I2C1_TACKI, I2C1_ALI } },
        { 0xa40800a0, 0xa40800e0, 8, /* IMR8 / IMCR8 */
 -        { DISABLED, DISABLED, ENABLED, ENABLED,
 +        { DISABLED, ENABLED, ENABLED, ENABLED,
            0, 0, SCIFA5, FSI } },
        { 0xa40800a4, 0xa40800e4, 8, /* IMR9 / IMCR9 */
          { 0, 0, 0, CMT, 0, USB1, USB0, 0 } },