]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 16 Dec 2009 18:29:52 +0000 (10:29 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 16 Dec 2009 18:29:52 +0000 (10:29 -0800)
* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (33 commits)
  sh: Fix test of unsigned in se7722_irq_demux()
  sh: mach-ecovec24: Add FSI sound support
  sh: mach-ecovec24: Add mt9t112 camera support
  sh: mach-ecovec24: Add tw9910 support
  sh: MSIOF/mmc_spi platform data for the Ecovec24 board
  sh: ms7724se: Add ak4642 support
  sh: Fix up FPU build for SH5
  sh: Remove old early serial console code V2
  sh: sh5 scif pdata (sh5-101/sh5-103)
  sh: sh4a scif pdata (sh7757/sh7763/sh7770/sh7780/sh7785/sh7786/x3)
  sh: sh4a scif pdata (sh7343/sh7366/sh7722/sh7723/sh7724)
  sh: sh4 scif pdata (sh7750/sh7760/sh4-202)
  sh: sh3 scif pdata (sh7705/sh770x/sh7710/sh7720)
  sh: sh2a scif pdata (sh7201/sh7203/sh7206/mxg)
  sh: sh2 scif pdata (sh7616)
  sh-sci: Extend sh-sci driver with early console V2
  sh: Stub in P3 ioremap support for nommu parts.
  sh: wire up vmallocinfo support in ioremap() implementations.
  sh: Make the unaligned trap handler always obey notification levels.
  sh: Couple kernel and user write page perm bits for CONFIG_X2TLB
  ...

62 files changed:
arch/sh/Kconfig.debug
arch/sh/boards/mach-ap325rxa/setup.c
arch/sh/boards/mach-ecovec24/setup.c
arch/sh/boards/mach-kfr2r09/lcd_wqvga.c
arch/sh/boards/mach-kfr2r09/setup.c
arch/sh/boards/mach-se/7722/irq.c
arch/sh/boards/mach-se/7724/setup.c
arch/sh/configs/ecovec24-romimage_defconfig
arch/sh/configs/ecovec24_defconfig
arch/sh/configs/rts7751r2d1_defconfig
arch/sh/configs/rts7751r2dplus_defconfig
arch/sh/include/asm/io.h
arch/sh/include/asm/pgtable_32.h
arch/sh/include/asm/unistd_32.h
arch/sh/include/asm/unistd_64.h
arch/sh/include/mach-kfr2r09/mach/kfr2r09.h
arch/sh/kernel/Makefile
arch/sh/kernel/cpu/irq/ipr.c
arch/sh/kernel/cpu/sh2/setup-sh7619.c
arch/sh/kernel/cpu/sh2a/setup-mxg.c
arch/sh/kernel/cpu/sh2a/setup-sh7201.c
arch/sh/kernel/cpu/sh2a/setup-sh7203.c
arch/sh/kernel/cpu/sh2a/setup-sh7206.c
arch/sh/kernel/cpu/sh3/setup-sh7705.c
arch/sh/kernel/cpu/sh3/setup-sh770x.c
arch/sh/kernel/cpu/sh3/setup-sh7710.c
arch/sh/kernel/cpu/sh3/setup-sh7720.c
arch/sh/kernel/cpu/sh4/setup-sh4-202.c
arch/sh/kernel/cpu/sh4/setup-sh7750.c
arch/sh/kernel/cpu/sh4/setup-sh7760.c
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
arch/sh/kernel/cpu/sh4a/setup-sh7757.c
arch/sh/kernel/cpu/sh4a/setup-sh7763.c
arch/sh/kernel/cpu/sh4a/setup-sh7770.c
arch/sh/kernel/cpu/sh4a/setup-sh7780.c
arch/sh/kernel/cpu/sh4a/setup-sh7785.c
arch/sh/kernel/cpu/sh4a/setup-sh7786.c
arch/sh/kernel/cpu/sh4a/setup-shx3.c
arch/sh/kernel/cpu/sh5/fpu.c
arch/sh/kernel/cpu/sh5/setup-sh5.c
arch/sh/kernel/early_printk.c
arch/sh/kernel/ftrace.c
arch/sh/kernel/process_64.c
arch/sh/kernel/ptrace_64.c
arch/sh/kernel/setup.c
arch/sh/kernel/signal_64.c
arch/sh/kernel/syscalls_32.S
arch/sh/kernel/traps_32.c
arch/sh/kernel/traps_64.c
arch/sh/mm/cache-sh4.c
arch/sh/mm/ioremap_32.c
arch/sh/mm/ioremap_64.c
arch/sh/mm/numa.c
drivers/serial/sh-sci.c
drivers/sh/intc.c
drivers/sh/pfc.c
drivers/video/sh_mobile_lcdcfb.c
include/video/sh_mobile_lcdc.h

index 55907af1dc256a83acec8f58115d080636a540b1..12fec72fec5f4888fb5a6f7c72911aaa0ebccd68 100644 (file)
@@ -19,50 +19,6 @@ config SH_STANDARD_BIOS
          mask ROM and no flash (WindowsCE machines fall in this category).
          If unsure, say N.
 
-config EARLY_SCIF_CONSOLE
-       bool "Use early SCIF console"
-       help
-         This enables an early console using a fixed SCIF port. This can
-         be used by platforms that are either not running the SH
-         standard BIOS, or do not wish to use the BIOS callbacks for the
-         serial I/O.
-
-config EARLY_SCIF_CONSOLE_PORT
-       hex
-       depends on EARLY_SCIF_CONSOLE
-       default "0xa4400000" if CPU_SUBTYPE_SH7712 || CPU_SUBTYPE_SH7705
-       default "0xa4430000" if CPU_SUBTYPE_SH7720 || CPU_SUBTYPE_SH7721
-       default "0xf8420000" if CPU_SUBTYPE_SH7619
-       default "0xff804000" if CPU_SUBTYPE_MXG
-       default "0xffc30000" if CPU_SUBTYPE_SHX3
-       default "0xffe00000" if CPU_SUBTYPE_SH7780 || CPU_SUBTYPE_SH7763 || \
-                               CPU_SUBTYPE_SH7722 || CPU_SUBTYPE_SH7366 || \
-                               CPU_SUBTYPE_SH7343
-       default "0xfe4c0000" if CPU_SUBTYPE_SH7757
-       default "0xffeb0000" if CPU_SUBTYPE_SH7785
-       default "0xffeb0000" if CPU_SUBTYPE_SH7786
-       default "0xfffe8000" if CPU_SUBTYPE_SH7203
-       default "0xfffe9800" if CPU_SUBTYPE_SH7206 || CPU_SUBTYPE_SH7263
-       default "0xffe80000" if CPU_SH4
-       default "0xa4000150" if CPU_SH3
-       default "0x00000000"
-
-config EARLY_PRINTK
-       bool "Early printk support"
-       depends on SH_STANDARD_BIOS || EARLY_SCIF_CONSOLE
-       help
-         Say Y here to redirect kernel printk messages to the serial port
-         used by the SH-IPL bootloader, starting very early in the boot
-         process and ending when the kernel's serial console is initialised.
-         This option is only useful porting the kernel to a new machine,
-         when the kernel may crash or hang before the serial console is
-         initialised. If unsure, say N.
-
-         On devices that are running SH-IPL and want to keep the port
-         initialization consistent while not using the BIOS callbacks,
-         select both the EARLY_SCIF_CONSOLE and SH_STANDARD_BIOS, using
-         the kernel command line option to toggle back and forth.
-
 config STACK_DEBUG
        bool "Check for stack overflows"
        depends on DEBUG_KERNEL && SUPERH32
index 7a9f69663f1a51f3dfff94d155ca0f49ac775a54..1f5fa5c44f6df77d42f0166893abf815ed54c981 100644 (file)
@@ -323,7 +323,8 @@ static struct soc_camera_platform_info camera_info = {
                .height = 480,
        },
        .bus_param = SOCAM_PCLK_SAMPLE_RISING | SOCAM_HSYNC_ACTIVE_HIGH |
-       SOCAM_VSYNC_ACTIVE_HIGH | SOCAM_MASTER | SOCAM_DATAWIDTH_8,
+       SOCAM_VSYNC_ACTIVE_HIGH | SOCAM_MASTER | SOCAM_DATAWIDTH_8 |
+       SOCAM_DATA_ACTIVE_HIGH,
        .set_capture = camera_set_capture,
 };
 
index 826e62326d51b563167544a19d32faf62b1c3bb2..194aaca22d4758e4860e22596c3945e3091a1227 100644 (file)
 #include <linux/usb/r8a66597.h>
 #include <linux/i2c.h>
 #include <linux/i2c/tsc2007.h>
+#include <linux/spi/spi.h>
+#include <linux/spi/sh_msiof.h>
+#include <linux/spi/mmc_spi.h>
+#include <linux/mmc/host.h>
 #include <linux/input.h>
 #include <linux/input/sh_keysc.h>
 #include <linux/mfd/sh_mobile_sdhi.h>
 #include <video/sh_mobile_lcdc.h>
+#include <sound/sh_fsi.h>
 #include <media/sh_mobile_ceu.h>
+#include <media/tw9910.h>
+#include <media/mt9t112.h>
 #include <asm/heartbeat.h>
 #include <asm/sh_eth.h>
 #include <asm/clock.h>
@@ -338,6 +345,12 @@ static struct platform_device ceu1_device = {
 };
 
 /* I2C device */
+static struct i2c_board_info i2c0_devices[] = {
+       {
+               I2C_BOARD_INFO("da7210", 0x1a),
+       },
+};
+
 static struct i2c_board_info i2c1_devices[] = {
        {
                I2C_BOARD_INFO("r2025sd", 0x32),
@@ -421,6 +434,7 @@ static struct i2c_board_info ts_i2c_clients = {
        .irq            = IRQ0,
 };
 
+#ifdef CONFIG_MFD_SH_MOBILE_SDHI
 /* SHDI0 */
 static void sdhi0_set_pwr(struct platform_device *pdev, int state)
 {
@@ -493,6 +507,248 @@ static struct platform_device sdhi1_device = {
        },
 };
 
+#else
+
+static int mmc_spi_get_ro(struct device *dev)
+{
+       return gpio_get_value(GPIO_PTY6);
+}
+
+static int mmc_spi_get_cd(struct device *dev)
+{
+       return !gpio_get_value(GPIO_PTY7);
+}
+
+static void mmc_spi_setpower(struct device *dev, unsigned int maskval)
+{
+       gpio_set_value(GPIO_PTB6, maskval ? 1 : 0);
+}
+
+static struct mmc_spi_platform_data mmc_spi_info = {
+       .get_ro = mmc_spi_get_ro,
+       .get_cd = mmc_spi_get_cd,
+       .caps = MMC_CAP_NEEDS_POLL,
+       .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, /* 3.3V only */
+       .setpower = mmc_spi_setpower,
+};
+
+static struct spi_board_info spi_bus[] = {
+       {
+               .modalias       = "mmc_spi",
+               .platform_data  = &mmc_spi_info,
+               .max_speed_hz   = 5000000,
+               .mode           = SPI_MODE_0,
+               .controller_data = (void *) GPIO_PTM4,
+       },
+};
+
+static struct sh_msiof_spi_info msiof0_data = {
+       .num_chipselect = 1,
+};
+
+static struct resource msiof0_resources[] = {
+       [0] = {
+               .name   = "MSIOF0",
+               .start  = 0xa4c40000,
+               .end    = 0xa4c40063,
+               .flags  = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start  = 84,
+               .flags  = IORESOURCE_IRQ,
+       },
+};
+
+static struct platform_device msiof0_device = {
+       .name           = "spi_sh_msiof",
+       .id             = 0, /* MSIOF0 */
+       .dev = {
+               .platform_data = &msiof0_data,
+       },
+       .num_resources  = ARRAY_SIZE(msiof0_resources),
+       .resource       = msiof0_resources,
+       .archdata = {
+               .hwblk_id = HWBLK_MSIOF0,
+       },
+};
+
+#endif
+
+/* I2C Video/Camera */
+static struct i2c_board_info i2c_camera[] = {
+       {
+               I2C_BOARD_INFO("tw9910", 0x45),
+       },
+       {
+               /* 1st camera */
+               I2C_BOARD_INFO("mt9t112", 0x3c),
+       },
+       {
+               /* 2nd camera */
+               I2C_BOARD_INFO("mt9t112", 0x3c),
+       },
+};
+
+/* tw9910 */
+static int tw9910_power(struct device *dev, int mode)
+{
+       int val = mode ? 0 : 1;
+
+       gpio_set_value(GPIO_PTU2, val);
+       if (mode)
+               mdelay(100);
+
+       return 0;
+}
+
+static struct tw9910_video_info tw9910_info = {
+       .buswidth       = SOCAM_DATAWIDTH_8,
+       .mpout          = TW9910_MPO_FIELD,
+};
+
+static struct soc_camera_link tw9910_link = {
+       .i2c_adapter_id = 0,
+       .bus_id         = 1,
+       .power          = tw9910_power,
+       .board_info     = &i2c_camera[0],
+       .module_name    = "tw9910",
+       .priv           = &tw9910_info,
+};
+
+/* mt9t112 */
+static int mt9t112_power1(struct device *dev, int mode)
+{
+       gpio_set_value(GPIO_PTA3, mode);
+       if (mode)
+               mdelay(100);
+
+       return 0;
+}
+
+static struct mt9t112_camera_info mt9t112_info1 = {
+       .flags = MT9T112_FLAG_PCLK_RISING_EDGE | MT9T112_FLAG_DATAWIDTH_8,
+       .divider = { 0x49, 0x6, 0, 6, 0, 9, 9, 6, 0 }, /* for 24MHz */
+};
+
+static struct soc_camera_link mt9t112_link1 = {
+       .i2c_adapter_id = 0,
+       .power          = mt9t112_power1,
+       .bus_id         = 0,
+       .board_info     = &i2c_camera[1],
+       .module_name    = "mt9t112",
+       .priv           = &mt9t112_info1,
+};
+
+static int mt9t112_power2(struct device *dev, int mode)
+{
+       gpio_set_value(GPIO_PTA4, mode);
+       if (mode)
+               mdelay(100);
+
+       return 0;
+}
+
+static struct mt9t112_camera_info mt9t112_info2 = {
+       .flags = MT9T112_FLAG_PCLK_RISING_EDGE | MT9T112_FLAG_DATAWIDTH_8,
+       .divider = { 0x49, 0x6, 0, 6, 0, 9, 9, 6, 0 }, /* for 24MHz */
+};
+
+static struct soc_camera_link mt9t112_link2 = {
+       .i2c_adapter_id = 1,
+       .power          = mt9t112_power2,
+       .bus_id         = 1,
+       .board_info     = &i2c_camera[2],
+       .module_name    = "mt9t112",
+       .priv           = &mt9t112_info2,
+};
+
+static struct platform_device camera_devices[] = {
+       {
+               .name   = "soc-camera-pdrv",
+               .id     = 0,
+               .dev    = {
+                       .platform_data = &tw9910_link,
+               },
+       },
+       {
+               .name   = "soc-camera-pdrv",
+               .id     = 1,
+               .dev    = {
+                       .platform_data = &mt9t112_link1,
+               },
+       },
+       {
+               .name   = "soc-camera-pdrv",
+               .id     = 2,
+               .dev    = {
+                       .platform_data = &mt9t112_link2,
+               },
+       },
+};
+
+/* FSI */
+/*
+ * FSI-B use external clock which came from da7210.
+ * So, we should change parent of fsi
+ */
+#define FCLKBCR                0xa415000c
+static void fsimck_init(struct clk *clk)
+{
+       u32 status = ctrl_inl(clk->enable_reg);
+
+       /* use external clock */
+       status &= ~0x000000ff;
+       status |= 0x00000080;
+
+       ctrl_outl(status, clk->enable_reg);
+}
+
+static struct clk_ops fsimck_clk_ops = {
+       .init = fsimck_init,
+};
+
+static struct clk fsimckb_clk = {
+       .name           = "fsimckb_clk",
+       .id             = -1,
+       .ops            = &fsimck_clk_ops,
+       .enable_reg     = (void __iomem *)FCLKBCR,
+       .rate           = 0, /* unknown */
+};
+
+struct sh_fsi_platform_info fsi_info = {
+       .portb_flags = SH_FSI_BRS_INV |
+                      SH_FSI_OUT_SLAVE_MODE |
+                      SH_FSI_IN_SLAVE_MODE |
+                      SH_FSI_OFMT(I2S) |
+                      SH_FSI_IFMT(I2S),
+};
+
+static struct resource fsi_resources[] = {
+       [0] = {
+               .name   = "FSI",
+               .start  = 0xFE3C0000,
+               .end    = 0xFE3C021d,
+               .flags  = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start  = 108,
+               .flags  = IORESOURCE_IRQ,
+       },
+};
+
+static struct platform_device fsi_device = {
+       .name           = "sh_fsi",
+       .id             = 0,
+       .num_resources  = ARRAY_SIZE(fsi_resources),
+       .resource       = fsi_resources,
+       .dev    = {
+               .platform_data  = &fsi_info,
+       },
+       .archdata = {
+               .hwblk_id = HWBLK_SPU, /* FSI needs SPU hwblk */
+       },
+};
+
 static struct platform_device *ecovec_devices[] __initdata = {
        &heartbeat_device,
        &nor_flash_device,
@@ -503,8 +759,16 @@ static struct platform_device *ecovec_devices[] __initdata = {
        &ceu0_device,
        &ceu1_device,
        &keysc_device,
+#ifdef CONFIG_MFD_SH_MOBILE_SDHI
        &sdhi0_device,
        &sdhi1_device,
+#else
+       &msiof0_device,
+#endif
+       &camera_devices[0],
+       &camera_devices[1],
+       &camera_devices[2],
+       &fsi_device,
 };
 
 #define EEPROM_ADDR 0x50
@@ -560,6 +824,8 @@ extern char ecovec24_sdram_leave_end;
 
 static int __init arch_setup(void)
 {
+       struct clk *clk;
+
        /* register board specific self-refresh code */
        sh_mobile_register_self_refresh(SUSP_SH_STANDBY | SUSP_SH_SF,
                                        &ecovec24_sdram_enter_start,
@@ -773,7 +1039,8 @@ static int __init arch_setup(void)
        gpio_direction_input(GPIO_PTR5);
        gpio_direction_input(GPIO_PTR6);
 
-       /* enable SDHI0 (needs DS2.4 set to ON) */
+#ifdef CONFIG_MFD_SH_MOBILE_SDHI
+       /* enable SDHI0 on CN11 (needs DS2.4 set to ON) */
        gpio_request(GPIO_FN_SDHI0CD,  NULL);
        gpio_request(GPIO_FN_SDHI0WP,  NULL);
        gpio_request(GPIO_FN_SDHI0CMD, NULL);
@@ -785,7 +1052,7 @@ static int __init arch_setup(void)
        gpio_request(GPIO_PTB6, NULL);
        gpio_direction_output(GPIO_PTB6, 0);
 
-       /* enable SDHI1 (needs DS2.6,7 set to ON,OFF) */
+       /* enable SDHI1 on CN12 (needs DS2.6,7 set to ON,OFF) */
        gpio_request(GPIO_FN_SDHI1CD,  NULL);
        gpio_request(GPIO_FN_SDHI1WP,  NULL);
        gpio_request(GPIO_FN_SDHI1CMD, NULL);
@@ -799,8 +1066,59 @@ static int __init arch_setup(void)
 
        /* I/O buffer drive ability is high for SDHI1 */
        ctrl_outw((ctrl_inw(IODRIVEA) & ~0x3000) | 0x2000 , IODRIVEA);
+#else
+       /* enable MSIOF0 on CN11 (needs DS2.4 set to OFF) */
+       gpio_request(GPIO_FN_MSIOF0_TXD, NULL);
+       gpio_request(GPIO_FN_MSIOF0_RXD, NULL);
+       gpio_request(GPIO_FN_MSIOF0_TSCK, NULL);
+       gpio_request(GPIO_PTM4, NULL); /* software CS control of TSYNC pin */
+       gpio_direction_output(GPIO_PTM4, 1); /* active low CS */
+       gpio_request(GPIO_PTB6, NULL); /* 3.3V power control */
+       gpio_direction_output(GPIO_PTB6, 0); /* disable power by default */
+       gpio_request(GPIO_PTY6, NULL); /* write protect */
+       gpio_direction_input(GPIO_PTY6);
+       gpio_request(GPIO_PTY7, NULL); /* card detect */
+       gpio_direction_input(GPIO_PTY7);
+
+       spi_register_board_info(spi_bus, ARRAY_SIZE(spi_bus));
+#endif
+
+       /* enable Video */
+       gpio_request(GPIO_PTU2, NULL);
+       gpio_direction_output(GPIO_PTU2, 1);
+
+       /* enable Camera */
+       gpio_request(GPIO_PTA3, NULL);
+       gpio_request(GPIO_PTA4, NULL);
+       gpio_direction_output(GPIO_PTA3, 0);
+       gpio_direction_output(GPIO_PTA4, 0);
+
+       /* enable FSI */
+       gpio_request(GPIO_FN_FSIMCKB,    NULL);
+       gpio_request(GPIO_FN_FSIIBSD,    NULL);
+       gpio_request(GPIO_FN_FSIOBSD,    NULL);
+       gpio_request(GPIO_FN_FSIIBBCK,   NULL);
+       gpio_request(GPIO_FN_FSIIBLRCK,  NULL);
+       gpio_request(GPIO_FN_FSIOBBCK,   NULL);
+       gpio_request(GPIO_FN_FSIOBLRCK,  NULL);
+       gpio_request(GPIO_FN_CLKAUDIOBO, NULL);
+
+       /* change parent of FSI B */
+       clk = clk_get(NULL, "fsib_clk");
+       clk_register(&fsimckb_clk);
+       clk_set_parent(clk, &fsimckb_clk);
+       clk_set_rate(clk, 11000);
+       clk_set_rate(&fsimckb_clk, 11000);
+       clk_put(clk);
+
+       gpio_request(GPIO_PTU0, NULL);
+       gpio_direction_output(GPIO_PTU0, 0);
+       mdelay(20);
 
        /* enable I2C device */
+       i2c_register_board_info(0, i2c0_devices,
+                               ARRAY_SIZE(i2c0_devices));
+
        i2c_register_board_info(1, i2c1_devices,
                                ARRAY_SIZE(i2c1_devices));
 
index 8ccb1cc8b5890fed7fe0014c6d10b50133fa306e..e9b970846c41fcb0c96a105ed277059f722a57b3 100644 (file)
@@ -273,6 +273,12 @@ int kfr2r09_lcd_setup(void *board_data, void *sohandle,
        return 0;
 }
 
+void kfr2r09_lcd_start(void *board_data, void *sohandle,
+                      struct sh_mobile_lcdc_sys_bus_ops *so)
+{
+       write_memory_start(sohandle, so);
+}
+
 #define CTRL_CKSW       0x10
 #define CTRL_C10        0x20
 #define CTRL_CPSW       0x80
index 9038d768a52582084576051e6f180b96aa82f5b9..5d7b5d92475e46227b5b4c0e932a78f37ad0697f 100644 (file)
@@ -150,6 +150,7 @@ static struct sh_mobile_lcdc_info kfr2r09_sh_lcdc_info = {
                },
                .board_cfg = {
                        .setup_sys = kfr2r09_lcd_setup,
+                       .start_transfer = kfr2r09_lcd_start,
                        .display_on = kfr2r09_lcd_on,
                        .display_off = kfr2r09_lcd_off,
                },
index 4eb31acfafef0f9647a72d5bd06b1d309f1cd9bc..b221b6842b0d9142dbaf4e01b2f524d6c20728c2 100644 (file)
@@ -57,15 +57,16 @@ static void se7722_irq_demux(unsigned int irq, struct irq_desc *desc)
  */
 void __init init_se7722_IRQ(void)
 {
-       int i;
+       int i, irq;
 
        ctrl_outw(0, IRQ01_MASK);       /* disable all irqs */
        ctrl_outw(0x2000, 0xb03fffec);  /* mrshpc irq enable */
 
        for (i = 0; i < SE7722_FPGA_IRQ_NR; i++) {
-               se7722_fpga_irq[i] = create_irq();
-               if (se7722_fpga_irq[i] < 0)
+               irq = create_irq();
+               if (irq < 0)
                        return;
+               se7722_fpga_irq[i] = irq;
 
                set_irq_chip_and_handler_name(se7722_fpga_irq[i],
                                              &se7722_irq_chip,
index 4b0f0c0dc2b858ff1c3d9e447d8f4944e79d1c3e..5d0f70b46c97435dab2e565498ec33cf98ba34f3 100644 (file)
@@ -514,6 +514,13 @@ static struct platform_device *ms7724se_devices[] __initdata = {
        &sdhi1_cn8_device,
 };
 
+/* I2C device */
+static struct i2c_board_info i2c0_devices[] = {
+       {
+               I2C_BOARD_INFO("ak4642", 0x12),
+       },
+};
+
 #define EEPROM_OP   0xBA206000
 #define EEPROM_ADR  0xBA206004
 #define EEPROM_DATA 0xBA20600C
@@ -575,6 +582,16 @@ extern char ms7724se_sdram_enter_end;
 extern char ms7724se_sdram_leave_start;
 extern char ms7724se_sdram_leave_end;
 
+
+static int __init arch_setup(void)
+{
+       /* enable I2C device */
+       i2c_register_board_info(0, i2c0_devices,
+                               ARRAY_SIZE(i2c0_devices));
+       return 0;
+}
+arch_initcall(arch_setup);
+
 static int __init devices_setup(void)
 {
        u16 sw = ctrl_inw(SW4140); /* select camera, monitor */
index 0774924623cc287b9a9a3c23ba55243c3b61f289..46874704e4e7b18c30283bb604a7297fffdcf60f 100644 (file)
@@ -203,7 +203,7 @@ CONFIG_MMU=y
 CONFIG_PAGE_OFFSET=0x80000000
 CONFIG_FORCE_MAX_ZONEORDER=11
 CONFIG_MEMORY_START=0x08000000
-CONFIG_MEMORY_SIZE=0x08000000
+CONFIG_MEMORY_SIZE=0x10000000
 CONFIG_29BIT=y
 # CONFIG_X2TLB is not set
 CONFIG_VSYSCALL=y
index ac6469718a2c46761a0da53c7cbc8778cce4e10a..cad918437ca7a26c450041e8a42f38b373be597d 100644 (file)
@@ -204,7 +204,7 @@ CONFIG_MMU=y
 CONFIG_PAGE_OFFSET=0x80000000
 CONFIG_FORCE_MAX_ZONEORDER=11
 CONFIG_MEMORY_START=0x08000000
-CONFIG_MEMORY_SIZE=0x08000000
+CONFIG_MEMORY_SIZE=0x10000000
 CONFIG_29BIT=y
 # CONFIG_X2TLB is not set
 CONFIG_VSYSCALL=y
index f521e82cc19e17009a7d43fb043e7a52cd750a3a..6f1126b3e487b3a67a91b45c8bab7c46f1ea1a35 100644 (file)
@@ -324,7 +324,7 @@ CONFIG_ENTRY_OFFSET=0x00001000
 # CONFIG_UBC_WAKEUP is not set
 CONFIG_CMDLINE_OVERWRITE=y
 # CONFIG_CMDLINE_EXTEND is not set
-CONFIG_CMDLINE="console=tty0 console=ttySC0,115200 root=/dev/sda1 earlyprintk=serial"
+CONFIG_CMDLINE="console=tty0 console=ttySC1,115200 root=/dev/sda1"
 
 #
 # Bus options
index a156cd1e0617acfac691f39594dd3c9732274172..9215bbb13d6fbb4d96e5cef029c8a473beeecc02 100644 (file)
@@ -324,7 +324,7 @@ CONFIG_ENTRY_OFFSET=0x00001000
 # CONFIG_UBC_WAKEUP is not set
 CONFIG_CMDLINE_OVERWRITE=y
 # CONFIG_CMDLINE_EXTEND is not set
-CONFIG_CMDLINE="console=tty0 console=ttySC0,115200 root=/dev/sda1 earlyprintk=serial"
+CONFIG_CMDLINE="console=tty0 console=ttySC1,115200 root=/dev/sda1"
 
 #
 # Bus options
index 512cd3e9d0ca1c92c6153e1cf5a1cc7e460cb644..026dd659a6400cf70f6105167cfa927e4670f978 100644 (file)
@@ -233,10 +233,16 @@ unsigned long long poke_real_address_q(unsigned long long addr,
  * doesn't exist, so everything must go through page tables.
  */
 #ifdef CONFIG_MMU
-void __iomem *__ioremap(unsigned long offset, unsigned long size,
-                       unsigned long flags);
+void __iomem *__ioremap_caller(unsigned long offset, unsigned long size,
+                              unsigned long flags, void *caller);
 void __iounmap(void __iomem *addr);
 
+static inline void __iomem *
+__ioremap(unsigned long offset, unsigned long size, unsigned long flags)
+{
+       return __ioremap_caller(offset, size, flags, __builtin_return_address(0));
+}
+
 static inline void __iomem *
 __ioremap_mode(unsigned long offset, unsigned long size, unsigned long flags)
 {
@@ -271,6 +277,7 @@ __ioremap_mode(unsigned long offset, unsigned long size, unsigned long flags)
        return __ioremap(offset, size, flags);
 }
 #else
+#define __ioremap(offset, size, flags)         ((void __iomem *)(offset))
 #define __ioremap_mode(offset, size, flags)    ((void __iomem *)(offset))
 #define __iounmap(addr)                                do { } while (0)
 #endif /* CONFIG_MMU */
index b354355162034bdfac9c0ef10a15ec9b833fbc9f..5003ee86f67bd9215ca2d40083455727d2de9784 100644 (file)
@@ -344,7 +344,8 @@ static inline void set_pte(pte_t *ptep, pte_t pte)
 #define pte_special(pte)       ((pte).pte_low & _PAGE_SPECIAL)
 
 #ifdef CONFIG_X2TLB
-#define pte_write(pte)         ((pte).pte_high & _PAGE_EXT_USER_WRITE)
+#define pte_write(pte) \
+       ((pte).pte_high & (_PAGE_EXT_USER_WRITE | _PAGE_EXT_KERN_WRITE))
 #else
 #define pte_write(pte)         ((pte).pte_low & _PAGE_RW)
 #endif
@@ -358,7 +359,7 @@ static inline pte_t pte_##fn(pte_t pte) { pte.pte_##h op; return pte; }
  * individually toggled (and user permissions are entirely decoupled from
  * kernel permissions), we attempt to couple them a bit more sanely here.
  */
-PTE_BIT_FUNC(high, wrprotect, &= ~_PAGE_EXT_USER_WRITE);
+PTE_BIT_FUNC(high, wrprotect, &= ~(_PAGE_EXT_USER_WRITE | _PAGE_EXT_KERN_WRITE));
 PTE_BIT_FUNC(high, mkwrite, |= _PAGE_EXT_USER_WRITE | _PAGE_EXT_KERN_WRITE);
 PTE_BIT_FUNC(high, mkhuge, |= _PAGE_SZHUGE);
 #else
index f3fd1b9eb6b1f32ae5b42446729ab3d1ef56f398..f18c4f9baf27920d4ef71621303d4c9a63a62448 100644 (file)
 #define __NR_pwritev           334
 #define __NR_rt_tgsigqueueinfo 335
 #define __NR_perf_event_open   336
+#define __NR_recvmmsg          337
 
-#define NR_syscalls 337
+#define NR_syscalls 338
 
 #ifdef __KERNEL__
 
index 343ce8f073ea674d8d3eb44ca0c625ab2101a44a..3e7645d111307e5d12db6e7172961b47f486e704 100644 (file)
 #define __NR_pwritev           362
 #define __NR_rt_tgsigqueueinfo 363
 #define __NR_perf_event_open   364
+#define __NR_recvmmsg          365
 
 #ifdef __KERNEL__
 
-#define NR_syscalls 365
+#define NR_syscalls 366
 
 #define __ARCH_WANT_IPC_PARSE_VERSION
 #define __ARCH_WANT_OLD_READDIR
index 174374e19547f4baf93157360a71b7f487b4202f..484ef42c2fb5b8d35084f9ef38c9693edadd5a16 100644 (file)
@@ -8,6 +8,8 @@ void kfr2r09_lcd_on(void *board_data);
 void kfr2r09_lcd_off(void *board_data);
 int kfr2r09_lcd_setup(void *board_data, void *sys_ops_handle,
                      struct sh_mobile_lcdc_sys_bus_ops *sys_ops);
+void kfr2r09_lcd_start(void *board_data, void *sys_ops_handle,
+                      struct sh_mobile_lcdc_sys_bus_ops *sys_ops);
 #else
 static inline void kfr2r09_lcd_on(void *board_data) {}
 static inline void kfr2r09_lcd_off(void *board_data) {}
@@ -16,6 +18,10 @@ static inline int kfr2r09_lcd_setup(void *board_data, void *sys_ops_handle,
 {
        return -ENODEV;
 }
+static inline void kfr2r09_lcd_start(void *board_data, void *sys_ops_handle,
+                                    struct sh_mobile_lcdc_sys_bus_ops *sys_ops)
+{
+}
 #endif
 
 #endif /* __ASM_SH_KFR2R09_H */
index 0471a3eb25edeba9a64a683de216852d19d54f70..0d587da1ef12bfa8ab402531ed0593d3b9bae9fa 100644 (file)
@@ -22,11 +22,10 @@ obj-y       := debugtraps.o dma-nommu.o dumpstack.o                         \
 obj-y                          += cpu/
 obj-$(CONFIG_VSYSCALL)         += vsyscall/
 obj-$(CONFIG_SMP)              += smp.o
-obj-$(CONFIG_SH_STANDARD_BIOS) += sh_bios.o
+obj-$(CONFIG_SH_STANDARD_BIOS) += sh_bios.o early_printk.o
 obj-$(CONFIG_KGDB)             += kgdb.o
 obj-$(CONFIG_SH_CPU_FREQ)      += cpufreq.o
 obj-$(CONFIG_MODULES)          += sh_ksyms_$(BITS).o module.o
-obj-$(CONFIG_EARLY_PRINTK)     += early_printk.o
 obj-$(CONFIG_KEXEC)            += machine_kexec.o relocate_kernel.o
 obj-$(CONFIG_CRASH_DUMP)       += crash_dump.o
 obj-$(CONFIG_STACKTRACE)       += stacktrace.o
index c1508a90fc6af2049946e31de8c98a764b009863..9282d965a1b66082ef78f9c77e35150ac9778b47 100644 (file)
  * for more details.
  */
 #include <linux/init.h>
+#include <linux/interrupt.h>
+#include <linux/io.h>
 #include <linux/irq.h>
+#include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/io.h>
-#include <linux/interrupt.h>
 #include <linux/topology.h>
 
 static inline struct ipr_desc *get_ipr_desc(unsigned int irq)
 {
        struct irq_chip *chip = get_irq_chip(irq);
-       return (void *)((char *)chip - offsetof(struct ipr_desc, chip));
+       return container_of(chip, struct ipr_desc, chip);
 }
 
 static void disable_ipr_irq(unsigned int irq)
index 8555c05e86677f7cf3512b4d773ccd781e8a4cac..114c7cee718400395779f425fe536711e9f2bd7d 100644 (file)
@@ -59,32 +59,48 @@ static struct intc_prio_reg prio_registers[] __initdata = {
 static DECLARE_INTC_DESC(intc_desc, "sh7619", vectors, NULL,
                         NULL, prio_registers, NULL);
 
-static struct plat_sci_port sci_platform_data[] = {
-       {
-               .mapbase        = 0xf8400000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 88, 88, 88, 88 },
-       }, {
-               .mapbase        = 0xf8410000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 92, 92, 92, 92 },
-       }, {
-               .mapbase        = 0xf8420000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 96, 96, 96, 96 },
-       }, {
-               .flags = 0,
-       }
-};
-
-static struct platform_device sci_device = {
+static struct plat_sci_port scif0_platform_data = {
+       .mapbase        = 0xf8400000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 88, 88, 88, 88 },
+};
+
+static struct platform_device scif0_device = {
+       .name           = "sh-sci",
+       .id             = 0,
+       .dev            = {
+               .platform_data  = &scif0_platform_data,
+       },
+};
+
+static struct plat_sci_port scif1_platform_data = {
+       .mapbase        = 0xf8410000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 92, 92, 92, 92 },
+};
+
+static struct platform_device scif1_device = {
+       .name           = "sh-sci",
+       .id             = 1,
+       .dev            = {
+               .platform_data  = &scif1_platform_data,
+       },
+};
+
+static struct plat_sci_port scif2_platform_data = {
+       .mapbase        = 0xf8420000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 96, 96, 96, 96 },
+};
+
+static struct platform_device scif2_device = {
        .name           = "sh-sci",
-       .id             = -1,
+       .id             = 2,
        .dev            = {
-               .platform_data  = sci_platform_data,
+               .platform_data  = &scif2_platform_data,
        },
 };
 
@@ -176,7 +192,9 @@ static struct platform_device cmt1_device = {
 };
 
 static struct platform_device *sh7619_devices[] __initdata = {
-       &sci_device,
+       &scif0_device,
+       &scif1_device,
+       &scif2_device,
        &eth_device,
        &cmt0_device,
        &cmt1_device,
@@ -195,6 +213,9 @@ void __init plat_irq_setup(void)
 }
 
 static struct platform_device *sh7619_early_devices[] __initdata = {
+       &scif0_device,
+       &scif1_device,
+       &scif2_device,
        &cmt0_device,
        &cmt1_device,
 };
index b67376445315b47045433ef7118d7460faba99e4..8f669dc9b0da49faa614c884af03c3dc93094fe6 100644 (file)
@@ -207,27 +207,23 @@ static struct platform_device mtu2_2_device = {
        .num_resources  = ARRAY_SIZE(mtu2_2_resources),
 };
 
-static struct plat_sci_port sci_platform_data[] = {
-       {
-               .mapbase        = 0xff804000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 220, 220, 220, 220 },
-       }, {
-               .flags = 0,
-       }
+static struct plat_sci_port scif0_platform_data = {
+       .mapbase        = 0xff804000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 220, 220, 220, 220 },
 };
 
-static struct platform_device sci_device = {
+static struct platform_device scif0_device = {
        .name           = "sh-sci",
-       .id             = -1,
+       .id             = 0,
        .dev            = {
-               .platform_data  = sci_platform_data,
+               .platform_data  = &scif0_platform_data,
        },
 };
 
 static struct platform_device *mxg_devices[] __initdata = {
-       &sci_device,
+       &scif0_device,
        &mtu2_0_device,
        &mtu2_1_device,
        &mtu2_2_device,
@@ -246,6 +242,7 @@ void __init plat_irq_setup(void)
 }
 
 static struct platform_device *mxg_early_devices[] __initdata = {
+       &scif0_device,
        &mtu2_0_device,
        &mtu2_1_device,
        &mtu2_2_device,
index fbde5b75deb9152ba615c28af7c68652bc224ba8..4ccfeb59eb1a53d9e855da774786d09d557f43ab 100644 (file)
@@ -177,57 +177,123 @@ static struct intc_mask_reg mask_registers[] __initdata = {
 static DECLARE_INTC_DESC(intc_desc, "sh7201", vectors, groups,
                         mask_registers, prio_registers, NULL);
 
-static struct plat_sci_port sci_platform_data[] = {
-       {
-               .mapbase        = 0xfffe8000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 180, 180, 180, 180 }
-       }, {
-               .mapbase        = 0xfffe8800,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 184, 184, 184, 184 }
-       }, {
-               .mapbase        = 0xfffe9000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 188, 188, 188, 188 }
-       }, {
-               .mapbase        = 0xfffe9800,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 192, 192, 192, 192 }
-       }, {
-               .mapbase        = 0xfffea000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 196, 196, 196, 196 }
-       }, {
-               .mapbase        = 0xfffea800,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 200, 200, 200, 200 }
-       }, {
-               .mapbase        = 0xfffeb000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 204, 204, 204, 204 }
-       }, {
-               .mapbase        = 0xfffeb800,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 208, 208, 208, 208 }
-       }, {
-               .flags = 0,
-       }
-};
-
-static struct platform_device sci_device = {
+static struct plat_sci_port scif0_platform_data = {
+       .mapbase        = 0xfffe8000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 180, 180, 180, 180 }
+};
+
+static struct platform_device scif0_device = {
        .name           = "sh-sci",
-       .id             = -1,
+       .id             = 0,
+       .dev            = {
+               .platform_data  = &scif0_platform_data,
+       },
+};
+
+static struct plat_sci_port scif1_platform_data = {
+       .mapbase        = 0xfffe8800,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 184, 184, 184, 184 }
+};
+
+static struct platform_device scif1_device = {
+       .name           = "sh-sci",
+       .id             = 1,
+       .dev            = {
+               .platform_data  = &scif1_platform_data,
+       },
+};
+
+static struct plat_sci_port scif2_platform_data = {
+       .mapbase        = 0xfffe9000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 188, 188, 188, 188 }
+};
+
+static struct platform_device scif2_device = {
+       .name           = "sh-sci",
+       .id             = 2,
+       .dev            = {
+               .platform_data  = &scif2_platform_data,
+       },
+};
+
+static struct plat_sci_port scif3_platform_data = {
+       .mapbase        = 0xfffe9800,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 192, 192, 192, 192 }
+};
+
+static struct platform_device scif3_device = {
+       .name           = "sh-sci",
+       .id             = 3,
+       .dev            = {
+               .platform_data  = &scif3_platform_data,
+       },
+};
+
+static struct plat_sci_port scif4_platform_data = {
+       .mapbase        = 0xfffea000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 196, 196, 196, 196 }
+};
+
+static struct platform_device scif4_device = {
+       .name           = "sh-sci",
+       .id             = 4,
+       .dev            = {
+               .platform_data  = &scif4_platform_data,
+       },
+};
+
+static struct plat_sci_port scif5_platform_data = {
+       .mapbase        = 0xfffea800,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 200, 200, 200, 200 }
+};
+
+static struct platform_device scif5_device = {
+       .name           = "sh-sci",
+       .id             = 5,
+       .dev            = {
+               .platform_data  = &scif5_platform_data,
+       },
+};
+
+static struct plat_sci_port scif6_platform_data = {
+       .mapbase        = 0xfffeb000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 204, 204, 204, 204 }
+};
+
+static struct platform_device scif6_device = {
+       .name           = "sh-sci",
+       .id             = 6,
+       .dev            = {
+               .platform_data  = &scif6_platform_data,
+       },
+};
+
+static struct plat_sci_port scif7_platform_data = {
+       .mapbase        = 0xfffeb800,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 208, 208, 208, 208 }
+};
+
+static struct platform_device scif7_device = {
+       .name           = "sh-sci",
+       .id             = 7,
        .dev            = {
-               .platform_data  = sci_platform_data,
+               .platform_data  = &scif7_platform_data,
        },
 };
 
@@ -345,7 +411,14 @@ static struct platform_device mtu2_2_device = {
 };
 
 static struct platform_device *sh7201_devices[] __initdata = {
-       &sci_device,
+       &scif0_device,
+       &scif1_device,
+       &scif2_device,
+       &scif3_device,
+       &scif4_device,
+       &scif5_device,
+       &scif6_device,
+       &scif7_device,
        &rtc_device,
        &mtu2_0_device,
        &mtu2_1_device,
@@ -365,6 +438,14 @@ void __init plat_irq_setup(void)
 }
 
 static struct platform_device *sh7201_early_devices[] __initdata = {
+       &scif0_device,
+       &scif1_device,
+       &scif2_device,
+       &scif3_device,
+       &scif4_device,
+       &scif5_device,
+       &scif6_device,
+       &scif7_device,
        &mtu2_0_device,
        &mtu2_1_device,
        &mtu2_2_device,
index d3fd536c9a842e08634a982c3c7b4330d749f05e..3136966cc9b3c7c87067719e91673b63fe0464cd 100644 (file)
@@ -173,37 +173,63 @@ static struct intc_mask_reg mask_registers[] __initdata = {
 static DECLARE_INTC_DESC(intc_desc, "sh7203", vectors, groups,
                         mask_registers, prio_registers, NULL);
 
-static struct plat_sci_port sci_platform_data[] = {
-       {
-               .mapbase        = 0xfffe8000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           =  { 192, 192, 192, 192 },
-       }, {
-               .mapbase        = 0xfffe8800,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           =  { 196, 196, 196, 196 },
-       }, {
-               .mapbase        = 0xfffe9000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           =  { 200, 200, 200, 200 },
-       }, {
-               .mapbase        = 0xfffe9800,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           =  { 204, 204, 204, 204 },
-       }, {
-               .flags = 0,
-       }
+static struct plat_sci_port scif0_platform_data = {
+       .mapbase        = 0xfffe8000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           =  { 192, 192, 192, 192 },
 };
 
-static struct platform_device sci_device = {
+static struct platform_device scif0_device = {
        .name           = "sh-sci",
-       .id             = -1,
+       .id             = 0,
+       .dev            = {
+               .platform_data  = &scif0_platform_data,
+       },
+};
+
+static struct plat_sci_port scif1_platform_data = {
+       .mapbase        = 0xfffe8800,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           =  { 196, 196, 196, 196 },
+};
+
+static struct platform_device scif1_device = {
+       .name           = "sh-sci",
+       .id             = 1,
+       .dev            = {
+               .platform_data  = &scif1_platform_data,
+       },
+};
+
+static struct plat_sci_port scif2_platform_data = {
+       .mapbase        = 0xfffe9000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           =  { 200, 200, 200, 200 },
+};
+
+static struct platform_device scif2_device = {
+       .name           = "sh-sci",
+       .id             = 2,
+       .dev            = {
+               .platform_data  = &scif2_platform_data,
+       },
+};
+
+static struct plat_sci_port scif3_platform_data = {
+       .mapbase        = 0xfffe9800,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           =  { 204, 204, 204, 204 },
+};
+
+static struct platform_device scif3_device = {
+       .name           = "sh-sci",
+       .id             = 3,
        .dev            = {
-               .platform_data  = sci_platform_data,
+               .platform_data  = &scif3_platform_data,
        },
 };
 
@@ -354,7 +380,10 @@ static struct platform_device rtc_device = {
 };
 
 static struct platform_device *sh7203_devices[] __initdata = {
-       &sci_device,
+       &scif0_device,
+       &scif1_device,
+       &scif2_device,
+       &scif3_device,
        &cmt0_device,
        &cmt1_device,
        &mtu2_0_device,
@@ -375,6 +404,10 @@ void __init plat_irq_setup(void)
 }
 
 static struct platform_device *sh7203_early_devices[] __initdata = {
+       &scif0_device,
+       &scif1_device,
+       &scif2_device,
+       &scif3_device,
        &cmt0_device,
        &cmt1_device,
        &mtu2_0_device,
index a9ccc5e8d9e98af493bf45ed7fdeb4430c0cc11b..064873585a8be99954837754e2607def20d0f79e 100644 (file)
@@ -133,37 +133,63 @@ static struct intc_mask_reg mask_registers[] __initdata = {
 static DECLARE_INTC_DESC(intc_desc, "sh7206", vectors, groups,
                         mask_registers, prio_registers, NULL);
 
-static struct plat_sci_port sci_platform_data[] = {
-       {
-               .mapbase        = 0xfffe8000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 240, 240, 240, 240 },
-       }, {
-               .mapbase        = 0xfffe8800,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 244, 244, 244, 244 },
-       }, {
-               .mapbase        = 0xfffe9000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 248, 248, 248, 248 },
-       }, {
-               .mapbase        = 0xfffe9800,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 252, 252, 252, 252 },
-       }, {
-               .flags = 0,
-       }
+static struct plat_sci_port scif0_platform_data = {
+       .mapbase        = 0xfffe8000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 240, 240, 240, 240 },
 };
 
-static struct platform_device sci_device = {
+static struct platform_device scif0_device = {
        .name           = "sh-sci",
-       .id             = -1,
+       .id             = 0,
+       .dev            = {
+               .platform_data  = &scif0_platform_data,
+       },
+};
+
+static struct plat_sci_port scif1_platform_data = {
+       .mapbase        = 0xfffe8800,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 244, 244, 244, 244 },
+};
+
+static struct platform_device scif1_device = {
+       .name           = "sh-sci",
+       .id             = 1,
+       .dev            = {
+               .platform_data  = &scif1_platform_data,
+       },
+};
+
+static struct plat_sci_port scif2_platform_data = {
+       .mapbase        = 0xfffe9000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 248, 248, 248, 248 },
+};
+
+static struct platform_device scif2_device = {
+       .name           = "sh-sci",
+       .id             = 2,
+       .dev            = {
+               .platform_data  = &scif2_platform_data,
+       },
+};
+
+static struct plat_sci_port scif3_platform_data = {
+       .mapbase        = 0xfffe9800,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 252, 252, 252, 252 },
+};
+
+static struct platform_device scif3_device = {
+       .name           = "sh-sci",
+       .id             = 3,
        .dev            = {
-               .platform_data  = sci_platform_data,
+               .platform_data  = &scif3_platform_data,
        },
 };
 
@@ -325,7 +351,10 @@ static struct platform_device mtu2_2_device = {
 };
 
 static struct platform_device *sh7206_devices[] __initdata = {
-       &sci_device,
+       &scif0_device,
+       &scif1_device,
+       &scif2_device,
+       &scif3_device,
        &cmt0_device,
        &cmt1_device,
        &mtu2_0_device,
@@ -346,6 +375,10 @@ void __init plat_irq_setup(void)
 }
 
 static struct platform_device *sh7206_early_devices[] __initdata = {
+       &scif0_device,
+       &scif1_device,
+       &scif2_device,
+       &scif3_device,
        &cmt0_device,
        &cmt1_device,
        &mtu2_0_device,
index c231059838780cc294d6f5f5cc7ea0a167eada0c..7b892d60e3a0e59a206b453b3c1121f688e7acf6 100644 (file)
@@ -67,27 +67,33 @@ static struct intc_prio_reg prio_registers[] __initdata = {
 static DECLARE_INTC_DESC(intc_desc, "sh7705", vectors, NULL,
                         NULL, prio_registers, NULL);
 
-static struct plat_sci_port sci_platform_data[] = {
-       {
-               .mapbase        = 0xa4410000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 56, 56, 56 },
-       }, {
-               .mapbase        = 0xa4400000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 52, 52, 52 },
-       }, {
-               .flags = 0,
-       }
-};
-
-static struct platform_device sci_device = {
+static struct plat_sci_port scif0_platform_data = {
+       .mapbase        = 0xa4410000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 56, 56, 56 },
+};
+
+static struct platform_device scif0_device = {
        .name           = "sh-sci",
-       .id             = -1,
+       .id             = 0,
+       .dev            = {
+               .platform_data  = &scif0_platform_data,
+       },
+};
+
+static struct plat_sci_port scif1_platform_data = {
+       .mapbase        = 0xa4400000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 52, 52, 52 },
+};
+
+static struct platform_device scif1_device = {
+       .name           = "sh-sci",
+       .id             = 1,
        .dev            = {
-               .platform_data  = sci_platform_data,
+               .platform_data  = &scif1_platform_data,
        },
 };
 
@@ -210,10 +216,11 @@ static struct platform_device tmu2_device = {
 };
 
 static struct platform_device *sh7705_devices[] __initdata = {
+       &scif0_device,
+       &scif1_device,
        &tmu0_device,
        &tmu1_device,
        &tmu2_device,
-       &sci_device,
        &rtc_device,
 };
 
@@ -225,6 +232,8 @@ static int __init sh7705_devices_setup(void)
 arch_initcall(sh7705_devices_setup);
 
 static struct platform_device *sh7705_early_devices[] __initdata = {
+       &scif0_device,
+       &scif1_device,
        &tmu0_device,
        &tmu1_device,
        &tmu2_device,
index 347ab35d0697bf6cb0899f18b87153cb69117b32..bc0c4f68c7c739f73b89f9a7029331094bac2ff3 100644 (file)
@@ -106,44 +106,55 @@ static struct platform_device rtc_device = {
        .resource       = rtc_resources,
 };
 
-static struct plat_sci_port sci_platform_data[] = {
-       {
-               .mapbase        = 0xfffffe80,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCI,
-               .irqs           = { 23, 23, 23, 0 },
+static struct plat_sci_port scif0_platform_data = {
+       .mapbase        = 0xfffffe80,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCI,
+       .irqs           = { 23, 23, 23, 0 },
+};
+
+static struct platform_device scif0_device = {
+       .name           = "sh-sci",
+       .id             = 0,
+       .dev            = {
+               .platform_data  = &scif0_platform_data,
        },
+};
 #if defined(CONFIG_CPU_SUBTYPE_SH7706) || \
     defined(CONFIG_CPU_SUBTYPE_SH7707) || \
     defined(CONFIG_CPU_SUBTYPE_SH7709)
-       {
-               .mapbase        = 0xa4000150,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 56, 56, 56, 56 },
+static struct plat_sci_port scif1_platform_data = {
+       .mapbase        = 0xa4000150,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 56, 56, 56, 56 },
+};
+
+static struct platform_device scif1_device = {
+       .name           = "sh-sci",
+       .id             = 1,
+       .dev            = {
+               .platform_data  = &scif1_platform_data,
        },
+};
 #endif
 #if defined(CONFIG_CPU_SUBTYPE_SH7707) || \
     defined(CONFIG_CPU_SUBTYPE_SH7709)
-       {
-               .mapbase        = 0xa4000140,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_IRDA,
-               .irqs           = { 52, 52, 52, 52 },
-       },
-#endif
-       {
-               .flags = 0,
-       }
+static struct plat_sci_port scif2_platform_data = {
+       .mapbase        = 0xa4000140,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_IRDA,
+       .irqs           = { 52, 52, 52, 52 },
 };
 
-static struct platform_device sci_device = {
+static struct platform_device scif2_device = {
        .name           = "sh-sci",
-       .id             = -1,
+       .id             = 2,
        .dev            = {
-               .platform_data  = sci_platform_data,
+               .platform_data  = &scif2_platform_data,
        },
 };
+#endif
 
 static struct sh_timer_config tmu0_platform_data = {
        .name = "TMU0",
@@ -238,10 +249,19 @@ static struct platform_device tmu2_device = {
 };
 
 static struct platform_device *sh770x_devices[] __initdata = {
+       &scif0_device,
+#if defined(CONFIG_CPU_SUBTYPE_SH7706) || \
+    defined(CONFIG_CPU_SUBTYPE_SH7707) || \
+    defined(CONFIG_CPU_SUBTYPE_SH7709)
+       &scif1_device,
+#endif
+#if defined(CONFIG_CPU_SUBTYPE_SH7707) || \
+    defined(CONFIG_CPU_SUBTYPE_SH7709)
+       &scif2_device,
+#endif
        &tmu0_device,
        &tmu1_device,
        &tmu2_device,
-       &sci_device,
        &rtc_device,
 };
 
@@ -253,6 +273,16 @@ static int __init sh770x_devices_setup(void)
 arch_initcall(sh770x_devices_setup);
 
 static struct platform_device *sh770x_early_devices[] __initdata = {
+       &scif0_device,
+#if defined(CONFIG_CPU_SUBTYPE_SH7706) || \
+    defined(CONFIG_CPU_SUBTYPE_SH7707) || \
+    defined(CONFIG_CPU_SUBTYPE_SH7709)
+       &scif1_device,
+#endif
+#if defined(CONFIG_CPU_SUBTYPE_SH7707) || \
+    defined(CONFIG_CPU_SUBTYPE_SH7709)
+       &scif2_device,
+#endif
        &tmu0_device,
        &tmu1_device,
        &tmu2_device,
index 717e90ae1097a00efb701ba958013c844f6a55a4..0845a3ad006d9aa3dddc787e3b090681b62082eb 100644 (file)
@@ -96,28 +96,33 @@ static struct platform_device rtc_device = {
        },
 };
 
-static struct plat_sci_port sci_platform_data[] = {
-       {
-               .mapbase        = 0xa4400000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 52, 52, 52, 52 },
-       }, {
-               .mapbase        = 0xa4410000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 56, 56, 56, 56 },
-       }, {
-
-               .flags = 0,
-       }
-};
-
-static struct platform_device sci_device = {
+static struct plat_sci_port scif0_platform_data = {
+       .mapbase        = 0xa4400000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 52, 52, 52, 52 },
+};
+
+static struct platform_device scif0_device = {
        .name           = "sh-sci",
-       .id             = -1,
+       .id             = 0,
+       .dev            = {
+               .platform_data  = &scif0_platform_data,
+       },
+};
+
+static struct plat_sci_port scif1_platform_data = {
+       .mapbase        = 0xa4410000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 56, 56, 56, 56 },
+};
+
+static struct platform_device scif1_device = {
+       .name           = "sh-sci",
+       .id             = 1,
        .dev            = {
-               .platform_data  = sci_platform_data,
+               .platform_data  = &scif1_platform_data,
        },
 };
 
@@ -214,10 +219,11 @@ static struct platform_device tmu2_device = {
 };
 
 static struct platform_device *sh7710_devices[] __initdata = {
+       &scif0_device,
+       &scif1_device,
        &tmu0_device,
        &tmu1_device,
        &tmu2_device,
-       &sci_device,
        &rtc_device,
 };
 
@@ -229,6 +235,8 @@ static int __init sh7710_devices_setup(void)
 arch_initcall(sh7710_devices_setup);
 
 static struct platform_device *sh7710_early_devices[] __initdata = {
+       &scif0_device,
+       &scif1_device,
        &tmu0_device,
        &tmu1_device,
        &tmu2_device,
index 74d8baaf8e9675c2f740a45e30b2cffcbd66ffc6..a718a62310912dcc70723d63dcfb46e90fe5be9c 100644 (file)
@@ -48,28 +48,33 @@ static struct platform_device rtc_device = {
        },
 };
 
-static struct plat_sci_port sci_platform_data[] = {
-       {
-               .mapbase        = 0xa4430000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 80, 80, 80, 80 },
-       }, {
-               .mapbase        = 0xa4438000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 81, 81, 81, 81 },
-       }, {
-
-               .flags = 0,
-       }
-};
-
-static struct platform_device sci_device = {
+static struct plat_sci_port scif0_platform_data = {
+       .mapbase        = 0xa4430000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 80, 80, 80, 80 },
+};
+
+static struct platform_device scif0_device = {
        .name           = "sh-sci",
-       .id             = -1,
+       .id             = 0,
+       .dev            = {
+               .platform_data  = &scif0_platform_data,
+       },
+};
+
+static struct plat_sci_port scif1_platform_data = {
+       .mapbase        = 0xa4438000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 81, 81, 81, 81 },
+};
+
+static struct platform_device scif1_device = {
+       .name           = "sh-sci",
+       .id             = 1,
        .dev            = {
-               .platform_data  = sci_platform_data,
+               .platform_data  = &scif1_platform_data,
        },
 };
 
@@ -369,6 +374,8 @@ static struct platform_device tmu2_device = {
 };
 
 static struct platform_device *sh7720_devices[] __initdata = {
+       &scif0_device,
+       &scif1_device,
        &cmt0_device,
        &cmt1_device,
        &cmt2_device,
@@ -378,7 +385,6 @@ static struct platform_device *sh7720_devices[] __initdata = {
        &tmu1_device,
        &tmu2_device,
        &rtc_device,
-       &sci_device,
        &usb_ohci_device,
        &usbf_device,
 };
@@ -391,6 +397,8 @@ static int __init sh7720_devices_setup(void)
 arch_initcall(sh7720_devices_setup);
 
 static struct platform_device *sh7720_early_devices[] __initdata = {
+       &scif0_device,
+       &scif1_device,
        &cmt0_device,
        &cmt1_device,
        &cmt2_device,
index de4827df19aacc41dcb589128c6d6e62f7a147e6..4b733715cdb555458a43d89a5b1b82c528f8b042 100644 (file)
 #include <linux/sh_timer.h>
 #include <linux/io.h>
 
-static struct plat_sci_port sci_platform_data[] = {
-       {
-               .mapbase        = 0xffe80000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 40, 41, 43, 42 },
-       }, {
-               .flags = 0,
-       }
+static struct plat_sci_port scif0_platform_data = {
+       .mapbase        = 0xffe80000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 40, 41, 43, 42 },
 };
 
-static struct platform_device sci_device = {
+static struct platform_device scif0_device = {
        .name           = "sh-sci",
-       .id             = -1,
+       .id             = 0,
        .dev            = {
-               .platform_data  = sci_platform_data,
+               .platform_data  = &scif0_platform_data,
        },
 };
 
@@ -127,7 +123,7 @@ static struct platform_device tmu2_device = {
 };
 
 static struct platform_device *sh4202_devices[] __initdata = {
-       &sci_device,
+       &scif0_device,
        &tmu0_device,
        &tmu1_device,
        &tmu2_device,
@@ -141,6 +137,7 @@ static int __init sh4202_devices_setup(void)
 arch_initcall(sh4202_devices_setup);
 
 static struct platform_device *sh4202_early_devices[] __initdata = {
+       &scif0_device,
        &tmu0_device,
        &tmu1_device,
        &tmu2_device,
index 1b8b122e8f3dd46f5898ba0710432f83c5578b2e..b2a9df1af64c187e3c3bb8b26d91bf9bbfc503e8 100644 (file)
@@ -35,29 +35,33 @@ static struct platform_device rtc_device = {
        .resource       = rtc_resources,
 };
 
-static struct plat_sci_port sci_platform_data[] = {
-       {
-#ifndef CONFIG_SH_RTS7751R2D
-               .mapbase        = 0xffe00000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCI,
-               .irqs           = { 23, 23, 23, 0 },
-       }, {
-#endif
-               .mapbase        = 0xffe80000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 40, 40, 40, 40 },
-       }, {
-               .flags = 0,
-       }
+static struct plat_sci_port scif0_platform_data = {
+       .mapbase        = 0xffe00000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCI,
+       .irqs           = { 23, 23, 23, 0 },
 };
 
-static struct platform_device sci_device = {
+static struct platform_device scif0_device = {
        .name           = "sh-sci",
-       .id             = -1,
+       .id             = 0,
+       .dev            = {
+               .platform_data  = &scif0_platform_data,
+       },
+};
+
+static struct plat_sci_port scif1_platform_data = {
+       .mapbase        = 0xffe80000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 40, 40, 40, 40 },
+};
+
+static struct platform_device scif1_device = {
+       .name           = "sh-sci",
+       .id             = 1,
        .dev            = {
-               .platform_data  = sci_platform_data,
+               .platform_data  = &scif1_platform_data,
        },
 };
 
@@ -221,8 +225,9 @@ static struct platform_device tmu4_device = {
 #endif
 
 static struct platform_device *sh7750_devices[] __initdata = {
+       &scif0_device,
+       &scif1_device,
        &rtc_device,
-       &sci_device,
        &tmu0_device,
        &tmu1_device,
        &tmu2_device,
@@ -242,6 +247,8 @@ static int __init sh7750_devices_setup(void)
 arch_initcall(sh7750_devices_setup);
 
 static struct platform_device *sh7750_early_devices[] __initdata = {
+       &scif0_device,
+       &scif1_device,
        &tmu0_device,
        &tmu1_device,
        &tmu2_device,
index 7fbb7be9284ca86950ead92da5ca337f0c0e7b99..5b74cc0b43daaa69a8962b10f9c1fe3f66109f2a 100644 (file)
@@ -126,37 +126,63 @@ static struct intc_vect vectors_irq[] __initdata = {
 static DECLARE_INTC_DESC(intc_desc_irq, "sh7760-irq", vectors_irq, groups,
                         mask_registers, prio_registers, NULL);
 
-static struct plat_sci_port sci_platform_data[] = {
-       {
-               .mapbase        = 0xfe600000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 52, 53, 55, 54 },
-       }, {
-               .mapbase        = 0xfe610000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 72, 73, 75, 74 },
-       }, {
-               .mapbase        = 0xfe620000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 76, 77, 79, 78 },
-       }, {
-               .mapbase        = 0xfe480000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCI,
-               .irqs           = { 80, 81, 82, 0 },
-       }, {
-               .flags = 0,
-       }
+static struct plat_sci_port scif0_platform_data = {
+       .mapbase        = 0xfe600000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 52, 53, 55, 54 },
+};
+
+static struct platform_device scif0_device = {
+       .name           = "sh-sci",
+       .id             = 0,
+       .dev            = {
+               .platform_data  = &scif0_platform_data,
+       },
+};
+
+static struct plat_sci_port scif1_platform_data = {
+       .mapbase        = 0xfe610000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 72, 73, 75, 74 },
+};
+
+static struct platform_device scif1_device = {
+       .name           = "sh-sci",
+       .id             = 1,
+       .dev            = {
+               .platform_data  = &scif1_platform_data,
+       },
+};
+
+static struct plat_sci_port scif2_platform_data = {
+       .mapbase        = 0xfe620000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 76, 77, 79, 78 },
+};
+
+static struct platform_device scif2_device = {
+       .name           = "sh-sci",
+       .id             = 2,
+       .dev            = {
+               .platform_data  = &scif2_platform_data,
+       },
+};
+
+static struct plat_sci_port scif3_platform_data = {
+       .mapbase        = 0xfe480000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCI,
+       .irqs           = { 80, 81, 82, 0 },
 };
 
-static struct platform_device sci_device = {
+static struct platform_device scif3_device = {
        .name           = "sh-sci",
-       .id             = -1,
+       .id             = 3,
        .dev            = {
-               .platform_data  = sci_platform_data,
+               .platform_data  = &scif3_platform_data,
        },
 };
 
@@ -254,7 +280,10 @@ static struct platform_device tmu2_device = {
 
 
 static struct platform_device *sh7760_devices[] __initdata = {
-       &sci_device,
+       &scif0_device,
+       &scif1_device,
+       &scif2_device,
+       &scif3_device,
        &tmu0_device,
        &tmu1_device,
        &tmu2_device,
@@ -268,6 +297,10 @@ static int __init sh7760_devices_setup(void)
 arch_initcall(sh7760_devices_setup);
 
 static struct platform_device *sh7760_early_devices[] __initdata = {
+       &scif0_device,
+       &scif1_device,
+       &scif2_device,
+       &scif3_device,
        &tmu0_device,
        &tmu1_device,
        &tmu2_device,
index ac4d5672ec1a25ff053191fa7c60bd46dfaf5da5..45eb1bfd42c9889fb6e4d40b740aeea979a96bcd 100644 (file)
 #include <linux/sh_timer.h>
 #include <asm/clock.h>
 
+/* Serial */
+static struct plat_sci_port scif0_platform_data = {
+       .mapbase        = 0xffe00000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 80, 80, 80, 80 },
+       .clk            = "scif0",
+};
+
+static struct platform_device scif0_device = {
+       .name           = "sh-sci",
+       .id             = 0,
+       .dev            = {
+               .platform_data  = &scif0_platform_data,
+       },
+};
+
+static struct plat_sci_port scif1_platform_data = {
+       .mapbase        = 0xffe10000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 81, 81, 81, 81 },
+       .clk            = "scif1",
+};
+
+static struct platform_device scif1_device = {
+       .name           = "sh-sci",
+       .id             = 1,
+       .dev            = {
+               .platform_data  = &scif1_platform_data,
+       },
+};
+
+static struct plat_sci_port scif2_platform_data = {
+       .mapbase        = 0xffe20000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 82, 82, 82, 82 },
+       .clk            = "scif2",
+};
+
+static struct platform_device scif2_device = {
+       .name           = "sh-sci",
+       .id             = 2,
+       .dev            = {
+               .platform_data  = &scif2_platform_data,
+       },
+};
+
+static struct plat_sci_port scif3_platform_data = {
+       .mapbase        = 0xffe30000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 83, 83, 83, 83 },
+       .clk            = "scif3",
+};
+
+static struct platform_device scif3_device = {
+       .name           = "sh-sci",
+       .id             = 3,
+       .dev            = {
+               .platform_data  = &scif3_platform_data,
+       },
+};
+
 static struct resource iic0_resources[] = {
        [0] = {
                .name   = "IIC0",
@@ -265,52 +330,17 @@ static struct platform_device tmu2_device = {
        .num_resources  = ARRAY_SIZE(tmu2_resources),
 };
 
-static struct plat_sci_port sci_platform_data[] = {
-       {
-               .mapbase        = 0xffe00000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 80, 80, 80, 80 },
-               .clk            = "scif0",
-       }, {
-               .mapbase        = 0xffe10000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 81, 81, 81, 81 },
-               .clk            = "scif1",
-       }, {
-               .mapbase        = 0xffe20000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 82, 82, 82, 82 },
-               .clk            = "scif2",
-       }, {
-               .mapbase        = 0xffe30000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 83, 83, 83, 83 },
-               .clk            = "scif3",
-       }, {
-               .flags = 0,
-       }
-};
-
-static struct platform_device sci_device = {
-       .name           = "sh-sci",
-       .id             = -1,
-       .dev            = {
-               .platform_data  = sci_platform_data,
-       },
-};
-
 static struct platform_device *sh7343_devices[] __initdata = {
+       &scif0_device,
+       &scif1_device,
+       &scif2_device,
+       &scif3_device,
        &cmt_device,
        &tmu0_device,
        &tmu1_device,
        &tmu2_device,
        &iic0_device,
        &iic1_device,
-       &sci_device,
        &vpu_device,
        &veu_device,
        &jpu_device,
@@ -328,6 +358,10 @@ static int __init sh7343_devices_setup(void)
 arch_initcall(sh7343_devices_setup);
 
 static struct platform_device *sh7343_early_devices[] __initdata = {
+       &scif0_device,
+       &scif1_device,
+       &scif2_device,
+       &scif3_device,
        &cmt_device,
        &tmu0_device,
        &tmu1_device,
index 4a9010bf4fd389e2aba11a392a9281dc3102ce22..c494c193e3b6bfce2dda56608fafabba5a4641d1 100644 (file)
 #include <linux/usb/r8a66597.h>
 #include <asm/clock.h>
 
+static struct plat_sci_port scif0_platform_data = {
+       .mapbase        = 0xffe00000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 80, 80, 80, 80 },
+       .clk            = "scif0",
+};
+
+static struct platform_device scif0_device = {
+       .name           = "sh-sci",
+       .id             = 0,
+       .dev            = {
+               .platform_data  = &scif0_platform_data,
+       },
+};
+
 static struct resource iic_resources[] = {
        [0] = {
                .name   = "IIC",
@@ -276,33 +292,13 @@ static struct platform_device tmu2_device = {
        .num_resources  = ARRAY_SIZE(tmu2_resources),
 };
 
-static struct plat_sci_port sci_platform_data[] = {
-       {
-               .mapbase        = 0xffe00000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 80, 80, 80, 80 },
-               .clk            = "scif0",
-       }, {
-               .flags = 0,
-       }
-};
-
-static struct platform_device sci_device = {
-       .name           = "sh-sci",
-       .id             = -1,
-       .dev            = {
-               .platform_data  = sci_platform_data,
-       },
-};
-
 static struct platform_device *sh7366_devices[] __initdata = {
+       &scif0_device,
        &cmt_device,
        &tmu0_device,
        &tmu1_device,
        &tmu2_device,
        &iic_device,
-       &sci_device,
        &usb_host_device,
        &vpu_device,
        &veu0_device,
@@ -321,6 +317,7 @@ static int __init sh7366_devices_setup(void)
 arch_initcall(sh7366_devices_setup);
 
 static struct platform_device *sh7366_early_devices[] __initdata = {
+       &scif0_device,
        &cmt_device,
        &tmu0_device,
        &tmu1_device,
index 5491b094cf05eff5f9b506cffb47364217a149f1..b5335b5e309cd23b53e5b35d155bfcd71e6e630e 100644 (file)
 #include <asm/dma-sh.h>
 #include <cpu/sh7722.h>
 
+/* Serial */
+static struct plat_sci_port scif0_platform_data = {
+       .mapbase        = 0xffe00000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 80, 80, 80, 80 },
+       .clk            = "scif0",
+};
+
+static struct platform_device scif0_device = {
+       .name           = "sh-sci",
+       .id             = 0,
+       .dev            = {
+               .platform_data  = &scif0_platform_data,
+       },
+};
+
+static struct plat_sci_port scif1_platform_data = {
+       .mapbase        = 0xffe10000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 81, 81, 81, 81 },
+       .clk            = "scif1",
+};
+
+static struct platform_device scif1_device = {
+       .name           = "sh-sci",
+       .id             = 1,
+       .dev            = {
+               .platform_data  = &scif1_platform_data,
+       },
+};
+
+static struct plat_sci_port scif2_platform_data = {
+       .mapbase        = 0xffe20000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 82, 82, 82, 82 },
+       .clk            = "scif2",
+};
+
+static struct platform_device scif2_device = {
+       .name           = "sh-sci",
+       .id             = 2,
+       .dev            = {
+               .platform_data  = &scif2_platform_data,
+       },
+};
+
 static struct resource rtc_resources[] = {
        [0] = {
                .start  = 0xa465fec0,
@@ -339,41 +388,6 @@ static struct platform_device tmu2_device = {
        },
 };
 
-static struct plat_sci_port sci_platform_data[] = {
-       {
-               .mapbase        = 0xffe00000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 80, 80, 80, 80 },
-               .clk            = "scif0",
-       },
-       {
-               .mapbase        = 0xffe10000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 81, 81, 81, 81 },
-               .clk            = "scif1",
-       },
-       {
-               .mapbase        = 0xffe20000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 82, 82, 82, 82 },
-               .clk            = "scif2",
-       },
-       {
-               .flags = 0,
-       }
-};
-
-static struct platform_device sci_device = {
-       .name           = "sh-sci",
-       .id             = -1,
-       .dev            = {
-               .platform_data  = sci_platform_data,
-       },
-};
-
 static struct sh_dmae_pdata dma_platform_data = {
        .mode = 0,
 };
@@ -387,6 +401,9 @@ static struct platform_device dma_device = {
 };
 
 static struct platform_device *sh7722_devices[] __initdata = {
+       &scif0_device,
+       &scif1_device,
+       &scif2_device,
        &cmt_device,
        &tmu0_device,
        &tmu1_device,
@@ -394,7 +411,6 @@ static struct platform_device *sh7722_devices[] __initdata = {
        &rtc_device,
        &usbf_device,
        &iic_device,
-       &sci_device,
        &vpu_device,
        &veu_device,
        &jpu_device,
@@ -413,6 +429,9 @@ static int __init sh7722_devices_setup(void)
 arch_initcall(sh7722_devices_setup);
 
 static struct platform_device *sh7722_early_devices[] __initdata = {
+       &scif0_device,
+       &scif1_device,
+       &scif2_device,
        &cmt_device,
        &tmu0_device,
        &tmu1_device,
index 4caa5a7ca86edf0ead7964255a2361955e507c1f..772b9265d0e475f445b30ef6a85940dd45ee2d31 100644 (file)
 #include <asm/mmzone.h>
 #include <cpu/sh7723.h>
 
+/* Serial */
+static struct plat_sci_port scif0_platform_data = {
+       .mapbase        = 0xffe00000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 80, 80, 80, 80 },
+       .clk            = "scif0",
+};
+
+static struct platform_device scif0_device = {
+       .name           = "sh-sci",
+       .id             = 0,
+       .dev            = {
+               .platform_data  = &scif0_platform_data,
+       },
+};
+
+static struct plat_sci_port scif1_platform_data = {
+       .mapbase        = 0xffe10000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 81, 81, 81, 81 },
+       .clk            = "scif1",
+};
+
+static struct platform_device scif1_device = {
+       .name           = "sh-sci",
+       .id             = 1,
+       .dev            = {
+               .platform_data  = &scif1_platform_data,
+       },
+};
+
+static struct plat_sci_port scif2_platform_data = {
+       .mapbase        = 0xffe20000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 82, 82, 82, 82 },
+       .clk            = "scif2",
+};
+
+static struct platform_device scif2_device = {
+       .name           = "sh-sci",
+       .id             = 2,
+       .dev            = {
+               .platform_data  = &scif2_platform_data,
+       },
+};
+
+static struct plat_sci_port scif3_platform_data = {
+       .mapbase        = 0xa4e30000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIFA,
+       .irqs           = { 56, 56, 56, 56 },
+       .clk            = "scif3",
+};
+
+static struct platform_device scif3_device = {
+       .name           = "sh-sci",
+       .id             = 3,
+       .dev            = {
+               .platform_data  = &scif3_platform_data,
+       },
+};
+
+static struct plat_sci_port scif4_platform_data = {
+       .mapbase        = 0xa4e40000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIFA,
+       .irqs           = { 88, 88, 88, 88 },
+       .clk            = "scif4",
+};
+
+static struct platform_device scif4_device = {
+       .name           = "sh-sci",
+       .id             = 4,
+       .dev            = {
+               .platform_data  = &scif4_platform_data,
+       },
+};
+
+static struct plat_sci_port scif5_platform_data = {
+       .mapbase        = 0xa4e50000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIFA,
+       .irqs           = { 109, 109, 109, 109 },
+       .clk            = "scif5",
+};
+
+static struct platform_device scif5_device = {
+       .name           = "sh-sci",
+       .id             = 5,
+       .dev            = {
+               .platform_data  = &scif5_platform_data,
+       },
+};
+
 static struct uio_info vpu_platform_data = {
        .name = "VPU5",
        .version = "0",
@@ -348,56 +445,6 @@ static struct platform_device tmu5_device = {
        },
 };
 
-static struct plat_sci_port sci_platform_data[] = {
-       {
-               .mapbase        = 0xffe00000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 80, 80, 80, 80 },
-               .clk            = "scif0",
-       },{
-               .mapbase        = 0xffe10000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 81, 81, 81, 81 },
-               .clk            = "scif1",
-       },{
-               .mapbase        = 0xffe20000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 82, 82, 82, 82 },
-               .clk            = "scif2",
-       },{
-               .mapbase        = 0xa4e30000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIFA,
-               .irqs           = { 56, 56, 56, 56 },
-               .clk            = "scif3",
-       },{
-               .mapbase        = 0xa4e40000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIFA,
-               .irqs           = { 88, 88, 88, 88 },
-               .clk            = "scif4",
-       },{
-               .mapbase        = 0xa4e50000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIFA,
-               .irqs           = { 109, 109, 109, 109 },
-               .clk            = "scif5",
-       }, {
-               .flags = 0,
-       }
-};
-
-static struct platform_device sci_device = {
-       .name           = "sh-sci",
-       .id             = -1,
-       .dev            = {
-               .platform_data  = sci_platform_data,
-       },
-};
-
 static struct resource rtc_resources[] = {
        [0] = {
                .start  = 0xa465fec0,
@@ -488,6 +535,12 @@ static struct platform_device iic_device = {
 };
 
 static struct platform_device *sh7723_devices[] __initdata = {
+       &scif0_device,
+       &scif1_device,
+       &scif2_device,
+       &scif3_device,
+       &scif4_device,
+       &scif5_device,
        &cmt_device,
        &tmu0_device,
        &tmu1_device,
@@ -495,7 +548,6 @@ static struct platform_device *sh7723_devices[] __initdata = {
        &tmu3_device,
        &tmu4_device,
        &tmu5_device,
-       &sci_device,
        &rtc_device,
        &iic_device,
        &sh7723_usb_host_device,
@@ -516,6 +568,12 @@ static int __init sh7723_devices_setup(void)
 arch_initcall(sh7723_devices_setup);
 
 static struct platform_device *sh7723_early_devices[] __initdata = {
+       &scif0_device,
+       &scif1_device,
+       &scif2_device,
+       &scif3_device,
+       &scif4_device,
+       &scif5_device,
        &cmt_device,
        &tmu0_device,
        &tmu1_device,
index 845e89c936e79d6c9da2d31f67de0907e10c2db3..a52f35117e821ca535600172cad33c99375725cd 100644 (file)
 #include <cpu/sh7724.h>
 
 /* Serial */
-static struct plat_sci_port sci_platform_data[] = {
-       {
-               .mapbase        = 0xffe00000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 80, 80, 80, 80 },
-               .clk            = "scif0",
-       }, {
-               .mapbase        = 0xffe10000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 81, 81, 81, 81 },
-               .clk            = "scif1",
-       }, {
-               .mapbase        = 0xffe20000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 82, 82, 82, 82 },
-               .clk            = "scif2",
-       }, {
-               .mapbase        = 0xa4e30000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIFA,
-               .irqs           = { 56, 56, 56, 56 },
-               .clk            = "scif3",
-       }, {
-               .mapbase        = 0xa4e40000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIFA,
-               .irqs           = { 88, 88, 88, 88 },
-               .clk            = "scif4",
-       }, {
-               .mapbase        = 0xa4e50000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIFA,
-               .irqs           = { 109, 109, 109, 109 },
-               .clk            = "scif5",
-       }, {
-               .flags = 0,
-       }
-};
-
-static struct platform_device sci_device = {
+static struct plat_sci_port scif0_platform_data = {
+       .mapbase        = 0xffe00000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 80, 80, 80, 80 },
+       .clk            = "scif0",
+};
+
+static struct platform_device scif0_device = {
        .name           = "sh-sci",
-       .id             = -1,
+       .id             = 0,
+       .dev            = {
+               .platform_data  = &scif0_platform_data,
+       },
+};
+
+static struct plat_sci_port scif1_platform_data = {
+       .mapbase        = 0xffe10000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 81, 81, 81, 81 },
+       .clk            = "scif1",
+};
+
+static struct platform_device scif1_device = {
+       .name           = "sh-sci",
+       .id             = 1,
+       .dev            = {
+               .platform_data  = &scif1_platform_data,
+       },
+};
+
+static struct plat_sci_port scif2_platform_data = {
+       .mapbase        = 0xffe20000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 82, 82, 82, 82 },
+       .clk            = "scif2",
+};
+
+static struct platform_device scif2_device = {
+       .name           = "sh-sci",
+       .id             = 2,
+       .dev            = {
+               .platform_data  = &scif2_platform_data,
+       },
+};
+
+static struct plat_sci_port scif3_platform_data = {
+       .mapbase        = 0xa4e30000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIFA,
+       .irqs           = { 56, 56, 56, 56 },
+       .clk            = "scif3",
+};
+
+static struct platform_device scif3_device = {
+       .name           = "sh-sci",
+       .id             = 3,
+       .dev            = {
+               .platform_data  = &scif3_platform_data,
+       },
+};
+
+static struct plat_sci_port scif4_platform_data = {
+       .mapbase        = 0xa4e40000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIFA,
+       .irqs           = { 88, 88, 88, 88 },
+       .clk            = "scif4",
+};
+
+static struct platform_device scif4_device = {
+       .name           = "sh-sci",
+       .id             = 4,
+       .dev            = {
+               .platform_data  = &scif4_platform_data,
+       },
+};
+
+static struct plat_sci_port scif5_platform_data = {
+       .mapbase        = 0xa4e50000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIFA,
+       .irqs           = { 109, 109, 109, 109 },
+       .clk            = "scif5",
+};
+
+static struct platform_device scif5_device = {
+       .name           = "sh-sci",
+       .id             = 5,
        .dev            = {
-               .platform_data  = sci_platform_data,
+               .platform_data  = &scif5_platform_data,
        },
 };
 
@@ -590,6 +636,12 @@ static struct platform_device spu1_device = {
 };
 
 static struct platform_device *sh7724_devices[] __initdata = {
+       &scif0_device,
+       &scif1_device,
+       &scif2_device,
+       &scif3_device,
+       &scif4_device,
+       &scif5_device,
        &cmt_device,
        &tmu0_device,
        &tmu1_device,
@@ -597,7 +649,6 @@ static struct platform_device *sh7724_devices[] __initdata = {
        &tmu3_device,
        &tmu4_device,
        &tmu5_device,
-       &sci_device,
        &rtc_device,
        &iic0_device,
        &iic1_device,
@@ -624,6 +675,12 @@ static int __init sh7724_devices_setup(void)
 arch_initcall(sh7724_devices_setup);
 
 static struct platform_device *sh7724_early_devices[] __initdata = {
+       &scif0_device,
+       &scif1_device,
+       &scif2_device,
+       &scif3_device,
+       &scif4_device,
+       &scif5_device,
        &cmt_device,
        &tmu0_device,
        &tmu1_device,
index c470e15f2e03d05457c4f03fccb52bb0b019332e..37e32efbbaa77bad26d11ce8c62a6693c4a339f2 100644 (file)
 #include <linux/mm.h>
 #include <linux/sh_timer.h>
 
+static struct plat_sci_port scif2_platform_data = {
+       .mapbase        = 0xfe4b0000,           /* SCIF2 */
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 40, 40, 40, 40 },
+};
+
+static struct platform_device scif2_device = {
+       .name           = "sh-sci",
+       .id             = 2,
+       .dev            = {
+               .platform_data  = &scif2_platform_data,
+       },
+};
+
+static struct plat_sci_port scif3_platform_data = {
+       .mapbase        = 0xfe4c0000,           /* SCIF3 */
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 76, 76, 76, 76 },
+};
+
+static struct platform_device scif3_device = {
+       .name           = "sh-sci",
+       .id             = 3,
+       .dev            = {
+               .platform_data  = &scif3_platform_data,
+       },
+};
+
+static struct plat_sci_port scif4_platform_data = {
+       .mapbase        = 0xfe4d0000,           /* SCIF4 */
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 104, 104, 104, 104 },
+};
+
+static struct platform_device scif4_device = {
+       .name           = "sh-sci",
+       .id             = 4,
+       .dev            = {
+               .platform_data  = &scif4_platform_data,
+       },
+};
+
 static struct sh_timer_config tmu0_platform_data = {
        .name = "TMU0",
        .channel_offset = 0x04,
@@ -79,39 +124,12 @@ static struct platform_device tmu1_device = {
        .num_resources  = ARRAY_SIZE(tmu1_resources),
 };
 
-static struct plat_sci_port sci_platform_data[] = {
-       {
-               .mapbase        = 0xfe4b0000,           /* SCIF2 */
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 40, 40, 40, 40 },
-       }, {
-               .mapbase        = 0xfe4c0000,           /* SCIF3 */
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 76, 76, 76, 76 },
-       }, {
-               .mapbase        = 0xfe4d0000,           /* SCIF4 */
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 104, 104, 104, 104 },
-       }, {
-               .flags = 0,
-       }
-};
-
-static struct platform_device sci_device = {
-       .name           = "sh-sci",
-       .id             = -1,
-       .dev            = {
-               .platform_data  = sci_platform_data,
-       },
-};
-
 static struct platform_device *sh7757_devices[] __initdata = {
+       &scif2_device,
+       &scif3_device,
+       &scif4_device,
        &tmu0_device,
        &tmu1_device,
-       &sci_device,
 };
 
 static int __init sh7757_devices_setup(void)
@@ -121,6 +139,20 @@ static int __init sh7757_devices_setup(void)
 }
 arch_initcall(sh7757_devices_setup);
 
+static struct platform_device *sh7757_early_devices[] __initdata = {
+       &scif2_device,
+       &scif3_device,
+       &scif4_device,
+       &tmu0_device,
+       &tmu1_device,
+};
+
+void __init plat_early_device_setup(void)
+{
+       early_platform_add_devices(sh7757_early_devices,
+                                  ARRAY_SIZE(sh7757_early_devices));
+}
+
 enum {
        UNUSED = 0,
 
index 4659fff6b842057defff64a65b506714170d3c99..6aba26fec4163c4d6274344218ff527f638f34cb 100644 (file)
 #include <linux/io.h>
 #include <linux/serial_sci.h>
 
+static struct plat_sci_port scif0_platform_data = {
+       .mapbase        = 0xffe00000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 40, 40, 40, 40 },
+};
+
+static struct platform_device scif0_device = {
+       .name           = "sh-sci",
+       .id             = 0,
+       .dev            = {
+               .platform_data  = &scif0_platform_data,
+       },
+};
+
+static struct plat_sci_port scif1_platform_data = {
+       .mapbase        = 0xffe08000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 76, 76, 76, 76 },
+};
+
+static struct platform_device scif1_device = {
+       .name           = "sh-sci",
+       .id             = 1,
+       .dev            = {
+               .platform_data  = &scif1_platform_data,
+       },
+};
+
+static struct plat_sci_port scif2_platform_data = {
+       .mapbase        = 0xffe10000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 104, 104, 104, 104 },
+};
+
+static struct platform_device scif2_device = {
+       .name           = "sh-sci",
+       .id             = 2,
+       .dev            = {
+               .platform_data  = &scif2_platform_data,
+       },
+};
+
 static struct resource rtc_resources[] = {
        [0] = {
                .start  = 0xffe80000,
@@ -36,35 +81,6 @@ static struct platform_device rtc_device = {
        .resource       = rtc_resources,
 };
 
-static struct plat_sci_port sci_platform_data[] = {
-       {
-               .mapbase        = 0xffe00000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 40, 40, 40, 40 },
-       }, {
-               .mapbase        = 0xffe08000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 76, 76, 76, 76 },
-       }, {
-               .mapbase        = 0xffe10000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 104, 104, 104, 104 },
-       }, {
-               .flags = 0,
-       }
-};
-
-static struct platform_device sci_device = {
-       .name           = "sh-sci",
-       .id             = -1,
-       .dev            = {
-               .platform_data  = sci_platform_data,
-       },
-};
-
 static struct resource usb_ohci_resources[] = {
        [0] = {
                .start  = 0xffec8000,
@@ -297,6 +313,9 @@ static struct platform_device tmu5_device = {
 };
 
 static struct platform_device *sh7763_devices[] __initdata = {
+       &scif0_device,
+       &scif1_device,
+       &scif2_device,
        &tmu0_device,
        &tmu1_device,
        &tmu2_device,
@@ -304,7 +323,6 @@ static struct platform_device *sh7763_devices[] __initdata = {
        &tmu4_device,
        &tmu5_device,
        &rtc_device,
-       &sci_device,
        &usb_ohci_device,
        &usbf_device,
 };
@@ -317,6 +335,9 @@ static int __init sh7763_devices_setup(void)
 arch_initcall(sh7763_devices_setup);
 
 static struct platform_device *sh7763_early_devices[] __initdata = {
+       &scif0_device,
+       &scif1_device,
+       &scif2_device,
        &tmu0_device,
        &tmu1_device,
        &tmu2_device,
index eead08d89d32548932e32e6840702e068a538a89..c1643bc9590d8a46581b9569bc2adf4516044ec6 100644 (file)
 #include <linux/sh_timer.h>
 #include <linux/io.h>
 
-static struct plat_sci_port sci_platform_data[] = {
-       {
-               .mapbase        = 0xff923000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 61, 61, 61, 61 },
-       }, {
-               .mapbase        = 0xff924000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 62, 62, 62, 62 },
-       }, {
-               .mapbase        = 0xff925000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 63, 63, 63, 63 },
-       }, {
-               .mapbase        = 0xff926000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 64, 64, 64, 64 },
-       }, {
-               .mapbase        = 0xff927000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 65, 65, 65, 65 },
-       }, {
-               .mapbase        = 0xff928000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 66, 66, 66, 66 },
-       }, {
-               .mapbase        = 0xff929000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 67, 67, 67, 67 },
-       }, {
-               .mapbase        = 0xff92a000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 68, 68, 68, 68 },
-       }, {
-               .mapbase        = 0xff92b000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 69, 69, 69, 69 },
-       }, {
-               .mapbase        = 0xff92c000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 70, 70, 70, 70 },
-       }, {
-               .flags = 0,
-       }
+static struct plat_sci_port scif0_platform_data = {
+       .mapbase        = 0xff923000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 61, 61, 61, 61 },
+};
+
+static struct platform_device scif0_device = {
+       .name           = "sh-sci",
+       .id             = 0,
+       .dev            = {
+               .platform_data  = &scif0_platform_data,
+       },
+};
+
+static struct plat_sci_port scif1_platform_data = {
+       .mapbase        = 0xff924000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 62, 62, 62, 62 },
+};
+
+static struct platform_device scif1_device = {
+       .name           = "sh-sci",
+       .id             = 1,
+       .dev            = {
+               .platform_data  = &scif1_platform_data,
+       },
+};
+
+static struct plat_sci_port scif2_platform_data = {
+       .mapbase        = 0xff925000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 63, 63, 63, 63 },
+};
+
+static struct platform_device scif2_device = {
+       .name           = "sh-sci",
+       .id             = 2,
+       .dev            = {
+               .platform_data  = &scif2_platform_data,
+       },
+};
+
+static struct plat_sci_port scif3_platform_data = {
+       .mapbase        = 0xff926000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 64, 64, 64, 64 },
+};
+
+static struct platform_device scif3_device = {
+       .name           = "sh-sci",
+       .id             = 3,
+       .dev            = {
+               .platform_data  = &scif3_platform_data,
+       },
+};
+
+static struct plat_sci_port scif4_platform_data = {
+       .mapbase        = 0xff927000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 65, 65, 65, 65 },
+};
+
+static struct platform_device scif4_device = {
+       .name           = "sh-sci",
+       .id             = 4,
+       .dev            = {
+               .platform_data  = &scif4_platform_data,
+       },
+};
+
+static struct plat_sci_port scif5_platform_data = {
+       .mapbase        = 0xff928000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 66, 66, 66, 66 },
+};
+
+static struct platform_device scif5_device = {
+       .name           = "sh-sci",
+       .id             = 5,
+       .dev            = {
+               .platform_data  = &scif5_platform_data,
+       },
+};
+
+static struct plat_sci_port scif6_platform_data = {
+       .mapbase        = 0xff929000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 67, 67, 67, 67 },
+};
+
+static struct platform_device scif6_device = {
+       .name           = "sh-sci",
+       .id             = 6,
+       .dev            = {
+               .platform_data  = &scif6_platform_data,
+       },
+};
+
+static struct plat_sci_port scif7_platform_data = {
+       .mapbase        = 0xff92a000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 68, 68, 68, 68 },
+};
+
+static struct platform_device scif7_device = {
+       .name           = "sh-sci",
+       .id             = 7,
+       .dev            = {
+               .platform_data  = &scif7_platform_data,
+       },
+};
+
+static struct plat_sci_port scif8_platform_data = {
+       .mapbase        = 0xff92b000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 69, 69, 69, 69 },
+};
+
+static struct platform_device scif8_device = {
+       .name           = "sh-sci",
+       .id             = 8,
+       .dev            = {
+               .platform_data  = &scif8_platform_data,
+       },
+};
+
+static struct plat_sci_port scif9_platform_data = {
+       .mapbase        = 0xff92c000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 70, 70, 70, 70 },
 };
 
-static struct platform_device sci_device = {
+static struct platform_device scif9_device = {
        .name           = "sh-sci",
-       .id             = -1,
+       .id             = 9,
        .dev            = {
-               .platform_data  = sci_platform_data,
+               .platform_data  = &scif9_platform_data,
        },
 };
 
@@ -351,6 +437,16 @@ static struct platform_device tmu8_device = {
 };
 
 static struct platform_device *sh7770_devices[] __initdata = {
+       &scif0_device,
+       &scif1_device,
+       &scif2_device,
+       &scif3_device,
+       &scif4_device,
+       &scif5_device,
+       &scif6_device,
+       &scif7_device,
+       &scif8_device,
+       &scif9_device,
        &tmu0_device,
        &tmu1_device,
        &tmu2_device,
@@ -360,7 +456,6 @@ static struct platform_device *sh7770_devices[] __initdata = {
        &tmu6_device,
        &tmu7_device,
        &tmu8_device,
-       &sci_device,
 };
 
 static int __init sh7770_devices_setup(void)
@@ -371,6 +466,16 @@ static int __init sh7770_devices_setup(void)
 arch_initcall(sh7770_devices_setup);
 
 static struct platform_device *sh7770_early_devices[] __initdata = {
+       &scif0_device,
+       &scif1_device,
+       &scif2_device,
+       &scif3_device,
+       &scif4_device,
+       &scif5_device,
+       &scif6_device,
+       &scif7_device,
+       &scif8_device,
+       &scif9_device,
        &tmu0_device,
        &tmu1_device,
        &tmu2_device,
index 12ff56f19c5c2f9643140aa4d20838adac5e8844..c310558490d590a52ffa5e1cbdb7055ca3d09fae 100644 (file)
 #include <linux/sh_timer.h>
 #include <asm/dma-sh.h>
 
+static struct plat_sci_port scif0_platform_data = {
+       .mapbase        = 0xffe00000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 40, 40, 40, 40 },
+};
+
+static struct platform_device scif0_device = {
+       .name           = "sh-sci",
+       .id             = 0,
+       .dev            = {
+               .platform_data  = &scif0_platform_data,
+       },
+};
+
+static struct plat_sci_port scif1_platform_data = {
+       .mapbase        = 0xffe10000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 76, 76, 76, 76 },
+};
+
+static struct platform_device scif1_device = {
+       .name           = "sh-sci",
+       .id             = 1,
+       .dev            = {
+               .platform_data  = &scif1_platform_data,
+       },
+};
+
 static struct sh_timer_config tmu0_platform_data = {
        .name = "TMU0",
        .channel_offset = 0x04,
@@ -217,30 +247,6 @@ static struct platform_device rtc_device = {
        .resource       = rtc_resources,
 };
 
-static struct plat_sci_port sci_platform_data[] = {
-       {
-               .mapbase        = 0xffe00000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 40, 40, 40, 40 },
-       }, {
-               .mapbase        = 0xffe10000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 76, 76, 76, 76 },
-       }, {
-               .flags = 0,
-       }
-};
-
-static struct platform_device sci_device = {
-       .name           = "sh-sci",
-       .id             = -1,
-       .dev            = {
-               .platform_data  = sci_platform_data,
-       },
-};
-
 static struct sh_dmae_pdata dma_platform_data = {
        .mode = (SHDMA_MIX_IRQ | SHDMA_DMAOR1),
 };
@@ -254,6 +260,8 @@ static struct platform_device dma_device = {
 };
 
 static struct platform_device *sh7780_devices[] __initdata = {
+       &scif0_device,
+       &scif1_device,
        &tmu0_device,
        &tmu1_device,
        &tmu2_device,
@@ -261,7 +269,6 @@ static struct platform_device *sh7780_devices[] __initdata = {
        &tmu4_device,
        &tmu5_device,
        &rtc_device,
-       &sci_device,
        &dma_device,
 };
 
@@ -271,8 +278,9 @@ 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,
        &tmu0_device,
        &tmu1_device,
        &tmu2_device,
index 7f6c718b6c36e4de8722cf41b571f3c0700bd703..ef26ebda6e8b068ae1b5d33d33ff9283e0b13d0f 100644 (file)
 #include <linux/sh_timer.h>
 #include <asm/mmzone.h>
 
+static struct plat_sci_port scif0_platform_data = {
+       .mapbase        = 0xffea0000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 40, 40, 40, 40 },
+       .clk            = "scif_fck",
+};
+
+static struct platform_device scif0_device = {
+       .name           = "sh-sci",
+       .id             = 0,
+       .dev            = {
+               .platform_data  = &scif0_platform_data,
+       },
+};
+
+static struct plat_sci_port scif1_platform_data = {
+       .mapbase        = 0xffeb0000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 44, 44, 44, 44 },
+       .clk            = "scif_fck",
+};
+
+static struct platform_device scif1_device = {
+       .name           = "sh-sci",
+       .id             = 1,
+       .dev            = {
+               .platform_data  = &scif1_platform_data,
+       },
+};
+
+static struct plat_sci_port scif2_platform_data = {
+       .mapbase        = 0xffec0000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 60, 60, 60, 60 },
+       .clk            = "scif_fck",
+};
+
+static struct platform_device scif2_device = {
+       .name           = "sh-sci",
+       .id             = 2,
+       .dev            = {
+               .platform_data  = &scif2_platform_data,
+       },
+};
+
+static struct plat_sci_port scif3_platform_data = {
+       .mapbase        = 0xffed0000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 61, 61, 61, 61 },
+       .clk            = "scif_fck",
+};
+
+static struct platform_device scif3_device = {
+       .name           = "sh-sci",
+       .id             = 3,
+       .dev            = {
+               .platform_data  = &scif3_platform_data,
+       },
+};
+
+static struct plat_sci_port scif4_platform_data = {
+       .mapbase        = 0xffee0000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 62, 62, 62, 62 },
+       .clk            = "scif_fck",
+};
+
+static struct platform_device scif4_device = {
+       .name           = "sh-sci",
+       .id             = 4,
+       .dev            = {
+               .platform_data  = &scif4_platform_data,
+       },
+};
+
+static struct plat_sci_port scif5_platform_data = {
+       .mapbase        = 0xffef0000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 63, 63, 63, 63 },
+       .clk            = "scif_fck",
+};
+
+static struct platform_device scif5_device = {
+       .name           = "sh-sci",
+       .id             = 5,
+       .dev            = {
+               .platform_data  = &scif5_platform_data,
+       },
+};
+
 static struct sh_timer_config tmu0_platform_data = {
        .name = "TMU0",
        .channel_offset = 0x04,
@@ -198,64 +294,19 @@ static struct platform_device tmu5_device = {
        .num_resources  = ARRAY_SIZE(tmu5_resources),
 };
 
-static struct plat_sci_port sci_platform_data[] = {
-       {
-               .mapbase        = 0xffea0000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 40, 40, 40, 40 },
-               .clk            = "scif_fck",
-       }, {
-               .mapbase        = 0xffeb0000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 44, 44, 44, 44 },
-               .clk            = "scif_fck",
-       }, {
-               .mapbase        = 0xffec0000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 60, 60, 60, 60 },
-               .clk            = "scif_fck",
-       }, {
-               .mapbase        = 0xffed0000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 61, 61, 61, 61 },
-               .clk            = "scif_fck",
-       }, {
-               .mapbase        = 0xffee0000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 62, 62, 62, 62 },
-               .clk            = "scif_fck",
-       }, {
-               .mapbase        = 0xffef0000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 63, 63, 63, 63 },
-               .clk            = "scif_fck",
-       }, {
-               .flags = 0,
-       }
-};
-
-static struct platform_device sci_device = {
-       .name           = "sh-sci",
-       .id             = -1,
-       .dev            = {
-               .platform_data  = sci_platform_data,
-       },
-};
-
 static struct platform_device *sh7785_devices[] __initdata = {
+       &scif0_device,
+       &scif1_device,
+       &scif2_device,
+       &scif3_device,
+       &scif4_device,
+       &scif5_device,
        &tmu0_device,
        &tmu1_device,
        &tmu2_device,
        &tmu3_device,
        &tmu4_device,
        &tmu5_device,
-       &sci_device,
 };
 
 static int __init sh7785_devices_setup(void)
@@ -266,6 +317,12 @@ static int __init sh7785_devices_setup(void)
 arch_initcall(sh7785_devices_setup);
 
 static struct platform_device *sh7785_early_devices[] __initdata = {
+       &scif0_device,
+       &scif1_device,
+       &scif2_device,
+       &scif3_device,
+       &scif4_device,
+       &scif5_device,
        &tmu0_device,
        &tmu1_device,
        &tmu2_device,
index 0104a8ec53691a4ad26c6f80476d4f8c2a9ff361..71673487ace028c9889c3bd9bcaf0e5b203e8ed9 100644 (file)
 #include <linux/sh_timer.h>
 #include <asm/mmzone.h>
 
-static struct plat_sci_port sci_platform_data[] = {
-       {
-               .mapbase        = 0xffea0000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 40, 41, 43, 42 },
+static struct plat_sci_port scif0_platform_data = {
+       .mapbase        = 0xffea0000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 40, 41, 43, 42 },
+};
+
+static struct platform_device scif0_device = {
+       .name           = "sh-sci",
+       .id             = 0,
+       .dev            = {
+               .platform_data  = &scif0_platform_data,
        },
-       /*
-        * The rest of these all have multiplexed IRQs
-        */
-       {
-               .mapbase        = 0xffeb0000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 44, 44, 44, 44 },
-       }, {
-               .mapbase        = 0xffec0000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 50, 50, 50, 50 },
-       }, {
-               .mapbase        = 0xffed0000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 51, 51, 51, 51 },
-       }, {
-               .mapbase        = 0xffee0000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 52, 52, 52, 52 },
-       }, {
-               .mapbase        = 0xffef0000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 53, 53, 53, 53 },
-       }, {
-               .flags = 0,
-       }
 };
 
-static struct platform_device sci_device = {
+/*
+ * The rest of these all have multiplexed IRQs
+ */
+static struct plat_sci_port scif1_platform_data = {
+       .mapbase        = 0xffeb0000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 44, 44, 44, 44 },
+};
+
+static struct platform_device scif1_device = {
        .name           = "sh-sci",
-       .id             = -1,
+       .id             = 1,
+       .dev            = {
+               .platform_data  = &scif1_platform_data,
+       },
+};
+
+static struct plat_sci_port scif2_platform_data = {
+       .mapbase        = 0xffec0000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 50, 50, 50, 50 },
+};
+
+static struct platform_device scif2_device = {
+       .name           = "sh-sci",
+       .id             = 2,
+       .dev            = {
+               .platform_data  = &scif2_platform_data,
+       },
+};
+
+static struct plat_sci_port scif3_platform_data = {
+       .mapbase        = 0xffed0000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 51, 51, 51, 51 },
+};
+
+static struct platform_device scif3_device = {
+       .name           = "sh-sci",
+       .id             = 3,
+       .dev            = {
+               .platform_data  = &scif3_platform_data,
+       },
+};
+
+static struct plat_sci_port scif4_platform_data = {
+       .mapbase        = 0xffee0000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 52, 52, 52, 52 },
+};
+
+static struct platform_device scif4_device = {
+       .name           = "sh-sci",
+       .id             = 4,
+       .dev            = {
+               .platform_data  = &scif4_platform_data,
+       },
+};
+
+static struct plat_sci_port scif5_platform_data = {
+       .mapbase        = 0xffef0000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 53, 53, 53, 53 },
+};
+
+static struct platform_device scif5_device = {
+       .name           = "sh-sci",
+       .id             = 5,
        .dev            = {
-               .platform_data  = sci_platform_data,
+               .platform_data  = &scif5_platform_data,
        },
 };
 
@@ -459,6 +504,12 @@ static struct platform_device usb_ohci_device = {
 };
 
 static struct platform_device *sh7786_early_devices[] __initdata = {
+       &scif0_device,
+       &scif1_device,
+       &scif2_device,
+       &scif3_device,
+       &scif4_device,
+       &scif5_device,
        &tmu0_device,
        &tmu1_device,
        &tmu2_device,
@@ -474,7 +525,6 @@ static struct platform_device *sh7786_early_devices[] __initdata = {
 };
 
 static struct platform_device *sh7786_devices[] __initdata = {
-       &sci_device,
        &usb_ohci_device,
 };
 
index c7ba9166e18a3b6f27a9e1156a4c206b49a0041d..780ba17a5599328d8201ecff188b7567489d20d3 100644 (file)
  * silicon in the first place, we just refuse to deal with the port at
  * all rather than adding infrastructure to hack around it.
  */
-static struct plat_sci_port sci_platform_data[] = {
-       {
-               .mapbase        = 0xffc30000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 40, 41, 43, 42 },
-       }, {
-               .mapbase        = 0xffc40000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 44, 45, 47, 46 },
-       }, {
-               .mapbase        = 0xffc60000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .type           = PORT_SCIF,
-               .irqs           = { 52, 53, 55, 54 },
-       }, {
-               .flags = 0,
-       }
+static struct plat_sci_port scif0_platform_data = {
+       .mapbase        = 0xffc30000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 40, 41, 43, 42 },
+};
+
+static struct platform_device scif0_device = {
+       .name           = "sh-sci",
+       .id             = 0,
+       .dev            = {
+               .platform_data  = &scif0_platform_data,
+       },
+};
+
+static struct plat_sci_port scif1_platform_data = {
+       .mapbase        = 0xffc40000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 44, 45, 47, 46 },
+};
+
+static struct platform_device scif1_device = {
+       .name           = "sh-sci",
+       .id             = 1,
+       .dev            = {
+               .platform_data  = &scif1_platform_data,
+       },
+};
+
+static struct plat_sci_port scif2_platform_data = {
+       .mapbase        = 0xffc60000,
+       .flags          = UPF_BOOT_AUTOCONF,
+       .type           = PORT_SCIF,
+       .irqs           = { 52, 53, 55, 54 },
 };
 
-static struct platform_device sci_device = {
+static struct platform_device scif2_device = {
        .name           = "sh-sci",
-       .id             = -1,
+       .id             = 2,
        .dev            = {
-               .platform_data  = sci_platform_data,
+               .platform_data  = &scif2_platform_data,
        },
 };
 
@@ -236,6 +252,9 @@ static struct platform_device tmu5_device = {
 };
 
 static struct platform_device *shx3_early_devices[] __initdata = {
+       &scif0_device,
+       &scif1_device,
+       &scif2_device,
        &tmu0_device,
        &tmu1_device,
        &tmu2_device,
@@ -244,21 +263,10 @@ static struct platform_device *shx3_early_devices[] __initdata = {
        &tmu5_device,
 };
 
-static struct platform_device *shx3_devices[] __initdata = {
-       &sci_device,
-};
-
 static int __init shx3_devices_setup(void)
 {
-       int ret;
-
-       ret = platform_add_devices(shx3_early_devices,
+       return platform_add_devices(shx3_early_devices,
                                   ARRAY_SIZE(shx3_early_devices));
-       if (unlikely(ret != 0))
-               return ret;
-
-       return platform_add_devices(shx3_devices,
-                                   ARRAY_SIZE(shx3_devices));
 }
 arch_initcall(shx3_devices_setup);
 
index dd4f51ffb50ea81f9af6f0931d27f050a55a1498..4648ccee6c4d2b5ebdf20fb58db5387022ebc2cc 100644 (file)
@@ -34,7 +34,7 @@ static union sh_fpu_union init_fpuregs = {
        }
 };
 
-void save_fpu(struct task_struct *tsk, struct pt_regs *regs)
+void save_fpu(struct task_struct *tsk)
 {
        asm volatile("fst.p     %0, (0*8), fp0\n\t"
                     "fst.p     %0, (1*8), fp2\n\t"
@@ -153,7 +153,7 @@ do_fpu_state_restore(unsigned long ex, struct pt_regs *regs)
        enable_fpu();
        if (last_task_used_math != NULL)
                /* Other processes fpu state, save away */
-               save_fpu(last_task_used_math, regs);
+               save_fpu(last_task_used_math);
 
         last_task_used_math = current;
         if (used_math()) {
index 6a0f82f700323ce02d06fe91f7eb766b48a9b349..e7a3c1e4b60492ba80c8f127d9e0067791cae0eb 100644 (file)
 #include <linux/sh_timer.h>
 #include <asm/addrspace.h>
 
-static struct plat_sci_port sci_platform_data[] = {
-       {
-               .mapbase        = PHYS_PERIPHERAL_BLOCK + 0x01030000,
-               .flags          = UPF_BOOT_AUTOCONF | UPF_IOREMAP,
-               .type           = PORT_SCIF,
-               .irqs           = { 39, 40, 42, 0 },
-       }, {
-               .flags = 0,
-       }
+static struct plat_sci_port scif0_platform_data = {
+       .mapbase        = PHYS_PERIPHERAL_BLOCK + 0x01030000,
+       .flags          = UPF_BOOT_AUTOCONF | UPF_IOREMAP,
+       .type           = PORT_SCIF,
+       .irqs           = { 39, 40, 42, 0 },
 };
 
-static struct platform_device sci_device = {
+static struct platform_device scif0_device = {
        .name           = "sh-sci",
-       .id             = -1,
+       .id             = 0,
        .dev            = {
-               .platform_data  = sci_platform_data,
+               .platform_data  = &scif0_platform_data,
        },
 };
 
@@ -164,13 +160,13 @@ static struct platform_device tmu2_device = {
 };
 
 static struct platform_device *sh5_early_devices[] __initdata = {
+       &scif0_device,
        &tmu0_device,
        &tmu1_device,
        &tmu2_device,
 };
 
 static struct platform_device *sh5_devices[] __initdata = {
-       &sci_device,
        &rtc_device,
 };
 
index 81a46145ffa5b01af702ff04863b19c128d3574b..f8bb50c6e0504e0d6041ff3321629d5ba9c26aeb 100644 (file)
@@ -15,7 +15,6 @@
 #include <linux/io.h>
 #include <linux/delay.h>
 
-#ifdef CONFIG_SH_STANDARD_BIOS
 #include <asm/sh_bios.h>
 
 /*
@@ -57,149 +56,8 @@ static struct console bios_console = {
        .flags          = CON_PRINTBUFFER,
        .index          = -1,
 };
-#endif
 
-#ifdef CONFIG_EARLY_SCIF_CONSOLE
-#include <linux/serial_core.h>
-#include "../../../drivers/serial/sh-sci.h"
-
-#if defined(CONFIG_CPU_SUBTYPE_SH7720) || \
-    defined(CONFIG_CPU_SUBTYPE_SH7721)
-#define EPK_SCSMR_VALUE 0x000
-#define EPK_SCBRR_VALUE 0x00C
-#define EPK_FIFO_SIZE 64
-#define EPK_FIFO_BITS (0x7f00 >> 8)
-#else
-#define EPK_FIFO_SIZE 16
-#define EPK_FIFO_BITS (0x1f00 >> 8)
-#endif
-
-static struct uart_port scif_port = {
-       .type           = PORT_SCIF,
-       .mapbase        = CONFIG_EARLY_SCIF_CONSOLE_PORT,
-       .membase        = (char __iomem *)CONFIG_EARLY_SCIF_CONSOLE_PORT,
-};
-
-static void scif_sercon_putc(int c)
-{
-       while (((sci_in(&scif_port, SCFDR) & EPK_FIFO_BITS) >= EPK_FIFO_SIZE))
-               ;
-
-       sci_in(&scif_port, SCxSR);
-       sci_out(&scif_port, SCxSR, 0xf3 & ~(0x20 | 0x40));
-       sci_out(&scif_port, SCxTDR, c);
-
-       while ((sci_in(&scif_port, SCxSR) & 0x40) == 0)
-               ;
-
-       if (c == '\n')
-               scif_sercon_putc('\r');
-}
-
-static void scif_sercon_write(struct console *con, const char *s,
-                             unsigned count)
-{
-       while (count-- > 0)
-               scif_sercon_putc(*s++);
-}
-
-static int __init scif_sercon_setup(struct console *con, char *options)
-{
-       con->cflag = CREAD | HUPCL | CLOCAL | B115200 | CS8;
-
-       return 0;
-}
-
-static struct console scif_console = {
-       .name           = "sercon",
-       .write          = scif_sercon_write,
-       .setup          = scif_sercon_setup,
-       .flags          = CON_PRINTBUFFER,
-       .index          = -1,
-};
-
-#if !defined(CONFIG_SH_STANDARD_BIOS)
-#if defined(CONFIG_CPU_SUBTYPE_SH7720) || \
-    defined(CONFIG_CPU_SUBTYPE_SH7721)
-static void scif_sercon_init(char *s)
-{
-       sci_out(&scif_port, SCSCR, 0x0000);     /* clear TE and RE */
-       sci_out(&scif_port, SCFCR, 0x4006);     /* reset */
-       sci_out(&scif_port, SCSCR, 0x0000);     /* select internal clock */
-       sci_out(&scif_port, SCSMR, EPK_SCSMR_VALUE);
-       sci_out(&scif_port, SCBRR, EPK_SCBRR_VALUE);
-
-       mdelay(1);      /* wait 1-bit time */
-
-       sci_out(&scif_port, SCFCR, 0x0030);     /* TTRG=b'11 */
-       sci_out(&scif_port, SCSCR, 0x0030);     /* TE, RE */
-}
-#elif defined(CONFIG_CPU_SH4) || defined(CONFIG_CPU_SH3)
-#define DEFAULT_BAUD 115200
-/*
- * Simple SCIF init, primarily aimed at SH7750 and other similar SH-4
- * devices that aren't using sh-ipl+g.
- */
-static void scif_sercon_init(char *s)
-{
-       struct uart_port *port = &scif_port;
-       unsigned baud = DEFAULT_BAUD;
-       unsigned int status;
-       char *e;
-
-       if (*s == ',')
-               ++s;
-
-       if (*s) {
-               /* ignore ioport/device name */
-               s += strcspn(s, ",");
-               if (*s == ',')
-                       s++;
-       }
-
-       if (*s) {
-               baud = simple_strtoul(s, &e, 0);
-               if (baud == 0 || s == e)
-                       baud = DEFAULT_BAUD;
-       }
-
-       do {
-               status = sci_in(port, SCxSR);
-       } while (!(status & SCxSR_TEND(port)));
-
-       sci_out(port, SCSCR, 0);         /* TE=0, RE=0 */
-       sci_out(port, SCFCR, SCFCR_RFRST | SCFCR_TFRST);
-       sci_out(port, SCSMR, 0);
-
-       /* Set baud rate */
-       sci_out(port, SCBRR, (CONFIG_SH_PCLK_FREQ + 16 * baud) /
-               (32 * baud) - 1);
-       udelay((1000000+(baud-1)) / baud); /* Wait one bit interval */
-
-       sci_out(port, SCSPTR, 0);
-       sci_out(port, SCxSR, 0x60);
-       sci_out(port, SCLSR, 0);
-
-       sci_out(port, SCFCR, 0);
-       sci_out(port, SCSCR, 0x30);      /* TE=1, RE=1 */
-}
-#endif /* defined(CONFIG_CPU_SUBTYPE_SH7720) */
-#endif /* !defined(CONFIG_SH_STANDARD_BIOS) */
-#endif /* CONFIG_EARLY_SCIF_CONSOLE */
-
-/*
- * Setup a default console, if more than one is compiled in, rely on the
- * earlyprintk= parsing to give priority.
- */
-static struct console *early_console =
-#ifdef CONFIG_SH_STANDARD_BIOS
-       &bios_console
-#elif defined(CONFIG_EARLY_SCIF_CONSOLE)
-       &scif_console
-#else
-       NULL
-#endif
-       ;
+static struct console *early_console;
 
 static int __init setup_early_printk(char *buf)
 {
@@ -211,21 +69,8 @@ static int __init setup_early_printk(char *buf)
        if (strstr(buf, "keep"))
                keep_early = 1;
 
-#ifdef CONFIG_SH_STANDARD_BIOS
        if (!strncmp(buf, "bios", 4))
                early_console = &bios_console;
-#endif
-#if defined(CONFIG_EARLY_SCIF_CONSOLE)
-       if (!strncmp(buf, "serial", 6)) {
-               early_console = &scif_console;
-
-#if !defined(CONFIG_SH_STANDARD_BIOS)
-#if defined(CONFIG_CPU_SH4) || defined(CONFIG_CPU_SH3)
-               scif_sercon_init(buf + 6);
-#endif
-#endif
-       }
-#endif
 
        if (likely(early_console)) {
                if (keep_early)
index b6f41c109bebe2eb1ad6436d41fe859b605cdc82..a48cdedc73b5f934444b7169a6cae0f583a5f562 100644 (file)
@@ -401,82 +401,10 @@ void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr)
 #endif /* CONFIG_FUNCTION_GRAPH_TRACER */
 
 #ifdef CONFIG_FTRACE_SYSCALLS
-
-extern unsigned long __start_syscalls_metadata[];
-extern unsigned long __stop_syscalls_metadata[];
 extern unsigned long *sys_call_table;
 
-static struct syscall_metadata **syscalls_metadata;
-
-static struct syscall_metadata *find_syscall_meta(unsigned long *syscall)
-{
-       struct syscall_metadata *start;
-       struct syscall_metadata *stop;
-       char str[KSYM_SYMBOL_LEN];
-
-
-       start = (struct syscall_metadata *)__start_syscalls_metadata;
-       stop = (struct syscall_metadata *)__stop_syscalls_metadata;
-       kallsyms_lookup((unsigned long) syscall, NULL, NULL, NULL, str);
-
-       for ( ; start < stop; start++) {
-               if (start->name && !strcmp(start->name, str))
-                       return start;
-       }
-
-       return NULL;
-}
-
-struct syscall_metadata *syscall_nr_to_meta(int nr)
-{
-       if (!syscalls_metadata || nr >= FTRACE_SYSCALL_MAX || nr < 0)
-               return NULL;
-
-       return syscalls_metadata[nr];
-}
-
-int syscall_name_to_nr(char *name)
-{
-       int i;
-
-       if (!syscalls_metadata)
-               return -1;
-       for (i = 0; i < NR_syscalls; i++)
-               if (syscalls_metadata[i])
-                       if (!strcmp(syscalls_metadata[i]->name, name))
-                               return i;
-       return -1;
-}
-
-void set_syscall_enter_id(int num, int id)
-{
-       syscalls_metadata[num]->enter_id = id;
-}
-
-void set_syscall_exit_id(int num, int id)
-{
-       syscalls_metadata[num]->exit_id = id;
-}
-
-static int __init arch_init_ftrace_syscalls(void)
+unsigned long __init arch_syscall_addr(int nr)
 {
-       int i;
-       struct syscall_metadata *meta;
-       unsigned long **psys_syscall_table = &sys_call_table;
-
-       syscalls_metadata = kzalloc(sizeof(*syscalls_metadata) *
-                                       FTRACE_SYSCALL_MAX, GFP_KERNEL);
-       if (!syscalls_metadata) {
-               WARN_ON(1);
-               return -ENOMEM;
-       }
-
-       for (i = 0; i < FTRACE_SYSCALL_MAX; i++) {
-               meta = find_syscall_meta(psys_syscall_table[i]);
-               syscalls_metadata[i] = meta;
-       }
-
-       return 0;
+       return (unsigned long)sys_call_table[nr];
 }
-arch_initcall(arch_init_ftrace_syscalls);
 #endif /* CONFIG_FTRACE_SYSCALLS */
index 359b8a2f4d2e6f72c013a4ddabf29a6cb3cca4d8..31f80c61b031ad5ada25630e17c71a543c9fc59a 100644 (file)
@@ -404,7 +404,7 @@ int dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpu)
        if (fpvalid) {
                if (current == last_task_used_math) {
                        enable_fpu();
-                       save_fpu(tsk, regs);
+                       save_fpu(tsk);
                        disable_fpu();
                        last_task_used_math = 0;
                        regs->sr |= SR_FD;
@@ -431,7 +431,7 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,
 #ifdef CONFIG_SH_FPU
        if(last_task_used_math == current) {
                enable_fpu();
-               save_fpu(current, regs);
+               save_fpu(current);
                disable_fpu();
                last_task_used_math = NULL;
                regs->sr |= SR_FD;
index 952da83903da353ed044702a65a9088214a93611..873ebdc4f98efcaed37132f524f78d35fb7c9d3a 100644 (file)
@@ -82,7 +82,7 @@ get_fpu_long(struct task_struct *task, unsigned long addr)
 
        if (last_task_used_math == task) {
                enable_fpu();
-               save_fpu(task, regs);
+               save_fpu(task);
                disable_fpu();
                last_task_used_math = 0;
                regs->sr |= SR_FD;
@@ -118,7 +118,7 @@ put_fpu_long(struct task_struct *task, unsigned long addr, unsigned long data)
                set_stopped_child_used_math(task);
        } else if (last_task_used_math == task) {
                enable_fpu();
-               save_fpu(task, regs);
+               save_fpu(task);
                disable_fpu();
                last_task_used_math = 0;
                regs->sr |= SR_FD;
index 5a947a2567e4c3e6c164578a97dd1d2ca02b2449..8b0e69792cf47faec445adc8f784d8debf4b2899 100644 (file)
@@ -423,6 +423,9 @@ void __init setup_arch(char **cmdline_p)
 
        plat_early_device_setup();
 
+       /* Let earlyprintk output early console messages */
+       early_platform_driver_probe("earlyprintk", 1, 1);
+
        sh_mv_setup();
 
        /*
index feb3dddd3192b55ba34692b27977bef484c66fbf..ce76dbdef2940fa8e920dcbc8f4bc265a0607b5f 100644 (file)
@@ -314,7 +314,7 @@ setup_sigcontext_fpu(struct pt_regs *regs, struct sigcontext __user *sc)
 
        if (current == last_task_used_math) {
                enable_fpu();
-               save_fpu(current, regs);
+               save_fpu(current);
                disable_fpu();
                last_task_used_math = NULL;
                regs->sr |= SR_FD;
index 19fd11dd9871aadf7c6667eb9d97f473a5e813dc..4bd5a1146956deafcc96afe26be07cbc5ab18b23 100644 (file)
@@ -353,3 +353,4 @@ ENTRY(sys_call_table)
        .long sys_pwritev
        .long sys_rt_tgsigqueueinfo     /* 335 */
        .long sys_perf_event_open
+       .long sys_recvmmsg
index 3da5a125d884cb9079170fb424aa5d5b3ce8adb4..86639beac3a2d1d7b32e44e4ded50e1e1329bfdb 100644 (file)
@@ -452,12 +452,18 @@ int handle_unaligned_access(insn_size_t instruction, struct pt_regs *regs,
        rm = regs->regs[index];
 
        /* shout about fixups */
-       if (!expected && printk_ratelimit())
-               printk(KERN_NOTICE "Fixing up unaligned %s access "
-                      "in \"%s\" pid=%d pc=0x%p ins=0x%04hx\n",
-                      user_mode(regs) ? "userspace" : "kernel",
-                      current->comm, task_pid_nr(current),
-                      (void *)regs->pc, instruction);
+       if (!expected) {
+               if (user_mode(regs) && (se_usermode & 1) && printk_ratelimit())
+                       pr_notice("Fixing up unaligned userspace access "
+                                 "in \"%s\" pid=%d pc=0x%p ins=0x%04hx\n",
+                                 current->comm, task_pid_nr(current),
+                                 (void *)regs->pc, instruction);
+               else if (se_kernmode_warn && printk_ratelimit())
+                       pr_notice("Fixing up unaligned kernel access "
+                                 "in \"%s\" pid=%d pc=0x%p ins=0x%04hx\n",
+                                 current->comm, task_pid_nr(current),
+                                 (void *)regs->pc, instruction);
+       }
 
        ret = -EFAULT;
        switch (instruction&0xF000) {
index 75c0cbe2eda0839785ad8b639a8eed9a0b52b41b..d86f5315a0c1422c54b888153a70927c32e5a6ca 100644 (file)
@@ -600,7 +600,7 @@ static int misaligned_fpu_load(struct pt_regs *regs,
                   indexed by register number. */
                if (last_task_used_math == current) {
                        enable_fpu();
-                       save_fpu(current, regs);
+                       save_fpu(current);
                        disable_fpu();
                        last_task_used_math = NULL;
                        regs->sr |= SR_FD;
@@ -673,7 +673,7 @@ static int misaligned_fpu_store(struct pt_regs *regs,
                   indexed by register number. */
                if (last_task_used_math == current) {
                        enable_fpu();
-                       save_fpu(current, regs);
+                       save_fpu(current);
                        disable_fpu();
                        last_task_used_math = NULL;
                        regs->sr |= SR_FD;
index f36a08bf3d5cd62ba42821e5b511346333206c54..560ddb6bc8a79dd6e480255bb0aefdc45d7ac7f7 100644 (file)
@@ -256,8 +256,7 @@ static void sh4_flush_cache_page(void *args)
                address = (unsigned long)vaddr;
        }
 
-       if (pages_do_alias(address, phys))
-               flush_cache_one(CACHE_OC_ADDRESS_ARRAY |
+       flush_cache_one(CACHE_OC_ADDRESS_ARRAY |
                        (address & shm_align_mask), phys);
 
        if (vma->vm_flags & VM_EXEC)
index a86eaa9d75a5a6e4d776820dbde9b6e5542de0e9..2141befb4f918c3ab98b020d8cd8e9598cccaefa 100644 (file)
  * have to convert them into an offset in a page-aligned mapping, but the
  * caller shouldn't need to know that small detail.
  */
-void __iomem *__ioremap(unsigned long phys_addr, unsigned long size,
-                       unsigned long flags)
+void __iomem *__ioremap_caller(unsigned long phys_addr, unsigned long size,
+                              unsigned long flags, void *caller)
 {
-       struct vm_struct * area;
+       struct vm_struct *area;
        unsigned long offset, last_addr, addr, orig_addr;
        pgprot_t pgprot;
 
@@ -67,7 +67,7 @@ void __iomem *__ioremap(unsigned long phys_addr, unsigned long size,
        /*
         * Ok, go for it..
         */
-       area = get_vm_area(size, VM_IOREMAP);
+       area = get_vm_area_caller(size, VM_IOREMAP, caller);
        if (!area)
                return NULL;
        area->phys_addr = phys_addr;
@@ -103,7 +103,7 @@ void __iomem *__ioremap(unsigned long phys_addr, unsigned long size,
 
        return (void __iomem *)(offset + (char *)orig_addr);
 }
-EXPORT_SYMBOL(__ioremap);
+EXPORT_SYMBOL(__ioremap_caller);
 
 void __iounmap(void __iomem *addr)
 {
index b16843d02b76f424051988266c58488d8c93951f..ef434657d4284d5de6fda890f7a75bf32d99993c 100644 (file)
@@ -258,15 +258,15 @@ static void shmedia_unmapioaddr(unsigned long vaddr)
        pte_clear(&init_mm, vaddr, ptep);
 }
 
-void __iomem *__ioremap(unsigned long offset, unsigned long size,
-                       unsigned long flags)
+void __iomem *__ioremap_caller(unsigned long offset, unsigned long size,
+                              unsigned long flags, void *caller)
 {
        char name[14];
 
        sprintf(name, "phys_%08x", (u32)offset);
        return shmedia_alloc_io(offset, size, name, flags);
 }
-EXPORT_SYMBOL(__ioremap);
+EXPORT_SYMBOL(__ioremap_caller);
 
 void __iounmap(void __iomem *virtual)
 {
index 6c524446c0f6f49952e3757bde91b126c1ac3af8..422e9272187860b24842d938a505e6585056fed9 100644 (file)
@@ -28,7 +28,7 @@ void __init setup_memory(void)
 {
        unsigned long free_pfn = PFN_UP(__pa(_end));
        u64 base = min_low_pfn << PAGE_SHIFT;
-       u64 size = (max_low_pfn << PAGE_SHIFT) - min_low_pfn;
+       u64 size = (max_low_pfn << PAGE_SHIFT) - base;
 
        lmb_add(base, size);
 
@@ -37,6 +37,15 @@ void __init setup_memory(void)
                    (PFN_PHYS(free_pfn) + PAGE_SIZE - 1) -
                    (__MEMORY_START + CONFIG_ZERO_PAGE_OFFSET));
 
+       /*
+        * Reserve physical pages below CONFIG_ZERO_PAGE_OFFSET.
+        */
+       if (CONFIG_ZERO_PAGE_OFFSET != 0)
+               lmb_reserve(__MEMORY_START, CONFIG_ZERO_PAGE_OFFSET);
+
+       lmb_analyze();
+       lmb_dump_all();
+
        /*
         * Node 0 sets up its pgdat at the first available pfn,
         * and bumps it up before setting up the bootmem allocator.
@@ -71,7 +80,7 @@ void __init setup_bootmem_node(int nid, unsigned long start, unsigned long end)
 
        /* Node-local pgdat */
        NODE_DATA(nid) = __va(lmb_alloc_base(sizeof(struct pglist_data),
-                                            SMP_CACHE_BYTES, end_pfn));
+                                            SMP_CACHE_BYTES, end));
        memset(NODE_DATA(nid), 0, sizeof(struct pglist_data));
 
        NODE_DATA(nid)->bdata = &bootmem_node_data[nid];
@@ -81,7 +90,7 @@ void __init setup_bootmem_node(int nid, unsigned long start, unsigned long end)
        /* Node-local bootmap */
        bootmap_pages = bootmem_bootmap_pages(end_pfn - start_pfn);
        bootmem_paddr = lmb_alloc_base(bootmap_pages << PAGE_SHIFT,
-                                      PAGE_SIZE, end_pfn);
+                                      PAGE_SIZE, end);
        init_bootmem_node(NODE_DATA(nid), bootmem_paddr >> PAGE_SHIFT,
                          start_pfn, end_pfn);
 
index 7e3f4ff58cfd346768a3b5f30780357d48c2edf8..68c7f6cfd728d479f24a63c74f3231d787f81c73 100644 (file)
@@ -1043,10 +1043,14 @@ static void __devinit sci_init_single(struct platform_device *dev,
        sci_port->port.iotype   = UPIO_MEM;
        sci_port->port.line     = index;
        sci_port->port.fifosize = 1;
-       sci_port->iclk          = p->clk ? clk_get(&dev->dev, p->clk) : NULL;
-       sci_port->dclk          = clk_get(&dev->dev, "peripheral_clk");
-       sci_port->enable        = sci_clk_enable;
-       sci_port->disable       = sci_clk_disable;
+
+       if (dev) {
+               sci_port->iclk = p->clk ? clk_get(&dev->dev, p->clk) : NULL;
+               sci_port->dclk = clk_get(&dev->dev, "peripheral_clk");
+               sci_port->enable = sci_clk_enable;
+               sci_port->disable = sci_clk_disable;
+               sci_port->port.dev = &dev->dev;
+       }
 
        sci_port->break_timer.data = (unsigned long)sci_port;
        sci_port->break_timer.function = sci_break_timer;
@@ -1057,7 +1061,6 @@ static void __devinit sci_init_single(struct platform_device *dev,
 
        sci_port->port.irq      = p->irqs[SCIx_TXI_IRQ];
        sci_port->port.flags    = p->flags;
-       sci_port->port.dev      = &dev->dev;
        sci_port->type          = sci_port->port.type = p->type;
 
        memcpy(&sci_port->irqs, &p->irqs, sizeof(p->irqs));
@@ -1101,7 +1104,7 @@ static void serial_console_write(struct console *co, const char *s,
                sci_port->disable(port);
 }
 
-static int __init serial_console_setup(struct console *co, char *options)
+static int __devinit serial_console_setup(struct console *co, char *options)
 {
        struct sci_port *sci_port;
        struct uart_port *port;
@@ -1119,9 +1122,14 @@ static int __init serial_console_setup(struct console *co, char *options)
        if (co->index >= SCI_NPORTS)
                co->index = 0;
 
-       sci_port = &sci_ports[co->index];
-       port = &sci_port->port;
-       co->data = port;
+       if (co->data) {
+               port = co->data;
+               sci_port = to_sci_port(port);
+       } else {
+               sci_port = &sci_ports[co->index];
+               port = &sci_port->port;
+               co->data = port;
+       }
 
        /*
         * Also need to check port->type, we don't actually have any
@@ -1165,6 +1173,15 @@ static int __init sci_console_init(void)
        return 0;
 }
 console_initcall(sci_console_init);
+
+static struct sci_port early_serial_port;
+static struct console early_serial_console = {
+       .name           = "early_ttySC",
+       .write          = serial_console_write,
+       .flags          = CON_PRINTBUFFER,
+};
+static char early_serial_buf[32];
+
 #endif /* CONFIG_SERIAL_SH_SCI_CONSOLE */
 
 #if defined(CONFIG_SERIAL_SH_SCI_CONSOLE)
@@ -1250,6 +1267,21 @@ static int __devinit sci_probe(struct platform_device *dev)
        struct sh_sci_priv *priv;
        int i, ret = -EINVAL;
 
+#ifdef CONFIG_SERIAL_SH_SCI_CONSOLE
+       if (is_early_platform_device(dev)) {
+               if (dev->id == -1)
+                       return -ENOTSUPP;
+               early_serial_console.index = dev->id;
+               early_serial_console.data = &early_serial_port.port;
+               sci_init_single(NULL, &early_serial_port, dev->id, p);
+               serial_console_setup(&early_serial_console, early_serial_buf);
+               if (!strstr(early_serial_buf, "keep"))
+                       early_serial_console.flags |= CON_BOOT;
+               register_console(&early_serial_console);
+               return 0;
+       }
+#endif
+
        priv = kzalloc(sizeof(*priv), GFP_KERNEL);
        if (!priv)
                return -ENOMEM;
@@ -1349,6 +1381,10 @@ static void __exit sci_exit(void)
        uart_unregister_driver(&sci_uart_driver);
 }
 
+#ifdef CONFIG_SERIAL_SH_SCI_CONSOLE
+early_platform_init_buffer("earlyprintk", &sci_driver,
+                          early_serial_buf, ARRAY_SIZE(early_serial_buf));
+#endif
 module_init(sci_init);
 module_exit(sci_exit);
 
index a7e5c2e9986c0c700cf76f154f5c3c907914166d..d5d7f23c19a5e5bdc399670994c324bb3e08dbff 100644 (file)
@@ -806,6 +806,8 @@ static int intc_suspend(struct sys_device *dev, pm_message_t state)
                if (d->state.event != PM_EVENT_FREEZE)
                        break;
                for_each_irq_desc(irq, desc) {
+                       if (desc->handle_irq == intc_redirect_irq)
+                               continue;
                        if (desc->chip != &d->chip)
                                continue;
                        if (desc->status & IRQ_DISABLED)
index 841ed5030c8f82f15d22ff0b74fff26cd903f244..082604edc4c2943d16678411498f33ddff560e46 100644 (file)
@@ -71,7 +71,7 @@ static void gpio_write_bit(struct pinmux_data_reg *dr,
 
        pos = dr->reg_width - (in_pos + 1);
 
-       pr_debug("write_bit addr = %lx, value = %ld, pos = %ld, "
+       pr_debug("write_bit addr = %lx, value = %d, pos = %ld, "
                 "r_width = %ld\n",
                 dr->reg, !!value, pos, dr->reg_width);
 
index 8a65fb6648a621b06568823fabef62a4d3832f4c..a69830d26f7fbdd7a050ef5daa39522b1962b60a 100644 (file)
@@ -281,6 +281,7 @@ static void sh_mobile_lcdc_deferred_io(struct fb_info *info,
                                       struct list_head *pagelist)
 {
        struct sh_mobile_lcdc_chan *ch = info->par;
+       struct sh_mobile_lcdc_board_cfg *bcfg = &ch->cfg.board_cfg;
 
        /* enable clocks before accessing hardware */
        sh_mobile_lcdc_clk_on(ch->lcdc);
@@ -305,10 +306,17 @@ static void sh_mobile_lcdc_deferred_io(struct fb_info *info,
 
                /* trigger panel update */
                dma_map_sg(info->dev, ch->sglist, nr_pages, DMA_TO_DEVICE);
+               if (bcfg->start_transfer)
+                       bcfg->start_transfer(bcfg->board_data, ch,
+                                            &sh_mobile_lcdc_sys_bus_ops);
                lcdc_write_chan(ch, LDSM2R, 1);
                dma_unmap_sg(info->dev, ch->sglist, nr_pages, DMA_TO_DEVICE);
-       } else
+       } else {
+               if (bcfg->start_transfer)
+                       bcfg->start_transfer(bcfg->board_data, ch,
+                                            &sh_mobile_lcdc_sys_bus_ops);
                lcdc_write_chan(ch, LDSM2R, 1);
+       }
 }
 
 static void sh_mobile_lcdc_deferred_io_touch(struct fb_info *info)
index 25144ab22b95615df87e58f317a7f5c97a8b2a4b..288205457713bab6191e42e7a8f99bd01861ec51 100644 (file)
@@ -50,6 +50,8 @@ struct sh_mobile_lcdc_board_cfg {
        void *board_data;
        int (*setup_sys)(void *board_data, void *sys_ops_handle,
                         struct sh_mobile_lcdc_sys_bus_ops *sys_ops);
+       void (*start_transfer)(void *board_data, void *sys_ops_handle,
+                              struct sh_mobile_lcdc_sys_bus_ops *sys_ops);
        void (*display_on)(void *board_data);
        void (*display_off)(void *board_data);
 };