Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6

* 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
...

+1946 -1092
-44
arch/sh/Kconfig.debug
··· 19 19 mask ROM and no flash (WindowsCE machines fall in this category). 20 20 If unsure, say N. 21 21 22 - config EARLY_SCIF_CONSOLE 23 - bool "Use early SCIF console" 24 - help 25 - This enables an early console using a fixed SCIF port. This can 26 - be used by platforms that are either not running the SH 27 - standard BIOS, or do not wish to use the BIOS callbacks for the 28 - serial I/O. 29 - 30 - config EARLY_SCIF_CONSOLE_PORT 31 - hex 32 - depends on EARLY_SCIF_CONSOLE 33 - default "0xa4400000" if CPU_SUBTYPE_SH7712 || CPU_SUBTYPE_SH7705 34 - default "0xa4430000" if CPU_SUBTYPE_SH7720 || CPU_SUBTYPE_SH7721 35 - default "0xf8420000" if CPU_SUBTYPE_SH7619 36 - default "0xff804000" if CPU_SUBTYPE_MXG 37 - default "0xffc30000" if CPU_SUBTYPE_SHX3 38 - default "0xffe00000" if CPU_SUBTYPE_SH7780 || CPU_SUBTYPE_SH7763 || \ 39 - CPU_SUBTYPE_SH7722 || CPU_SUBTYPE_SH7366 || \ 40 - CPU_SUBTYPE_SH7343 41 - default "0xfe4c0000" if CPU_SUBTYPE_SH7757 42 - default "0xffeb0000" if CPU_SUBTYPE_SH7785 43 - default "0xffeb0000" if CPU_SUBTYPE_SH7786 44 - default "0xfffe8000" if CPU_SUBTYPE_SH7203 45 - default "0xfffe9800" if CPU_SUBTYPE_SH7206 || CPU_SUBTYPE_SH7263 46 - default "0xffe80000" if CPU_SH4 47 - default "0xa4000150" if CPU_SH3 48 - default "0x00000000" 49 - 50 - config EARLY_PRINTK 51 - bool "Early printk support" 52 - depends on SH_STANDARD_BIOS || EARLY_SCIF_CONSOLE 53 - help 54 - Say Y here to redirect kernel printk messages to the serial port 55 - used by the SH-IPL bootloader, starting very early in the boot 56 - process and ending when the kernel's serial console is initialised. 57 - This option is only useful porting the kernel to a new machine, 58 - when the kernel may crash or hang before the serial console is 59 - initialised. If unsure, say N. 60 - 61 - On devices that are running SH-IPL and want to keep the port 62 - initialization consistent while not using the BIOS callbacks, 63 - select both the EARLY_SCIF_CONSOLE and SH_STANDARD_BIOS, using 64 - the kernel command line option to toggle back and forth. 65 - 66 22 config STACK_DEBUG 67 23 bool "Check for stack overflows" 68 24 depends on DEBUG_KERNEL && SUPERH32
+2 -1
arch/sh/boards/mach-ap325rxa/setup.c
··· 323 323 .height = 480, 324 324 }, 325 325 .bus_param = SOCAM_PCLK_SAMPLE_RISING | SOCAM_HSYNC_ACTIVE_HIGH | 326 - SOCAM_VSYNC_ACTIVE_HIGH | SOCAM_MASTER | SOCAM_DATAWIDTH_8, 326 + SOCAM_VSYNC_ACTIVE_HIGH | SOCAM_MASTER | SOCAM_DATAWIDTH_8 | 327 + SOCAM_DATA_ACTIVE_HIGH, 327 328 .set_capture = camera_set_capture, 328 329 }; 329 330
+320 -2
arch/sh/boards/mach-ecovec24/setup.c
··· 19 19 #include <linux/usb/r8a66597.h> 20 20 #include <linux/i2c.h> 21 21 #include <linux/i2c/tsc2007.h> 22 + #include <linux/spi/spi.h> 23 + #include <linux/spi/sh_msiof.h> 24 + #include <linux/spi/mmc_spi.h> 25 + #include <linux/mmc/host.h> 22 26 #include <linux/input.h> 23 27 #include <linux/input/sh_keysc.h> 24 28 #include <linux/mfd/sh_mobile_sdhi.h> 25 29 #include <video/sh_mobile_lcdc.h> 30 + #include <sound/sh_fsi.h> 26 31 #include <media/sh_mobile_ceu.h> 32 + #include <media/tw9910.h> 33 + #include <media/mt9t112.h> 27 34 #include <asm/heartbeat.h> 28 35 #include <asm/sh_eth.h> 29 36 #include <asm/clock.h> ··· 345 338 }; 346 339 347 340 /* I2C device */ 341 + static struct i2c_board_info i2c0_devices[] = { 342 + { 343 + I2C_BOARD_INFO("da7210", 0x1a), 344 + }, 345 + }; 346 + 348 347 static struct i2c_board_info i2c1_devices[] = { 349 348 { 350 349 I2C_BOARD_INFO("r2025sd", 0x32), ··· 434 421 .irq = IRQ0, 435 422 }; 436 423 424 + #ifdef CONFIG_MFD_SH_MOBILE_SDHI 437 425 /* SHDI0 */ 438 426 static void sdhi0_set_pwr(struct platform_device *pdev, int state) 439 427 { ··· 507 493 }, 508 494 }; 509 495 496 + #else 497 + 498 + static int mmc_spi_get_ro(struct device *dev) 499 + { 500 + return gpio_get_value(GPIO_PTY6); 501 + } 502 + 503 + static int mmc_spi_get_cd(struct device *dev) 504 + { 505 + return !gpio_get_value(GPIO_PTY7); 506 + } 507 + 508 + static void mmc_spi_setpower(struct device *dev, unsigned int maskval) 509 + { 510 + gpio_set_value(GPIO_PTB6, maskval ? 1 : 0); 511 + } 512 + 513 + static struct mmc_spi_platform_data mmc_spi_info = { 514 + .get_ro = mmc_spi_get_ro, 515 + .get_cd = mmc_spi_get_cd, 516 + .caps = MMC_CAP_NEEDS_POLL, 517 + .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, /* 3.3V only */ 518 + .setpower = mmc_spi_setpower, 519 + }; 520 + 521 + static struct spi_board_info spi_bus[] = { 522 + { 523 + .modalias = "mmc_spi", 524 + .platform_data = &mmc_spi_info, 525 + .max_speed_hz = 5000000, 526 + .mode = SPI_MODE_0, 527 + .controller_data = (void *) GPIO_PTM4, 528 + }, 529 + }; 530 + 531 + static struct sh_msiof_spi_info msiof0_data = { 532 + .num_chipselect = 1, 533 + }; 534 + 535 + static struct resource msiof0_resources[] = { 536 + [0] = { 537 + .name = "MSIOF0", 538 + .start = 0xa4c40000, 539 + .end = 0xa4c40063, 540 + .flags = IORESOURCE_MEM, 541 + }, 542 + [1] = { 543 + .start = 84, 544 + .flags = IORESOURCE_IRQ, 545 + }, 546 + }; 547 + 548 + static struct platform_device msiof0_device = { 549 + .name = "spi_sh_msiof", 550 + .id = 0, /* MSIOF0 */ 551 + .dev = { 552 + .platform_data = &msiof0_data, 553 + }, 554 + .num_resources = ARRAY_SIZE(msiof0_resources), 555 + .resource = msiof0_resources, 556 + .archdata = { 557 + .hwblk_id = HWBLK_MSIOF0, 558 + }, 559 + }; 560 + 561 + #endif 562 + 563 + /* I2C Video/Camera */ 564 + static struct i2c_board_info i2c_camera[] = { 565 + { 566 + I2C_BOARD_INFO("tw9910", 0x45), 567 + }, 568 + { 569 + /* 1st camera */ 570 + I2C_BOARD_INFO("mt9t112", 0x3c), 571 + }, 572 + { 573 + /* 2nd camera */ 574 + I2C_BOARD_INFO("mt9t112", 0x3c), 575 + }, 576 + }; 577 + 578 + /* tw9910 */ 579 + static int tw9910_power(struct device *dev, int mode) 580 + { 581 + int val = mode ? 0 : 1; 582 + 583 + gpio_set_value(GPIO_PTU2, val); 584 + if (mode) 585 + mdelay(100); 586 + 587 + return 0; 588 + } 589 + 590 + static struct tw9910_video_info tw9910_info = { 591 + .buswidth = SOCAM_DATAWIDTH_8, 592 + .mpout = TW9910_MPO_FIELD, 593 + }; 594 + 595 + static struct soc_camera_link tw9910_link = { 596 + .i2c_adapter_id = 0, 597 + .bus_id = 1, 598 + .power = tw9910_power, 599 + .board_info = &i2c_camera[0], 600 + .module_name = "tw9910", 601 + .priv = &tw9910_info, 602 + }; 603 + 604 + /* mt9t112 */ 605 + static int mt9t112_power1(struct device *dev, int mode) 606 + { 607 + gpio_set_value(GPIO_PTA3, mode); 608 + if (mode) 609 + mdelay(100); 610 + 611 + return 0; 612 + } 613 + 614 + static struct mt9t112_camera_info mt9t112_info1 = { 615 + .flags = MT9T112_FLAG_PCLK_RISING_EDGE | MT9T112_FLAG_DATAWIDTH_8, 616 + .divider = { 0x49, 0x6, 0, 6, 0, 9, 9, 6, 0 }, /* for 24MHz */ 617 + }; 618 + 619 + static struct soc_camera_link mt9t112_link1 = { 620 + .i2c_adapter_id = 0, 621 + .power = mt9t112_power1, 622 + .bus_id = 0, 623 + .board_info = &i2c_camera[1], 624 + .module_name = "mt9t112", 625 + .priv = &mt9t112_info1, 626 + }; 627 + 628 + static int mt9t112_power2(struct device *dev, int mode) 629 + { 630 + gpio_set_value(GPIO_PTA4, mode); 631 + if (mode) 632 + mdelay(100); 633 + 634 + return 0; 635 + } 636 + 637 + static struct mt9t112_camera_info mt9t112_info2 = { 638 + .flags = MT9T112_FLAG_PCLK_RISING_EDGE | MT9T112_FLAG_DATAWIDTH_8, 639 + .divider = { 0x49, 0x6, 0, 6, 0, 9, 9, 6, 0 }, /* for 24MHz */ 640 + }; 641 + 642 + static struct soc_camera_link mt9t112_link2 = { 643 + .i2c_adapter_id = 1, 644 + .power = mt9t112_power2, 645 + .bus_id = 1, 646 + .board_info = &i2c_camera[2], 647 + .module_name = "mt9t112", 648 + .priv = &mt9t112_info2, 649 + }; 650 + 651 + static struct platform_device camera_devices[] = { 652 + { 653 + .name = "soc-camera-pdrv", 654 + .id = 0, 655 + .dev = { 656 + .platform_data = &tw9910_link, 657 + }, 658 + }, 659 + { 660 + .name = "soc-camera-pdrv", 661 + .id = 1, 662 + .dev = { 663 + .platform_data = &mt9t112_link1, 664 + }, 665 + }, 666 + { 667 + .name = "soc-camera-pdrv", 668 + .id = 2, 669 + .dev = { 670 + .platform_data = &mt9t112_link2, 671 + }, 672 + }, 673 + }; 674 + 675 + /* FSI */ 676 + /* 677 + * FSI-B use external clock which came from da7210. 678 + * So, we should change parent of fsi 679 + */ 680 + #define FCLKBCR 0xa415000c 681 + static void fsimck_init(struct clk *clk) 682 + { 683 + u32 status = ctrl_inl(clk->enable_reg); 684 + 685 + /* use external clock */ 686 + status &= ~0x000000ff; 687 + status |= 0x00000080; 688 + 689 + ctrl_outl(status, clk->enable_reg); 690 + } 691 + 692 + static struct clk_ops fsimck_clk_ops = { 693 + .init = fsimck_init, 694 + }; 695 + 696 + static struct clk fsimckb_clk = { 697 + .name = "fsimckb_clk", 698 + .id = -1, 699 + .ops = &fsimck_clk_ops, 700 + .enable_reg = (void __iomem *)FCLKBCR, 701 + .rate = 0, /* unknown */ 702 + }; 703 + 704 + struct sh_fsi_platform_info fsi_info = { 705 + .portb_flags = SH_FSI_BRS_INV | 706 + SH_FSI_OUT_SLAVE_MODE | 707 + SH_FSI_IN_SLAVE_MODE | 708 + SH_FSI_OFMT(I2S) | 709 + SH_FSI_IFMT(I2S), 710 + }; 711 + 712 + static struct resource fsi_resources[] = { 713 + [0] = { 714 + .name = "FSI", 715 + .start = 0xFE3C0000, 716 + .end = 0xFE3C021d, 717 + .flags = IORESOURCE_MEM, 718 + }, 719 + [1] = { 720 + .start = 108, 721 + .flags = IORESOURCE_IRQ, 722 + }, 723 + }; 724 + 725 + static struct platform_device fsi_device = { 726 + .name = "sh_fsi", 727 + .id = 0, 728 + .num_resources = ARRAY_SIZE(fsi_resources), 729 + .resource = fsi_resources, 730 + .dev = { 731 + .platform_data = &fsi_info, 732 + }, 733 + .archdata = { 734 + .hwblk_id = HWBLK_SPU, /* FSI needs SPU hwblk */ 735 + }, 736 + }; 737 + 510 738 static struct platform_device *ecovec_devices[] __initdata = { 511 739 &heartbeat_device, 512 740 &nor_flash_device, ··· 759 503 &ceu0_device, 760 504 &ceu1_device, 761 505 &keysc_device, 506 + #ifdef CONFIG_MFD_SH_MOBILE_SDHI 762 507 &sdhi0_device, 763 508 &sdhi1_device, 509 + #else 510 + &msiof0_device, 511 + #endif 512 + &camera_devices[0], 513 + &camera_devices[1], 514 + &camera_devices[2], 515 + &fsi_device, 764 516 }; 765 517 766 518 #define EEPROM_ADDR 0x50 ··· 824 560 825 561 static int __init arch_setup(void) 826 562 { 563 + struct clk *clk; 564 + 827 565 /* register board specific self-refresh code */ 828 566 sh_mobile_register_self_refresh(SUSP_SH_STANDBY | SUSP_SH_SF, 829 567 &ecovec24_sdram_enter_start, ··· 1039 773 gpio_direction_input(GPIO_PTR5); 1040 774 gpio_direction_input(GPIO_PTR6); 1041 775 1042 - /* enable SDHI0 (needs DS2.4 set to ON) */ 776 + #ifdef CONFIG_MFD_SH_MOBILE_SDHI 777 + /* enable SDHI0 on CN11 (needs DS2.4 set to ON) */ 1043 778 gpio_request(GPIO_FN_SDHI0CD, NULL); 1044 779 gpio_request(GPIO_FN_SDHI0WP, NULL); 1045 780 gpio_request(GPIO_FN_SDHI0CMD, NULL); ··· 1052 785 gpio_request(GPIO_PTB6, NULL); 1053 786 gpio_direction_output(GPIO_PTB6, 0); 1054 787 1055 - /* enable SDHI1 (needs DS2.6,7 set to ON,OFF) */ 788 + /* enable SDHI1 on CN12 (needs DS2.6,7 set to ON,OFF) */ 1056 789 gpio_request(GPIO_FN_SDHI1CD, NULL); 1057 790 gpio_request(GPIO_FN_SDHI1WP, NULL); 1058 791 gpio_request(GPIO_FN_SDHI1CMD, NULL); ··· 1066 799 1067 800 /* I/O buffer drive ability is high for SDHI1 */ 1068 801 ctrl_outw((ctrl_inw(IODRIVEA) & ~0x3000) | 0x2000 , IODRIVEA); 802 + #else 803 + /* enable MSIOF0 on CN11 (needs DS2.4 set to OFF) */ 804 + gpio_request(GPIO_FN_MSIOF0_TXD, NULL); 805 + gpio_request(GPIO_FN_MSIOF0_RXD, NULL); 806 + gpio_request(GPIO_FN_MSIOF0_TSCK, NULL); 807 + gpio_request(GPIO_PTM4, NULL); /* software CS control of TSYNC pin */ 808 + gpio_direction_output(GPIO_PTM4, 1); /* active low CS */ 809 + gpio_request(GPIO_PTB6, NULL); /* 3.3V power control */ 810 + gpio_direction_output(GPIO_PTB6, 0); /* disable power by default */ 811 + gpio_request(GPIO_PTY6, NULL); /* write protect */ 812 + gpio_direction_input(GPIO_PTY6); 813 + gpio_request(GPIO_PTY7, NULL); /* card detect */ 814 + gpio_direction_input(GPIO_PTY7); 815 + 816 + spi_register_board_info(spi_bus, ARRAY_SIZE(spi_bus)); 817 + #endif 818 + 819 + /* enable Video */ 820 + gpio_request(GPIO_PTU2, NULL); 821 + gpio_direction_output(GPIO_PTU2, 1); 822 + 823 + /* enable Camera */ 824 + gpio_request(GPIO_PTA3, NULL); 825 + gpio_request(GPIO_PTA4, NULL); 826 + gpio_direction_output(GPIO_PTA3, 0); 827 + gpio_direction_output(GPIO_PTA4, 0); 828 + 829 + /* enable FSI */ 830 + gpio_request(GPIO_FN_FSIMCKB, NULL); 831 + gpio_request(GPIO_FN_FSIIBSD, NULL); 832 + gpio_request(GPIO_FN_FSIOBSD, NULL); 833 + gpio_request(GPIO_FN_FSIIBBCK, NULL); 834 + gpio_request(GPIO_FN_FSIIBLRCK, NULL); 835 + gpio_request(GPIO_FN_FSIOBBCK, NULL); 836 + gpio_request(GPIO_FN_FSIOBLRCK, NULL); 837 + gpio_request(GPIO_FN_CLKAUDIOBO, NULL); 838 + 839 + /* change parent of FSI B */ 840 + clk = clk_get(NULL, "fsib_clk"); 841 + clk_register(&fsimckb_clk); 842 + clk_set_parent(clk, &fsimckb_clk); 843 + clk_set_rate(clk, 11000); 844 + clk_set_rate(&fsimckb_clk, 11000); 845 + clk_put(clk); 846 + 847 + gpio_request(GPIO_PTU0, NULL); 848 + gpio_direction_output(GPIO_PTU0, 0); 849 + mdelay(20); 1069 850 1070 851 /* enable I2C device */ 852 + i2c_register_board_info(0, i2c0_devices, 853 + ARRAY_SIZE(i2c0_devices)); 854 + 1071 855 i2c_register_board_info(1, i2c1_devices, 1072 856 ARRAY_SIZE(i2c1_devices)); 1073 857
+6
arch/sh/boards/mach-kfr2r09/lcd_wqvga.c
··· 273 273 return 0; 274 274 } 275 275 276 + void kfr2r09_lcd_start(void *board_data, void *sohandle, 277 + struct sh_mobile_lcdc_sys_bus_ops *so) 278 + { 279 + write_memory_start(sohandle, so); 280 + } 281 + 276 282 #define CTRL_CKSW 0x10 277 283 #define CTRL_C10 0x20 278 284 #define CTRL_CPSW 0x80
+1
arch/sh/boards/mach-kfr2r09/setup.c
··· 150 150 }, 151 151 .board_cfg = { 152 152 .setup_sys = kfr2r09_lcd_setup, 153 + .start_transfer = kfr2r09_lcd_start, 153 154 .display_on = kfr2r09_lcd_on, 154 155 .display_off = kfr2r09_lcd_off, 155 156 },
+4 -3
arch/sh/boards/mach-se/7722/irq.c
··· 57 57 */ 58 58 void __init init_se7722_IRQ(void) 59 59 { 60 - int i; 60 + int i, irq; 61 61 62 62 ctrl_outw(0, IRQ01_MASK); /* disable all irqs */ 63 63 ctrl_outw(0x2000, 0xb03fffec); /* mrshpc irq enable */ 64 64 65 65 for (i = 0; i < SE7722_FPGA_IRQ_NR; i++) { 66 - se7722_fpga_irq[i] = create_irq(); 67 - if (se7722_fpga_irq[i] < 0) 66 + irq = create_irq(); 67 + if (irq < 0) 68 68 return; 69 + se7722_fpga_irq[i] = irq; 69 70 70 71 set_irq_chip_and_handler_name(se7722_fpga_irq[i], 71 72 &se7722_irq_chip,
+17
arch/sh/boards/mach-se/7724/setup.c
··· 514 514 &sdhi1_cn8_device, 515 515 }; 516 516 517 + /* I2C device */ 518 + static struct i2c_board_info i2c0_devices[] = { 519 + { 520 + I2C_BOARD_INFO("ak4642", 0x12), 521 + }, 522 + }; 523 + 517 524 #define EEPROM_OP 0xBA206000 518 525 #define EEPROM_ADR 0xBA206004 519 526 #define EEPROM_DATA 0xBA20600C ··· 581 574 extern char ms7724se_sdram_enter_end; 582 575 extern char ms7724se_sdram_leave_start; 583 576 extern char ms7724se_sdram_leave_end; 577 + 578 + 579 + static int __init arch_setup(void) 580 + { 581 + /* enable I2C device */ 582 + i2c_register_board_info(0, i2c0_devices, 583 + ARRAY_SIZE(i2c0_devices)); 584 + return 0; 585 + } 586 + arch_initcall(arch_setup); 584 587 585 588 static int __init devices_setup(void) 586 589 {
+1 -1
arch/sh/configs/ecovec24-romimage_defconfig
··· 203 203 CONFIG_PAGE_OFFSET=0x80000000 204 204 CONFIG_FORCE_MAX_ZONEORDER=11 205 205 CONFIG_MEMORY_START=0x08000000 206 - CONFIG_MEMORY_SIZE=0x08000000 206 + CONFIG_MEMORY_SIZE=0x10000000 207 207 CONFIG_29BIT=y 208 208 # CONFIG_X2TLB is not set 209 209 CONFIG_VSYSCALL=y
+1 -1
arch/sh/configs/ecovec24_defconfig
··· 204 204 CONFIG_PAGE_OFFSET=0x80000000 205 205 CONFIG_FORCE_MAX_ZONEORDER=11 206 206 CONFIG_MEMORY_START=0x08000000 207 - CONFIG_MEMORY_SIZE=0x08000000 207 + CONFIG_MEMORY_SIZE=0x10000000 208 208 CONFIG_29BIT=y 209 209 # CONFIG_X2TLB is not set 210 210 CONFIG_VSYSCALL=y
+1 -1
arch/sh/configs/rts7751r2d1_defconfig
··· 324 324 # CONFIG_UBC_WAKEUP is not set 325 325 CONFIG_CMDLINE_OVERWRITE=y 326 326 # CONFIG_CMDLINE_EXTEND is not set 327 - CONFIG_CMDLINE="console=tty0 console=ttySC0,115200 root=/dev/sda1 earlyprintk=serial" 327 + CONFIG_CMDLINE="console=tty0 console=ttySC1,115200 root=/dev/sda1" 328 328 329 329 # 330 330 # Bus options
+1 -1
arch/sh/configs/rts7751r2dplus_defconfig
··· 324 324 # CONFIG_UBC_WAKEUP is not set 325 325 CONFIG_CMDLINE_OVERWRITE=y 326 326 # CONFIG_CMDLINE_EXTEND is not set 327 - CONFIG_CMDLINE="console=tty0 console=ttySC0,115200 root=/dev/sda1 earlyprintk=serial" 327 + CONFIG_CMDLINE="console=tty0 console=ttySC1,115200 root=/dev/sda1" 328 328 329 329 # 330 330 # Bus options
+9 -2
arch/sh/include/asm/io.h
··· 233 233 * doesn't exist, so everything must go through page tables. 234 234 */ 235 235 #ifdef CONFIG_MMU 236 - void __iomem *__ioremap(unsigned long offset, unsigned long size, 237 - unsigned long flags); 236 + void __iomem *__ioremap_caller(unsigned long offset, unsigned long size, 237 + unsigned long flags, void *caller); 238 238 void __iounmap(void __iomem *addr); 239 + 240 + static inline void __iomem * 241 + __ioremap(unsigned long offset, unsigned long size, unsigned long flags) 242 + { 243 + return __ioremap_caller(offset, size, flags, __builtin_return_address(0)); 244 + } 239 245 240 246 static inline void __iomem * 241 247 __ioremap_mode(unsigned long offset, unsigned long size, unsigned long flags) ··· 277 271 return __ioremap(offset, size, flags); 278 272 } 279 273 #else 274 + #define __ioremap(offset, size, flags) ((void __iomem *)(offset)) 280 275 #define __ioremap_mode(offset, size, flags) ((void __iomem *)(offset)) 281 276 #define __iounmap(addr) do { } while (0) 282 277 #endif /* CONFIG_MMU */
+3 -2
arch/sh/include/asm/pgtable_32.h
··· 344 344 #define pte_special(pte) ((pte).pte_low & _PAGE_SPECIAL) 345 345 346 346 #ifdef CONFIG_X2TLB 347 - #define pte_write(pte) ((pte).pte_high & _PAGE_EXT_USER_WRITE) 347 + #define pte_write(pte) \ 348 + ((pte).pte_high & (_PAGE_EXT_USER_WRITE | _PAGE_EXT_KERN_WRITE)) 348 349 #else 349 350 #define pte_write(pte) ((pte).pte_low & _PAGE_RW) 350 351 #endif ··· 359 358 * individually toggled (and user permissions are entirely decoupled from 360 359 * kernel permissions), we attempt to couple them a bit more sanely here. 361 360 */ 362 - PTE_BIT_FUNC(high, wrprotect, &= ~_PAGE_EXT_USER_WRITE); 361 + PTE_BIT_FUNC(high, wrprotect, &= ~(_PAGE_EXT_USER_WRITE | _PAGE_EXT_KERN_WRITE)); 363 362 PTE_BIT_FUNC(high, mkwrite, |= _PAGE_EXT_USER_WRITE | _PAGE_EXT_KERN_WRITE); 364 363 PTE_BIT_FUNC(high, mkhuge, |= _PAGE_SZHUGE); 365 364 #else
+2 -1
arch/sh/include/asm/unistd_32.h
··· 345 345 #define __NR_pwritev 334 346 346 #define __NR_rt_tgsigqueueinfo 335 347 347 #define __NR_perf_event_open 336 348 + #define __NR_recvmmsg 337 348 349 349 - #define NR_syscalls 337 350 + #define NR_syscalls 338 350 351 351 352 #ifdef __KERNEL__ 352 353
+2 -1
arch/sh/include/asm/unistd_64.h
··· 385 385 #define __NR_pwritev 362 386 386 #define __NR_rt_tgsigqueueinfo 363 387 387 #define __NR_perf_event_open 364 388 + #define __NR_recvmmsg 365 388 389 389 390 #ifdef __KERNEL__ 390 391 391 - #define NR_syscalls 365 392 + #define NR_syscalls 366 392 393 393 394 #define __ARCH_WANT_IPC_PARSE_VERSION 394 395 #define __ARCH_WANT_OLD_READDIR
+6
arch/sh/include/mach-kfr2r09/mach/kfr2r09.h
··· 8 8 void kfr2r09_lcd_off(void *board_data); 9 9 int kfr2r09_lcd_setup(void *board_data, void *sys_ops_handle, 10 10 struct sh_mobile_lcdc_sys_bus_ops *sys_ops); 11 + void kfr2r09_lcd_start(void *board_data, void *sys_ops_handle, 12 + struct sh_mobile_lcdc_sys_bus_ops *sys_ops); 11 13 #else 12 14 static inline void kfr2r09_lcd_on(void *board_data) {} 13 15 static inline void kfr2r09_lcd_off(void *board_data) {} ··· 17 15 struct sh_mobile_lcdc_sys_bus_ops *sys_ops) 18 16 { 19 17 return -ENODEV; 18 + } 19 + static inline void kfr2r09_lcd_start(void *board_data, void *sys_ops_handle, 20 + struct sh_mobile_lcdc_sys_bus_ops *sys_ops) 21 + { 20 22 } 21 23 #endif 22 24
+1 -2
arch/sh/kernel/Makefile
··· 22 22 obj-y += cpu/ 23 23 obj-$(CONFIG_VSYSCALL) += vsyscall/ 24 24 obj-$(CONFIG_SMP) += smp.o 25 - obj-$(CONFIG_SH_STANDARD_BIOS) += sh_bios.o 25 + obj-$(CONFIG_SH_STANDARD_BIOS) += sh_bios.o early_printk.o 26 26 obj-$(CONFIG_KGDB) += kgdb.o 27 27 obj-$(CONFIG_SH_CPU_FREQ) += cpufreq.o 28 28 obj-$(CONFIG_MODULES) += sh_ksyms_$(BITS).o module.o 29 - obj-$(CONFIG_EARLY_PRINTK) += early_printk.o 30 29 obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o 31 30 obj-$(CONFIG_CRASH_DUMP) += crash_dump.o 32 31 obj-$(CONFIG_STACKTRACE) += stacktrace.o
+5 -4
arch/sh/kernel/cpu/irq/ipr.c
··· 17 17 * for more details. 18 18 */ 19 19 #include <linux/init.h> 20 - #include <linux/irq.h> 21 - #include <linux/module.h> 22 - #include <linux/io.h> 23 20 #include <linux/interrupt.h> 21 + #include <linux/io.h> 22 + #include <linux/irq.h> 23 + #include <linux/kernel.h> 24 + #include <linux/module.h> 24 25 #include <linux/topology.h> 25 26 26 27 static inline struct ipr_desc *get_ipr_desc(unsigned int irq) 27 28 { 28 29 struct irq_chip *chip = get_irq_chip(irq); 29 - return (void *)((char *)chip - offsetof(struct ipr_desc, chip)); 30 + return container_of(chip, struct ipr_desc, chip); 30 31 } 31 32 32 33 static void disable_ipr_irq(unsigned int irq)
+44 -23
arch/sh/kernel/cpu/sh2/setup-sh7619.c
··· 59 59 static DECLARE_INTC_DESC(intc_desc, "sh7619", vectors, NULL, 60 60 NULL, prio_registers, NULL); 61 61 62 - static struct plat_sci_port sci_platform_data[] = { 63 - { 64 - .mapbase = 0xf8400000, 65 - .flags = UPF_BOOT_AUTOCONF, 66 - .type = PORT_SCIF, 67 - .irqs = { 88, 88, 88, 88 }, 68 - }, { 69 - .mapbase = 0xf8410000, 70 - .flags = UPF_BOOT_AUTOCONF, 71 - .type = PORT_SCIF, 72 - .irqs = { 92, 92, 92, 92 }, 73 - }, { 74 - .mapbase = 0xf8420000, 75 - .flags = UPF_BOOT_AUTOCONF, 76 - .type = PORT_SCIF, 77 - .irqs = { 96, 96, 96, 96 }, 78 - }, { 79 - .flags = 0, 80 - } 62 + static struct plat_sci_port scif0_platform_data = { 63 + .mapbase = 0xf8400000, 64 + .flags = UPF_BOOT_AUTOCONF, 65 + .type = PORT_SCIF, 66 + .irqs = { 88, 88, 88, 88 }, 81 67 }; 82 68 83 - static struct platform_device sci_device = { 69 + static struct platform_device scif0_device = { 84 70 .name = "sh-sci", 85 - .id = -1, 71 + .id = 0, 86 72 .dev = { 87 - .platform_data = sci_platform_data, 73 + .platform_data = &scif0_platform_data, 74 + }, 75 + }; 76 + 77 + static struct plat_sci_port scif1_platform_data = { 78 + .mapbase = 0xf8410000, 79 + .flags = UPF_BOOT_AUTOCONF, 80 + .type = PORT_SCIF, 81 + .irqs = { 92, 92, 92, 92 }, 82 + }; 83 + 84 + static struct platform_device scif1_device = { 85 + .name = "sh-sci", 86 + .id = 1, 87 + .dev = { 88 + .platform_data = &scif1_platform_data, 89 + }, 90 + }; 91 + 92 + static struct plat_sci_port scif2_platform_data = { 93 + .mapbase = 0xf8420000, 94 + .flags = UPF_BOOT_AUTOCONF, 95 + .type = PORT_SCIF, 96 + .irqs = { 96, 96, 96, 96 }, 97 + }; 98 + 99 + static struct platform_device scif2_device = { 100 + .name = "sh-sci", 101 + .id = 2, 102 + .dev = { 103 + .platform_data = &scif2_platform_data, 88 104 }, 89 105 }; 90 106 ··· 192 176 }; 193 177 194 178 static struct platform_device *sh7619_devices[] __initdata = { 195 - &sci_device, 179 + &scif0_device, 180 + &scif1_device, 181 + &scif2_device, 196 182 &eth_device, 197 183 &cmt0_device, 198 184 &cmt1_device, ··· 213 195 } 214 196 215 197 static struct platform_device *sh7619_early_devices[] __initdata = { 198 + &scif0_device, 199 + &scif1_device, 200 + &scif2_device, 216 201 &cmt0_device, 217 202 &cmt1_device, 218 203 };
+10 -13
arch/sh/kernel/cpu/sh2a/setup-mxg.c
··· 207 207 .num_resources = ARRAY_SIZE(mtu2_2_resources), 208 208 }; 209 209 210 - static struct plat_sci_port sci_platform_data[] = { 211 - { 212 - .mapbase = 0xff804000, 213 - .flags = UPF_BOOT_AUTOCONF, 214 - .type = PORT_SCIF, 215 - .irqs = { 220, 220, 220, 220 }, 216 - }, { 217 - .flags = 0, 218 - } 210 + static struct plat_sci_port scif0_platform_data = { 211 + .mapbase = 0xff804000, 212 + .flags = UPF_BOOT_AUTOCONF, 213 + .type = PORT_SCIF, 214 + .irqs = { 220, 220, 220, 220 }, 219 215 }; 220 216 221 - static struct platform_device sci_device = { 217 + static struct platform_device scif0_device = { 222 218 .name = "sh-sci", 223 - .id = -1, 219 + .id = 0, 224 220 .dev = { 225 - .platform_data = sci_platform_data, 221 + .platform_data = &scif0_platform_data, 226 222 }, 227 223 }; 228 224 229 225 static struct platform_device *mxg_devices[] __initdata = { 230 - &sci_device, 226 + &scif0_device, 231 227 &mtu2_0_device, 232 228 &mtu2_1_device, 233 229 &mtu2_2_device, ··· 242 246 } 243 247 244 248 static struct platform_device *mxg_early_devices[] __initdata = { 249 + &scif0_device, 245 250 &mtu2_0_device, 246 251 &mtu2_1_device, 247 252 &mtu2_2_device,
+129 -48
arch/sh/kernel/cpu/sh2a/setup-sh7201.c
··· 177 177 static DECLARE_INTC_DESC(intc_desc, "sh7201", vectors, groups, 178 178 mask_registers, prio_registers, NULL); 179 179 180 - static struct plat_sci_port sci_platform_data[] = { 181 - { 182 - .mapbase = 0xfffe8000, 183 - .flags = UPF_BOOT_AUTOCONF, 184 - .type = PORT_SCIF, 185 - .irqs = { 180, 180, 180, 180 } 186 - }, { 187 - .mapbase = 0xfffe8800, 188 - .flags = UPF_BOOT_AUTOCONF, 189 - .type = PORT_SCIF, 190 - .irqs = { 184, 184, 184, 184 } 191 - }, { 192 - .mapbase = 0xfffe9000, 193 - .flags = UPF_BOOT_AUTOCONF, 194 - .type = PORT_SCIF, 195 - .irqs = { 188, 188, 188, 188 } 196 - }, { 197 - .mapbase = 0xfffe9800, 198 - .flags = UPF_BOOT_AUTOCONF, 199 - .type = PORT_SCIF, 200 - .irqs = { 192, 192, 192, 192 } 201 - }, { 202 - .mapbase = 0xfffea000, 203 - .flags = UPF_BOOT_AUTOCONF, 204 - .type = PORT_SCIF, 205 - .irqs = { 196, 196, 196, 196 } 206 - }, { 207 - .mapbase = 0xfffea800, 208 - .flags = UPF_BOOT_AUTOCONF, 209 - .type = PORT_SCIF, 210 - .irqs = { 200, 200, 200, 200 } 211 - }, { 212 - .mapbase = 0xfffeb000, 213 - .flags = UPF_BOOT_AUTOCONF, 214 - .type = PORT_SCIF, 215 - .irqs = { 204, 204, 204, 204 } 216 - }, { 217 - .mapbase = 0xfffeb800, 218 - .flags = UPF_BOOT_AUTOCONF, 219 - .type = PORT_SCIF, 220 - .irqs = { 208, 208, 208, 208 } 221 - }, { 222 - .flags = 0, 223 - } 180 + static struct plat_sci_port scif0_platform_data = { 181 + .mapbase = 0xfffe8000, 182 + .flags = UPF_BOOT_AUTOCONF, 183 + .type = PORT_SCIF, 184 + .irqs = { 180, 180, 180, 180 } 224 185 }; 225 186 226 - static struct platform_device sci_device = { 187 + static struct platform_device scif0_device = { 227 188 .name = "sh-sci", 228 - .id = -1, 189 + .id = 0, 229 190 .dev = { 230 - .platform_data = sci_platform_data, 191 + .platform_data = &scif0_platform_data, 192 + }, 193 + }; 194 + 195 + static struct plat_sci_port scif1_platform_data = { 196 + .mapbase = 0xfffe8800, 197 + .flags = UPF_BOOT_AUTOCONF, 198 + .type = PORT_SCIF, 199 + .irqs = { 184, 184, 184, 184 } 200 + }; 201 + 202 + static struct platform_device scif1_device = { 203 + .name = "sh-sci", 204 + .id = 1, 205 + .dev = { 206 + .platform_data = &scif1_platform_data, 207 + }, 208 + }; 209 + 210 + static struct plat_sci_port scif2_platform_data = { 211 + .mapbase = 0xfffe9000, 212 + .flags = UPF_BOOT_AUTOCONF, 213 + .type = PORT_SCIF, 214 + .irqs = { 188, 188, 188, 188 } 215 + }; 216 + 217 + static struct platform_device scif2_device = { 218 + .name = "sh-sci", 219 + .id = 2, 220 + .dev = { 221 + .platform_data = &scif2_platform_data, 222 + }, 223 + }; 224 + 225 + static struct plat_sci_port scif3_platform_data = { 226 + .mapbase = 0xfffe9800, 227 + .flags = UPF_BOOT_AUTOCONF, 228 + .type = PORT_SCIF, 229 + .irqs = { 192, 192, 192, 192 } 230 + }; 231 + 232 + static struct platform_device scif3_device = { 233 + .name = "sh-sci", 234 + .id = 3, 235 + .dev = { 236 + .platform_data = &scif3_platform_data, 237 + }, 238 + }; 239 + 240 + static struct plat_sci_port scif4_platform_data = { 241 + .mapbase = 0xfffea000, 242 + .flags = UPF_BOOT_AUTOCONF, 243 + .type = PORT_SCIF, 244 + .irqs = { 196, 196, 196, 196 } 245 + }; 246 + 247 + static struct platform_device scif4_device = { 248 + .name = "sh-sci", 249 + .id = 4, 250 + .dev = { 251 + .platform_data = &scif4_platform_data, 252 + }, 253 + }; 254 + 255 + static struct plat_sci_port scif5_platform_data = { 256 + .mapbase = 0xfffea800, 257 + .flags = UPF_BOOT_AUTOCONF, 258 + .type = PORT_SCIF, 259 + .irqs = { 200, 200, 200, 200 } 260 + }; 261 + 262 + static struct platform_device scif5_device = { 263 + .name = "sh-sci", 264 + .id = 5, 265 + .dev = { 266 + .platform_data = &scif5_platform_data, 267 + }, 268 + }; 269 + 270 + static struct plat_sci_port scif6_platform_data = { 271 + .mapbase = 0xfffeb000, 272 + .flags = UPF_BOOT_AUTOCONF, 273 + .type = PORT_SCIF, 274 + .irqs = { 204, 204, 204, 204 } 275 + }; 276 + 277 + static struct platform_device scif6_device = { 278 + .name = "sh-sci", 279 + .id = 6, 280 + .dev = { 281 + .platform_data = &scif6_platform_data, 282 + }, 283 + }; 284 + 285 + static struct plat_sci_port scif7_platform_data = { 286 + .mapbase = 0xfffeb800, 287 + .flags = UPF_BOOT_AUTOCONF, 288 + .type = PORT_SCIF, 289 + .irqs = { 208, 208, 208, 208 } 290 + }; 291 + 292 + static struct platform_device scif7_device = { 293 + .name = "sh-sci", 294 + .id = 7, 295 + .dev = { 296 + .platform_data = &scif7_platform_data, 231 297 }, 232 298 }; 233 299 ··· 411 345 }; 412 346 413 347 static struct platform_device *sh7201_devices[] __initdata = { 414 - &sci_device, 348 + &scif0_device, 349 + &scif1_device, 350 + &scif2_device, 351 + &scif3_device, 352 + &scif4_device, 353 + &scif5_device, 354 + &scif6_device, 355 + &scif7_device, 415 356 &rtc_device, 416 357 &mtu2_0_device, 417 358 &mtu2_1_device, ··· 438 365 } 439 366 440 367 static struct platform_device *sh7201_early_devices[] __initdata = { 368 + &scif0_device, 369 + &scif1_device, 370 + &scif2_device, 371 + &scif3_device, 372 + &scif4_device, 373 + &scif5_device, 374 + &scif6_device, 375 + &scif7_device, 441 376 &mtu2_0_device, 442 377 &mtu2_1_device, 443 378 &mtu2_2_device,
+61 -28
arch/sh/kernel/cpu/sh2a/setup-sh7203.c
··· 173 173 static DECLARE_INTC_DESC(intc_desc, "sh7203", vectors, groups, 174 174 mask_registers, prio_registers, NULL); 175 175 176 - static struct plat_sci_port sci_platform_data[] = { 177 - { 178 - .mapbase = 0xfffe8000, 179 - .flags = UPF_BOOT_AUTOCONF, 180 - .type = PORT_SCIF, 181 - .irqs = { 192, 192, 192, 192 }, 182 - }, { 183 - .mapbase = 0xfffe8800, 184 - .flags = UPF_BOOT_AUTOCONF, 185 - .type = PORT_SCIF, 186 - .irqs = { 196, 196, 196, 196 }, 187 - }, { 188 - .mapbase = 0xfffe9000, 189 - .flags = UPF_BOOT_AUTOCONF, 190 - .type = PORT_SCIF, 191 - .irqs = { 200, 200, 200, 200 }, 192 - }, { 193 - .mapbase = 0xfffe9800, 194 - .flags = UPF_BOOT_AUTOCONF, 195 - .type = PORT_SCIF, 196 - .irqs = { 204, 204, 204, 204 }, 197 - }, { 198 - .flags = 0, 199 - } 176 + static struct plat_sci_port scif0_platform_data = { 177 + .mapbase = 0xfffe8000, 178 + .flags = UPF_BOOT_AUTOCONF, 179 + .type = PORT_SCIF, 180 + .irqs = { 192, 192, 192, 192 }, 200 181 }; 201 182 202 - static struct platform_device sci_device = { 183 + static struct platform_device scif0_device = { 203 184 .name = "sh-sci", 204 - .id = -1, 185 + .id = 0, 205 186 .dev = { 206 - .platform_data = sci_platform_data, 187 + .platform_data = &scif0_platform_data, 188 + }, 189 + }; 190 + 191 + static struct plat_sci_port scif1_platform_data = { 192 + .mapbase = 0xfffe8800, 193 + .flags = UPF_BOOT_AUTOCONF, 194 + .type = PORT_SCIF, 195 + .irqs = { 196, 196, 196, 196 }, 196 + }; 197 + 198 + static struct platform_device scif1_device = { 199 + .name = "sh-sci", 200 + .id = 1, 201 + .dev = { 202 + .platform_data = &scif1_platform_data, 203 + }, 204 + }; 205 + 206 + static struct plat_sci_port scif2_platform_data = { 207 + .mapbase = 0xfffe9000, 208 + .flags = UPF_BOOT_AUTOCONF, 209 + .type = PORT_SCIF, 210 + .irqs = { 200, 200, 200, 200 }, 211 + }; 212 + 213 + static struct platform_device scif2_device = { 214 + .name = "sh-sci", 215 + .id = 2, 216 + .dev = { 217 + .platform_data = &scif2_platform_data, 218 + }, 219 + }; 220 + 221 + static struct plat_sci_port scif3_platform_data = { 222 + .mapbase = 0xfffe9800, 223 + .flags = UPF_BOOT_AUTOCONF, 224 + .type = PORT_SCIF, 225 + .irqs = { 204, 204, 204, 204 }, 226 + }; 227 + 228 + static struct platform_device scif3_device = { 229 + .name = "sh-sci", 230 + .id = 3, 231 + .dev = { 232 + .platform_data = &scif3_platform_data, 207 233 }, 208 234 }; 209 235 ··· 380 354 }; 381 355 382 356 static struct platform_device *sh7203_devices[] __initdata = { 383 - &sci_device, 357 + &scif0_device, 358 + &scif1_device, 359 + &scif2_device, 360 + &scif3_device, 384 361 &cmt0_device, 385 362 &cmt1_device, 386 363 &mtu2_0_device, ··· 404 375 } 405 376 406 377 static struct platform_device *sh7203_early_devices[] __initdata = { 378 + &scif0_device, 379 + &scif1_device, 380 + &scif2_device, 381 + &scif3_device, 407 382 &cmt0_device, 408 383 &cmt1_device, 409 384 &mtu2_0_device,
+61 -28
arch/sh/kernel/cpu/sh2a/setup-sh7206.c
··· 133 133 static DECLARE_INTC_DESC(intc_desc, "sh7206", vectors, groups, 134 134 mask_registers, prio_registers, NULL); 135 135 136 - static struct plat_sci_port sci_platform_data[] = { 137 - { 138 - .mapbase = 0xfffe8000, 139 - .flags = UPF_BOOT_AUTOCONF, 140 - .type = PORT_SCIF, 141 - .irqs = { 240, 240, 240, 240 }, 142 - }, { 143 - .mapbase = 0xfffe8800, 144 - .flags = UPF_BOOT_AUTOCONF, 145 - .type = PORT_SCIF, 146 - .irqs = { 244, 244, 244, 244 }, 147 - }, { 148 - .mapbase = 0xfffe9000, 149 - .flags = UPF_BOOT_AUTOCONF, 150 - .type = PORT_SCIF, 151 - .irqs = { 248, 248, 248, 248 }, 152 - }, { 153 - .mapbase = 0xfffe9800, 154 - .flags = UPF_BOOT_AUTOCONF, 155 - .type = PORT_SCIF, 156 - .irqs = { 252, 252, 252, 252 }, 157 - }, { 158 - .flags = 0, 159 - } 136 + static struct plat_sci_port scif0_platform_data = { 137 + .mapbase = 0xfffe8000, 138 + .flags = UPF_BOOT_AUTOCONF, 139 + .type = PORT_SCIF, 140 + .irqs = { 240, 240, 240, 240 }, 160 141 }; 161 142 162 - static struct platform_device sci_device = { 143 + static struct platform_device scif0_device = { 163 144 .name = "sh-sci", 164 - .id = -1, 145 + .id = 0, 165 146 .dev = { 166 - .platform_data = sci_platform_data, 147 + .platform_data = &scif0_platform_data, 148 + }, 149 + }; 150 + 151 + static struct plat_sci_port scif1_platform_data = { 152 + .mapbase = 0xfffe8800, 153 + .flags = UPF_BOOT_AUTOCONF, 154 + .type = PORT_SCIF, 155 + .irqs = { 244, 244, 244, 244 }, 156 + }; 157 + 158 + static struct platform_device scif1_device = { 159 + .name = "sh-sci", 160 + .id = 1, 161 + .dev = { 162 + .platform_data = &scif1_platform_data, 163 + }, 164 + }; 165 + 166 + static struct plat_sci_port scif2_platform_data = { 167 + .mapbase = 0xfffe9000, 168 + .flags = UPF_BOOT_AUTOCONF, 169 + .type = PORT_SCIF, 170 + .irqs = { 248, 248, 248, 248 }, 171 + }; 172 + 173 + static struct platform_device scif2_device = { 174 + .name = "sh-sci", 175 + .id = 2, 176 + .dev = { 177 + .platform_data = &scif2_platform_data, 178 + }, 179 + }; 180 + 181 + static struct plat_sci_port scif3_platform_data = { 182 + .mapbase = 0xfffe9800, 183 + .flags = UPF_BOOT_AUTOCONF, 184 + .type = PORT_SCIF, 185 + .irqs = { 252, 252, 252, 252 }, 186 + }; 187 + 188 + static struct platform_device scif3_device = { 189 + .name = "sh-sci", 190 + .id = 3, 191 + .dev = { 192 + .platform_data = &scif3_platform_data, 167 193 }, 168 194 }; 169 195 ··· 351 325 }; 352 326 353 327 static struct platform_device *sh7206_devices[] __initdata = { 354 - &sci_device, 328 + &scif0_device, 329 + &scif1_device, 330 + &scif2_device, 331 + &scif3_device, 355 332 &cmt0_device, 356 333 &cmt1_device, 357 334 &mtu2_0_device, ··· 375 346 } 376 347 377 348 static struct platform_device *sh7206_early_devices[] __initdata = { 349 + &scif0_device, 350 + &scif1_device, 351 + &scif2_device, 352 + &scif3_device, 378 353 &cmt0_device, 379 354 &cmt1_device, 380 355 &mtu2_0_device,
+27 -18
arch/sh/kernel/cpu/sh3/setup-sh7705.c
··· 67 67 static DECLARE_INTC_DESC(intc_desc, "sh7705", vectors, NULL, 68 68 NULL, prio_registers, NULL); 69 69 70 - static struct plat_sci_port sci_platform_data[] = { 71 - { 72 - .mapbase = 0xa4410000, 73 - .flags = UPF_BOOT_AUTOCONF, 74 - .type = PORT_SCIF, 75 - .irqs = { 56, 56, 56 }, 76 - }, { 77 - .mapbase = 0xa4400000, 78 - .flags = UPF_BOOT_AUTOCONF, 79 - .type = PORT_SCIF, 80 - .irqs = { 52, 52, 52 }, 81 - }, { 82 - .flags = 0, 83 - } 70 + static struct plat_sci_port scif0_platform_data = { 71 + .mapbase = 0xa4410000, 72 + .flags = UPF_BOOT_AUTOCONF, 73 + .type = PORT_SCIF, 74 + .irqs = { 56, 56, 56 }, 84 75 }; 85 76 86 - static struct platform_device sci_device = { 77 + static struct platform_device scif0_device = { 87 78 .name = "sh-sci", 88 - .id = -1, 79 + .id = 0, 89 80 .dev = { 90 - .platform_data = sci_platform_data, 81 + .platform_data = &scif0_platform_data, 82 + }, 83 + }; 84 + 85 + static struct plat_sci_port scif1_platform_data = { 86 + .mapbase = 0xa4400000, 87 + .flags = UPF_BOOT_AUTOCONF, 88 + .type = PORT_SCIF, 89 + .irqs = { 52, 52, 52 }, 90 + }; 91 + 92 + static struct platform_device scif1_device = { 93 + .name = "sh-sci", 94 + .id = 1, 95 + .dev = { 96 + .platform_data = &scif1_platform_data, 91 97 }, 92 98 }; 93 99 ··· 216 210 }; 217 211 218 212 static struct platform_device *sh7705_devices[] __initdata = { 213 + &scif0_device, 214 + &scif1_device, 219 215 &tmu0_device, 220 216 &tmu1_device, 221 217 &tmu2_device, 222 - &sci_device, 223 218 &rtc_device, 224 219 }; 225 220 ··· 232 225 arch_initcall(sh7705_devices_setup); 233 226 234 227 static struct platform_device *sh7705_early_devices[] __initdata = { 228 + &scif0_device, 229 + &scif1_device, 235 230 &tmu0_device, 236 231 &tmu1_device, 237 232 &tmu2_device,
+55 -25
arch/sh/kernel/cpu/sh3/setup-sh770x.c
··· 106 106 .resource = rtc_resources, 107 107 }; 108 108 109 - static struct plat_sci_port sci_platform_data[] = { 110 - { 111 - .mapbase = 0xfffffe80, 112 - .flags = UPF_BOOT_AUTOCONF, 113 - .type = PORT_SCI, 114 - .irqs = { 23, 23, 23, 0 }, 109 + static struct plat_sci_port scif0_platform_data = { 110 + .mapbase = 0xfffffe80, 111 + .flags = UPF_BOOT_AUTOCONF, 112 + .type = PORT_SCI, 113 + .irqs = { 23, 23, 23, 0 }, 114 + }; 115 + 116 + static struct platform_device scif0_device = { 117 + .name = "sh-sci", 118 + .id = 0, 119 + .dev = { 120 + .platform_data = &scif0_platform_data, 115 121 }, 122 + }; 116 123 #if defined(CONFIG_CPU_SUBTYPE_SH7706) || \ 117 124 defined(CONFIG_CPU_SUBTYPE_SH7707) || \ 118 125 defined(CONFIG_CPU_SUBTYPE_SH7709) 119 - { 120 - .mapbase = 0xa4000150, 121 - .flags = UPF_BOOT_AUTOCONF, 122 - .type = PORT_SCIF, 123 - .irqs = { 56, 56, 56, 56 }, 126 + static struct plat_sci_port scif1_platform_data = { 127 + .mapbase = 0xa4000150, 128 + .flags = UPF_BOOT_AUTOCONF, 129 + .type = PORT_SCIF, 130 + .irqs = { 56, 56, 56, 56 }, 131 + }; 132 + 133 + static struct platform_device scif1_device = { 134 + .name = "sh-sci", 135 + .id = 1, 136 + .dev = { 137 + .platform_data = &scif1_platform_data, 124 138 }, 139 + }; 125 140 #endif 126 141 #if defined(CONFIG_CPU_SUBTYPE_SH7707) || \ 127 142 defined(CONFIG_CPU_SUBTYPE_SH7709) 128 - { 129 - .mapbase = 0xa4000140, 130 - .flags = UPF_BOOT_AUTOCONF, 131 - .type = PORT_IRDA, 132 - .irqs = { 52, 52, 52, 52 }, 133 - }, 134 - #endif 135 - { 136 - .flags = 0, 137 - } 143 + static struct plat_sci_port scif2_platform_data = { 144 + .mapbase = 0xa4000140, 145 + .flags = UPF_BOOT_AUTOCONF, 146 + .type = PORT_IRDA, 147 + .irqs = { 52, 52, 52, 52 }, 138 148 }; 139 149 140 - static struct platform_device sci_device = { 150 + static struct platform_device scif2_device = { 141 151 .name = "sh-sci", 142 - .id = -1, 152 + .id = 2, 143 153 .dev = { 144 - .platform_data = sci_platform_data, 154 + .platform_data = &scif2_platform_data, 145 155 }, 146 156 }; 157 + #endif 147 158 148 159 static struct sh_timer_config tmu0_platform_data = { 149 160 .name = "TMU0", ··· 249 238 }; 250 239 251 240 static struct platform_device *sh770x_devices[] __initdata = { 241 + &scif0_device, 242 + #if defined(CONFIG_CPU_SUBTYPE_SH7706) || \ 243 + defined(CONFIG_CPU_SUBTYPE_SH7707) || \ 244 + defined(CONFIG_CPU_SUBTYPE_SH7709) 245 + &scif1_device, 246 + #endif 247 + #if defined(CONFIG_CPU_SUBTYPE_SH7707) || \ 248 + defined(CONFIG_CPU_SUBTYPE_SH7709) 249 + &scif2_device, 250 + #endif 252 251 &tmu0_device, 253 252 &tmu1_device, 254 253 &tmu2_device, 255 - &sci_device, 256 254 &rtc_device, 257 255 }; 258 256 ··· 273 253 arch_initcall(sh770x_devices_setup); 274 254 275 255 static struct platform_device *sh770x_early_devices[] __initdata = { 256 + &scif0_device, 257 + #if defined(CONFIG_CPU_SUBTYPE_SH7706) || \ 258 + defined(CONFIG_CPU_SUBTYPE_SH7707) || \ 259 + defined(CONFIG_CPU_SUBTYPE_SH7709) 260 + &scif1_device, 261 + #endif 262 + #if defined(CONFIG_CPU_SUBTYPE_SH7707) || \ 263 + defined(CONFIG_CPU_SUBTYPE_SH7709) 264 + &scif2_device, 265 + #endif 276 266 &tmu0_device, 277 267 &tmu1_device, 278 268 &tmu2_device,
+27 -19
arch/sh/kernel/cpu/sh3/setup-sh7710.c
··· 96 96 }, 97 97 }; 98 98 99 - static struct plat_sci_port sci_platform_data[] = { 100 - { 101 - .mapbase = 0xa4400000, 102 - .flags = UPF_BOOT_AUTOCONF, 103 - .type = PORT_SCIF, 104 - .irqs = { 52, 52, 52, 52 }, 105 - }, { 106 - .mapbase = 0xa4410000, 107 - .flags = UPF_BOOT_AUTOCONF, 108 - .type = PORT_SCIF, 109 - .irqs = { 56, 56, 56, 56 }, 110 - }, { 111 - 112 - .flags = 0, 113 - } 99 + static struct plat_sci_port scif0_platform_data = { 100 + .mapbase = 0xa4400000, 101 + .flags = UPF_BOOT_AUTOCONF, 102 + .type = PORT_SCIF, 103 + .irqs = { 52, 52, 52, 52 }, 114 104 }; 115 105 116 - static struct platform_device sci_device = { 106 + static struct platform_device scif0_device = { 117 107 .name = "sh-sci", 118 - .id = -1, 108 + .id = 0, 119 109 .dev = { 120 - .platform_data = sci_platform_data, 110 + .platform_data = &scif0_platform_data, 111 + }, 112 + }; 113 + 114 + static struct plat_sci_port scif1_platform_data = { 115 + .mapbase = 0xa4410000, 116 + .flags = UPF_BOOT_AUTOCONF, 117 + .type = PORT_SCIF, 118 + .irqs = { 56, 56, 56, 56 }, 119 + }; 120 + 121 + static struct platform_device scif1_device = { 122 + .name = "sh-sci", 123 + .id = 1, 124 + .dev = { 125 + .platform_data = &scif1_platform_data, 121 126 }, 122 127 }; 123 128 ··· 219 214 }; 220 215 221 216 static struct platform_device *sh7710_devices[] __initdata = { 217 + &scif0_device, 218 + &scif1_device, 222 219 &tmu0_device, 223 220 &tmu1_device, 224 221 &tmu2_device, 225 - &sci_device, 226 222 &rtc_device, 227 223 }; 228 224 ··· 235 229 arch_initcall(sh7710_devices_setup); 236 230 237 231 static struct platform_device *sh7710_early_devices[] __initdata = { 232 + &scif0_device, 233 + &scif1_device, 238 234 &tmu0_device, 239 235 &tmu1_device, 240 236 &tmu2_device,
+27 -19
arch/sh/kernel/cpu/sh3/setup-sh7720.c
··· 48 48 }, 49 49 }; 50 50 51 - static struct plat_sci_port sci_platform_data[] = { 52 - { 53 - .mapbase = 0xa4430000, 54 - .flags = UPF_BOOT_AUTOCONF, 55 - .type = PORT_SCIF, 56 - .irqs = { 80, 80, 80, 80 }, 57 - }, { 58 - .mapbase = 0xa4438000, 59 - .flags = UPF_BOOT_AUTOCONF, 60 - .type = PORT_SCIF, 61 - .irqs = { 81, 81, 81, 81 }, 62 - }, { 63 - 64 - .flags = 0, 65 - } 51 + static struct plat_sci_port scif0_platform_data = { 52 + .mapbase = 0xa4430000, 53 + .flags = UPF_BOOT_AUTOCONF, 54 + .type = PORT_SCIF, 55 + .irqs = { 80, 80, 80, 80 }, 66 56 }; 67 57 68 - static struct platform_device sci_device = { 58 + static struct platform_device scif0_device = { 69 59 .name = "sh-sci", 70 - .id = -1, 60 + .id = 0, 71 61 .dev = { 72 - .platform_data = sci_platform_data, 62 + .platform_data = &scif0_platform_data, 63 + }, 64 + }; 65 + 66 + static struct plat_sci_port scif1_platform_data = { 67 + .mapbase = 0xa4438000, 68 + .flags = UPF_BOOT_AUTOCONF, 69 + .type = PORT_SCIF, 70 + .irqs = { 81, 81, 81, 81 }, 71 + }; 72 + 73 + static struct platform_device scif1_device = { 74 + .name = "sh-sci", 75 + .id = 1, 76 + .dev = { 77 + .platform_data = &scif1_platform_data, 73 78 }, 74 79 }; 75 80 ··· 374 369 }; 375 370 376 371 static struct platform_device *sh7720_devices[] __initdata = { 372 + &scif0_device, 373 + &scif1_device, 377 374 &cmt0_device, 378 375 &cmt1_device, 379 376 &cmt2_device, ··· 385 378 &tmu1_device, 386 379 &tmu2_device, 387 380 &rtc_device, 388 - &sci_device, 389 381 &usb_ohci_device, 390 382 &usbf_device, 391 383 }; ··· 397 391 arch_initcall(sh7720_devices_setup); 398 392 399 393 static struct platform_device *sh7720_early_devices[] __initdata = { 394 + &scif0_device, 395 + &scif1_device, 400 396 &cmt0_device, 401 397 &cmt1_device, 402 398 &cmt2_device,
+10 -13
arch/sh/kernel/cpu/sh4/setup-sh4-202.c
··· 15 15 #include <linux/sh_timer.h> 16 16 #include <linux/io.h> 17 17 18 - static struct plat_sci_port sci_platform_data[] = { 19 - { 20 - .mapbase = 0xffe80000, 21 - .flags = UPF_BOOT_AUTOCONF, 22 - .type = PORT_SCIF, 23 - .irqs = { 40, 41, 43, 42 }, 24 - }, { 25 - .flags = 0, 26 - } 18 + static struct plat_sci_port scif0_platform_data = { 19 + .mapbase = 0xffe80000, 20 + .flags = UPF_BOOT_AUTOCONF, 21 + .type = PORT_SCIF, 22 + .irqs = { 40, 41, 43, 42 }, 27 23 }; 28 24 29 - static struct platform_device sci_device = { 25 + static struct platform_device scif0_device = { 30 26 .name = "sh-sci", 31 - .id = -1, 27 + .id = 0, 32 28 .dev = { 33 - .platform_data = sci_platform_data, 29 + .platform_data = &scif0_platform_data, 34 30 }, 35 31 }; 36 32 ··· 123 127 }; 124 128 125 129 static struct platform_device *sh4202_devices[] __initdata = { 126 - &sci_device, 130 + &scif0_device, 127 131 &tmu0_device, 128 132 &tmu1_device, 129 133 &tmu2_device, ··· 137 141 arch_initcall(sh4202_devices_setup); 138 142 139 143 static struct platform_device *sh4202_early_devices[] __initdata = { 144 + &scif0_device, 140 145 &tmu0_device, 141 146 &tmu1_device, 142 147 &tmu2_device,
+27 -20
arch/sh/kernel/cpu/sh4/setup-sh7750.c
··· 35 35 .resource = rtc_resources, 36 36 }; 37 37 38 - static struct plat_sci_port sci_platform_data[] = { 39 - { 40 - #ifndef CONFIG_SH_RTS7751R2D 41 - .mapbase = 0xffe00000, 42 - .flags = UPF_BOOT_AUTOCONF, 43 - .type = PORT_SCI, 44 - .irqs = { 23, 23, 23, 0 }, 45 - }, { 46 - #endif 47 - .mapbase = 0xffe80000, 48 - .flags = UPF_BOOT_AUTOCONF, 49 - .type = PORT_SCIF, 50 - .irqs = { 40, 40, 40, 40 }, 51 - }, { 52 - .flags = 0, 53 - } 38 + static struct plat_sci_port scif0_platform_data = { 39 + .mapbase = 0xffe00000, 40 + .flags = UPF_BOOT_AUTOCONF, 41 + .type = PORT_SCI, 42 + .irqs = { 23, 23, 23, 0 }, 54 43 }; 55 44 56 - static struct platform_device sci_device = { 45 + static struct platform_device scif0_device = { 57 46 .name = "sh-sci", 58 - .id = -1, 47 + .id = 0, 59 48 .dev = { 60 - .platform_data = sci_platform_data, 49 + .platform_data = &scif0_platform_data, 50 + }, 51 + }; 52 + 53 + static struct plat_sci_port scif1_platform_data = { 54 + .mapbase = 0xffe80000, 55 + .flags = UPF_BOOT_AUTOCONF, 56 + .type = PORT_SCIF, 57 + .irqs = { 40, 40, 40, 40 }, 58 + }; 59 + 60 + static struct platform_device scif1_device = { 61 + .name = "sh-sci", 62 + .id = 1, 63 + .dev = { 64 + .platform_data = &scif1_platform_data, 61 65 }, 62 66 }; 63 67 ··· 225 221 #endif 226 222 227 223 static struct platform_device *sh7750_devices[] __initdata = { 224 + &scif0_device, 225 + &scif1_device, 228 226 &rtc_device, 229 - &sci_device, 230 227 &tmu0_device, 231 228 &tmu1_device, 232 229 &tmu2_device, ··· 247 242 arch_initcall(sh7750_devices_setup); 248 243 249 244 static struct platform_device *sh7750_early_devices[] __initdata = { 245 + &scif0_device, 246 + &scif1_device, 250 247 &tmu0_device, 251 248 &tmu1_device, 252 249 &tmu2_device,
+61 -28
arch/sh/kernel/cpu/sh4/setup-sh7760.c
··· 126 126 static DECLARE_INTC_DESC(intc_desc_irq, "sh7760-irq", vectors_irq, groups, 127 127 mask_registers, prio_registers, NULL); 128 128 129 - static struct plat_sci_port sci_platform_data[] = { 130 - { 131 - .mapbase = 0xfe600000, 132 - .flags = UPF_BOOT_AUTOCONF, 133 - .type = PORT_SCIF, 134 - .irqs = { 52, 53, 55, 54 }, 135 - }, { 136 - .mapbase = 0xfe610000, 137 - .flags = UPF_BOOT_AUTOCONF, 138 - .type = PORT_SCIF, 139 - .irqs = { 72, 73, 75, 74 }, 140 - }, { 141 - .mapbase = 0xfe620000, 142 - .flags = UPF_BOOT_AUTOCONF, 143 - .type = PORT_SCIF, 144 - .irqs = { 76, 77, 79, 78 }, 145 - }, { 146 - .mapbase = 0xfe480000, 147 - .flags = UPF_BOOT_AUTOCONF, 148 - .type = PORT_SCI, 149 - .irqs = { 80, 81, 82, 0 }, 150 - }, { 151 - .flags = 0, 152 - } 129 + static struct plat_sci_port scif0_platform_data = { 130 + .mapbase = 0xfe600000, 131 + .flags = UPF_BOOT_AUTOCONF, 132 + .type = PORT_SCIF, 133 + .irqs = { 52, 53, 55, 54 }, 153 134 }; 154 135 155 - static struct platform_device sci_device = { 136 + static struct platform_device scif0_device = { 156 137 .name = "sh-sci", 157 - .id = -1, 138 + .id = 0, 158 139 .dev = { 159 - .platform_data = sci_platform_data, 140 + .platform_data = &scif0_platform_data, 141 + }, 142 + }; 143 + 144 + static struct plat_sci_port scif1_platform_data = { 145 + .mapbase = 0xfe610000, 146 + .flags = UPF_BOOT_AUTOCONF, 147 + .type = PORT_SCIF, 148 + .irqs = { 72, 73, 75, 74 }, 149 + }; 150 + 151 + static struct platform_device scif1_device = { 152 + .name = "sh-sci", 153 + .id = 1, 154 + .dev = { 155 + .platform_data = &scif1_platform_data, 156 + }, 157 + }; 158 + 159 + static struct plat_sci_port scif2_platform_data = { 160 + .mapbase = 0xfe620000, 161 + .flags = UPF_BOOT_AUTOCONF, 162 + .type = PORT_SCIF, 163 + .irqs = { 76, 77, 79, 78 }, 164 + }; 165 + 166 + static struct platform_device scif2_device = { 167 + .name = "sh-sci", 168 + .id = 2, 169 + .dev = { 170 + .platform_data = &scif2_platform_data, 171 + }, 172 + }; 173 + 174 + static struct plat_sci_port scif3_platform_data = { 175 + .mapbase = 0xfe480000, 176 + .flags = UPF_BOOT_AUTOCONF, 177 + .type = PORT_SCI, 178 + .irqs = { 80, 81, 82, 0 }, 179 + }; 180 + 181 + static struct platform_device scif3_device = { 182 + .name = "sh-sci", 183 + .id = 3, 184 + .dev = { 185 + .platform_data = &scif3_platform_data, 160 186 }, 161 187 }; 162 188 ··· 280 254 281 255 282 256 static struct platform_device *sh7760_devices[] __initdata = { 283 - &sci_device, 257 + &scif0_device, 258 + &scif1_device, 259 + &scif2_device, 260 + &scif3_device, 284 261 &tmu0_device, 285 262 &tmu1_device, 286 263 &tmu2_device, ··· 297 268 arch_initcall(sh7760_devices_setup); 298 269 299 270 static struct platform_device *sh7760_early_devices[] __initdata = { 271 + &scif0_device, 272 + &scif1_device, 273 + &scif2_device, 274 + &scif3_device, 300 275 &tmu0_device, 301 276 &tmu1_device, 302 277 &tmu2_device,
+73 -39
arch/sh/kernel/cpu/sh4a/setup-sh7343.c
··· 15 15 #include <linux/sh_timer.h> 16 16 #include <asm/clock.h> 17 17 18 + /* Serial */ 19 + static struct plat_sci_port scif0_platform_data = { 20 + .mapbase = 0xffe00000, 21 + .flags = UPF_BOOT_AUTOCONF, 22 + .type = PORT_SCIF, 23 + .irqs = { 80, 80, 80, 80 }, 24 + .clk = "scif0", 25 + }; 26 + 27 + static struct platform_device scif0_device = { 28 + .name = "sh-sci", 29 + .id = 0, 30 + .dev = { 31 + .platform_data = &scif0_platform_data, 32 + }, 33 + }; 34 + 35 + static struct plat_sci_port scif1_platform_data = { 36 + .mapbase = 0xffe10000, 37 + .flags = UPF_BOOT_AUTOCONF, 38 + .type = PORT_SCIF, 39 + .irqs = { 81, 81, 81, 81 }, 40 + .clk = "scif1", 41 + }; 42 + 43 + static struct platform_device scif1_device = { 44 + .name = "sh-sci", 45 + .id = 1, 46 + .dev = { 47 + .platform_data = &scif1_platform_data, 48 + }, 49 + }; 50 + 51 + static struct plat_sci_port scif2_platform_data = { 52 + .mapbase = 0xffe20000, 53 + .flags = UPF_BOOT_AUTOCONF, 54 + .type = PORT_SCIF, 55 + .irqs = { 82, 82, 82, 82 }, 56 + .clk = "scif2", 57 + }; 58 + 59 + static struct platform_device scif2_device = { 60 + .name = "sh-sci", 61 + .id = 2, 62 + .dev = { 63 + .platform_data = &scif2_platform_data, 64 + }, 65 + }; 66 + 67 + static struct plat_sci_port scif3_platform_data = { 68 + .mapbase = 0xffe30000, 69 + .flags = UPF_BOOT_AUTOCONF, 70 + .type = PORT_SCIF, 71 + .irqs = { 83, 83, 83, 83 }, 72 + .clk = "scif3", 73 + }; 74 + 75 + static struct platform_device scif3_device = { 76 + .name = "sh-sci", 77 + .id = 3, 78 + .dev = { 79 + .platform_data = &scif3_platform_data, 80 + }, 81 + }; 82 + 18 83 static struct resource iic0_resources[] = { 19 84 [0] = { 20 85 .name = "IIC0", ··· 330 265 .num_resources = ARRAY_SIZE(tmu2_resources), 331 266 }; 332 267 333 - static struct plat_sci_port sci_platform_data[] = { 334 - { 335 - .mapbase = 0xffe00000, 336 - .flags = UPF_BOOT_AUTOCONF, 337 - .type = PORT_SCIF, 338 - .irqs = { 80, 80, 80, 80 }, 339 - .clk = "scif0", 340 - }, { 341 - .mapbase = 0xffe10000, 342 - .flags = UPF_BOOT_AUTOCONF, 343 - .type = PORT_SCIF, 344 - .irqs = { 81, 81, 81, 81 }, 345 - .clk = "scif1", 346 - }, { 347 - .mapbase = 0xffe20000, 348 - .flags = UPF_BOOT_AUTOCONF, 349 - .type = PORT_SCIF, 350 - .irqs = { 82, 82, 82, 82 }, 351 - .clk = "scif2", 352 - }, { 353 - .mapbase = 0xffe30000, 354 - .flags = UPF_BOOT_AUTOCONF, 355 - .type = PORT_SCIF, 356 - .irqs = { 83, 83, 83, 83 }, 357 - .clk = "scif3", 358 - }, { 359 - .flags = 0, 360 - } 361 - }; 362 - 363 - static struct platform_device sci_device = { 364 - .name = "sh-sci", 365 - .id = -1, 366 - .dev = { 367 - .platform_data = sci_platform_data, 368 - }, 369 - }; 370 - 371 268 static struct platform_device *sh7343_devices[] __initdata = { 269 + &scif0_device, 270 + &scif1_device, 271 + &scif2_device, 272 + &scif3_device, 372 273 &cmt_device, 373 274 &tmu0_device, 374 275 &tmu1_device, 375 276 &tmu2_device, 376 277 &iic0_device, 377 278 &iic1_device, 378 - &sci_device, 379 279 &vpu_device, 380 280 &veu_device, 381 281 &jpu_device, ··· 358 328 arch_initcall(sh7343_devices_setup); 359 329 360 330 static struct platform_device *sh7343_early_devices[] __initdata = { 331 + &scif0_device, 332 + &scif1_device, 333 + &scif2_device, 334 + &scif3_device, 361 335 &cmt_device, 362 336 &tmu0_device, 363 337 &tmu1_device,
+18 -21
arch/sh/kernel/cpu/sh4a/setup-sh7366.c
··· 18 18 #include <linux/usb/r8a66597.h> 19 19 #include <asm/clock.h> 20 20 21 + static struct plat_sci_port scif0_platform_data = { 22 + .mapbase = 0xffe00000, 23 + .flags = UPF_BOOT_AUTOCONF, 24 + .type = PORT_SCIF, 25 + .irqs = { 80, 80, 80, 80 }, 26 + .clk = "scif0", 27 + }; 28 + 29 + static struct platform_device scif0_device = { 30 + .name = "sh-sci", 31 + .id = 0, 32 + .dev = { 33 + .platform_data = &scif0_platform_data, 34 + }, 35 + }; 36 + 21 37 static struct resource iic_resources[] = { 22 38 [0] = { 23 39 .name = "IIC", ··· 292 276 .num_resources = ARRAY_SIZE(tmu2_resources), 293 277 }; 294 278 295 - static struct plat_sci_port sci_platform_data[] = { 296 - { 297 - .mapbase = 0xffe00000, 298 - .flags = UPF_BOOT_AUTOCONF, 299 - .type = PORT_SCIF, 300 - .irqs = { 80, 80, 80, 80 }, 301 - .clk = "scif0", 302 - }, { 303 - .flags = 0, 304 - } 305 - }; 306 - 307 - static struct platform_device sci_device = { 308 - .name = "sh-sci", 309 - .id = -1, 310 - .dev = { 311 - .platform_data = sci_platform_data, 312 - }, 313 - }; 314 - 315 279 static struct platform_device *sh7366_devices[] __initdata = { 280 + &scif0_device, 316 281 &cmt_device, 317 282 &tmu0_device, 318 283 &tmu1_device, 319 284 &tmu2_device, 320 285 &iic_device, 321 - &sci_device, 322 286 &usb_host_device, 323 287 &vpu_device, 324 288 &veu0_device, ··· 317 321 arch_initcall(sh7366_devices_setup); 318 322 319 323 static struct platform_device *sh7366_early_devices[] __initdata = { 324 + &scif0_device, 320 325 &cmt_device, 321 326 &tmu0_device, 322 327 &tmu1_device,
+55 -36
arch/sh/kernel/cpu/sh4a/setup-sh7722.c
··· 20 20 #include <asm/dma-sh.h> 21 21 #include <cpu/sh7722.h> 22 22 23 + /* Serial */ 24 + static struct plat_sci_port scif0_platform_data = { 25 + .mapbase = 0xffe00000, 26 + .flags = UPF_BOOT_AUTOCONF, 27 + .type = PORT_SCIF, 28 + .irqs = { 80, 80, 80, 80 }, 29 + .clk = "scif0", 30 + }; 31 + 32 + static struct platform_device scif0_device = { 33 + .name = "sh-sci", 34 + .id = 0, 35 + .dev = { 36 + .platform_data = &scif0_platform_data, 37 + }, 38 + }; 39 + 40 + static struct plat_sci_port scif1_platform_data = { 41 + .mapbase = 0xffe10000, 42 + .flags = UPF_BOOT_AUTOCONF, 43 + .type = PORT_SCIF, 44 + .irqs = { 81, 81, 81, 81 }, 45 + .clk = "scif1", 46 + }; 47 + 48 + static struct platform_device scif1_device = { 49 + .name = "sh-sci", 50 + .id = 1, 51 + .dev = { 52 + .platform_data = &scif1_platform_data, 53 + }, 54 + }; 55 + 56 + static struct plat_sci_port scif2_platform_data = { 57 + .mapbase = 0xffe20000, 58 + .flags = UPF_BOOT_AUTOCONF, 59 + .type = PORT_SCIF, 60 + .irqs = { 82, 82, 82, 82 }, 61 + .clk = "scif2", 62 + }; 63 + 64 + static struct platform_device scif2_device = { 65 + .name = "sh-sci", 66 + .id = 2, 67 + .dev = { 68 + .platform_data = &scif2_platform_data, 69 + }, 70 + }; 71 + 23 72 static struct resource rtc_resources[] = { 24 73 [0] = { 25 74 .start = 0xa465fec0, ··· 388 339 }, 389 340 }; 390 341 391 - static struct plat_sci_port sci_platform_data[] = { 392 - { 393 - .mapbase = 0xffe00000, 394 - .flags = UPF_BOOT_AUTOCONF, 395 - .type = PORT_SCIF, 396 - .irqs = { 80, 80, 80, 80 }, 397 - .clk = "scif0", 398 - }, 399 - { 400 - .mapbase = 0xffe10000, 401 - .flags = UPF_BOOT_AUTOCONF, 402 - .type = PORT_SCIF, 403 - .irqs = { 81, 81, 81, 81 }, 404 - .clk = "scif1", 405 - }, 406 - { 407 - .mapbase = 0xffe20000, 408 - .flags = UPF_BOOT_AUTOCONF, 409 - .type = PORT_SCIF, 410 - .irqs = { 82, 82, 82, 82 }, 411 - .clk = "scif2", 412 - }, 413 - { 414 - .flags = 0, 415 - } 416 - }; 417 - 418 - static struct platform_device sci_device = { 419 - .name = "sh-sci", 420 - .id = -1, 421 - .dev = { 422 - .platform_data = sci_platform_data, 423 - }, 424 - }; 425 - 426 342 static struct sh_dmae_pdata dma_platform_data = { 427 343 .mode = 0, 428 344 }; ··· 401 387 }; 402 388 403 389 static struct platform_device *sh7722_devices[] __initdata = { 390 + &scif0_device, 391 + &scif1_device, 392 + &scif2_device, 404 393 &cmt_device, 405 394 &tmu0_device, 406 395 &tmu1_device, ··· 411 394 &rtc_device, 412 395 &usbf_device, 413 396 &iic_device, 414 - &sci_device, 415 397 &vpu_device, 416 398 &veu_device, 417 399 &jpu_device, ··· 429 413 arch_initcall(sh7722_devices_setup); 430 414 431 415 static struct platform_device *sh7722_early_devices[] __initdata = { 416 + &scif0_device, 417 + &scif1_device, 418 + &scif2_device, 432 419 &cmt_device, 433 420 &tmu0_device, 434 421 &tmu1_device,
+109 -51
arch/sh/kernel/cpu/sh4a/setup-sh7723.c
··· 20 20 #include <asm/mmzone.h> 21 21 #include <cpu/sh7723.h> 22 22 23 + /* Serial */ 24 + static struct plat_sci_port scif0_platform_data = { 25 + .mapbase = 0xffe00000, 26 + .flags = UPF_BOOT_AUTOCONF, 27 + .type = PORT_SCIF, 28 + .irqs = { 80, 80, 80, 80 }, 29 + .clk = "scif0", 30 + }; 31 + 32 + static struct platform_device scif0_device = { 33 + .name = "sh-sci", 34 + .id = 0, 35 + .dev = { 36 + .platform_data = &scif0_platform_data, 37 + }, 38 + }; 39 + 40 + static struct plat_sci_port scif1_platform_data = { 41 + .mapbase = 0xffe10000, 42 + .flags = UPF_BOOT_AUTOCONF, 43 + .type = PORT_SCIF, 44 + .irqs = { 81, 81, 81, 81 }, 45 + .clk = "scif1", 46 + }; 47 + 48 + static struct platform_device scif1_device = { 49 + .name = "sh-sci", 50 + .id = 1, 51 + .dev = { 52 + .platform_data = &scif1_platform_data, 53 + }, 54 + }; 55 + 56 + static struct plat_sci_port scif2_platform_data = { 57 + .mapbase = 0xffe20000, 58 + .flags = UPF_BOOT_AUTOCONF, 59 + .type = PORT_SCIF, 60 + .irqs = { 82, 82, 82, 82 }, 61 + .clk = "scif2", 62 + }; 63 + 64 + static struct platform_device scif2_device = { 65 + .name = "sh-sci", 66 + .id = 2, 67 + .dev = { 68 + .platform_data = &scif2_platform_data, 69 + }, 70 + }; 71 + 72 + static struct plat_sci_port scif3_platform_data = { 73 + .mapbase = 0xa4e30000, 74 + .flags = UPF_BOOT_AUTOCONF, 75 + .type = PORT_SCIFA, 76 + .irqs = { 56, 56, 56, 56 }, 77 + .clk = "scif3", 78 + }; 79 + 80 + static struct platform_device scif3_device = { 81 + .name = "sh-sci", 82 + .id = 3, 83 + .dev = { 84 + .platform_data = &scif3_platform_data, 85 + }, 86 + }; 87 + 88 + static struct plat_sci_port scif4_platform_data = { 89 + .mapbase = 0xa4e40000, 90 + .flags = UPF_BOOT_AUTOCONF, 91 + .type = PORT_SCIFA, 92 + .irqs = { 88, 88, 88, 88 }, 93 + .clk = "scif4", 94 + }; 95 + 96 + static struct platform_device scif4_device = { 97 + .name = "sh-sci", 98 + .id = 4, 99 + .dev = { 100 + .platform_data = &scif4_platform_data, 101 + }, 102 + }; 103 + 104 + static struct plat_sci_port scif5_platform_data = { 105 + .mapbase = 0xa4e50000, 106 + .flags = UPF_BOOT_AUTOCONF, 107 + .type = PORT_SCIFA, 108 + .irqs = { 109, 109, 109, 109 }, 109 + .clk = "scif5", 110 + }; 111 + 112 + static struct platform_device scif5_device = { 113 + .name = "sh-sci", 114 + .id = 5, 115 + .dev = { 116 + .platform_data = &scif5_platform_data, 117 + }, 118 + }; 119 + 23 120 static struct uio_info vpu_platform_data = { 24 121 .name = "VPU5", 25 122 .version = "0", ··· 445 348 }, 446 349 }; 447 350 448 - static struct plat_sci_port sci_platform_data[] = { 449 - { 450 - .mapbase = 0xffe00000, 451 - .flags = UPF_BOOT_AUTOCONF, 452 - .type = PORT_SCIF, 453 - .irqs = { 80, 80, 80, 80 }, 454 - .clk = "scif0", 455 - },{ 456 - .mapbase = 0xffe10000, 457 - .flags = UPF_BOOT_AUTOCONF, 458 - .type = PORT_SCIF, 459 - .irqs = { 81, 81, 81, 81 }, 460 - .clk = "scif1", 461 - },{ 462 - .mapbase = 0xffe20000, 463 - .flags = UPF_BOOT_AUTOCONF, 464 - .type = PORT_SCIF, 465 - .irqs = { 82, 82, 82, 82 }, 466 - .clk = "scif2", 467 - },{ 468 - .mapbase = 0xa4e30000, 469 - .flags = UPF_BOOT_AUTOCONF, 470 - .type = PORT_SCIFA, 471 - .irqs = { 56, 56, 56, 56 }, 472 - .clk = "scif3", 473 - },{ 474 - .mapbase = 0xa4e40000, 475 - .flags = UPF_BOOT_AUTOCONF, 476 - .type = PORT_SCIFA, 477 - .irqs = { 88, 88, 88, 88 }, 478 - .clk = "scif4", 479 - },{ 480 - .mapbase = 0xa4e50000, 481 - .flags = UPF_BOOT_AUTOCONF, 482 - .type = PORT_SCIFA, 483 - .irqs = { 109, 109, 109, 109 }, 484 - .clk = "scif5", 485 - }, { 486 - .flags = 0, 487 - } 488 - }; 489 - 490 - static struct platform_device sci_device = { 491 - .name = "sh-sci", 492 - .id = -1, 493 - .dev = { 494 - .platform_data = sci_platform_data, 495 - }, 496 - }; 497 - 498 351 static struct resource rtc_resources[] = { 499 352 [0] = { 500 353 .start = 0xa465fec0, ··· 535 488 }; 536 489 537 490 static struct platform_device *sh7723_devices[] __initdata = { 491 + &scif0_device, 492 + &scif1_device, 493 + &scif2_device, 494 + &scif3_device, 495 + &scif4_device, 496 + &scif5_device, 538 497 &cmt_device, 539 498 &tmu0_device, 540 499 &tmu1_device, ··· 548 495 &tmu3_device, 549 496 &tmu4_device, 550 497 &tmu5_device, 551 - &sci_device, 552 498 &rtc_device, 553 499 &iic_device, 554 500 &sh7723_usb_host_device, ··· 568 516 arch_initcall(sh7723_devices_setup); 569 517 570 518 static struct platform_device *sh7723_early_devices[] __initdata = { 519 + &scif0_device, 520 + &scif1_device, 521 + &scif2_device, 522 + &scif3_device, 523 + &scif4_device, 524 + &scif5_device, 571 525 &cmt_device, 572 526 &tmu0_device, 573 527 &tmu1_device,
+101 -44
arch/sh/kernel/cpu/sh4a/setup-sh7724.c
··· 27 27 #include <cpu/sh7724.h> 28 28 29 29 /* Serial */ 30 - static struct plat_sci_port sci_platform_data[] = { 31 - { 32 - .mapbase = 0xffe00000, 33 - .flags = UPF_BOOT_AUTOCONF, 34 - .type = PORT_SCIF, 35 - .irqs = { 80, 80, 80, 80 }, 36 - .clk = "scif0", 37 - }, { 38 - .mapbase = 0xffe10000, 39 - .flags = UPF_BOOT_AUTOCONF, 40 - .type = PORT_SCIF, 41 - .irqs = { 81, 81, 81, 81 }, 42 - .clk = "scif1", 43 - }, { 44 - .mapbase = 0xffe20000, 45 - .flags = UPF_BOOT_AUTOCONF, 46 - .type = PORT_SCIF, 47 - .irqs = { 82, 82, 82, 82 }, 48 - .clk = "scif2", 49 - }, { 50 - .mapbase = 0xa4e30000, 51 - .flags = UPF_BOOT_AUTOCONF, 52 - .type = PORT_SCIFA, 53 - .irqs = { 56, 56, 56, 56 }, 54 - .clk = "scif3", 55 - }, { 56 - .mapbase = 0xa4e40000, 57 - .flags = UPF_BOOT_AUTOCONF, 58 - .type = PORT_SCIFA, 59 - .irqs = { 88, 88, 88, 88 }, 60 - .clk = "scif4", 61 - }, { 62 - .mapbase = 0xa4e50000, 63 - .flags = UPF_BOOT_AUTOCONF, 64 - .type = PORT_SCIFA, 65 - .irqs = { 109, 109, 109, 109 }, 66 - .clk = "scif5", 67 - }, { 68 - .flags = 0, 69 - } 30 + static struct plat_sci_port scif0_platform_data = { 31 + .mapbase = 0xffe00000, 32 + .flags = UPF_BOOT_AUTOCONF, 33 + .type = PORT_SCIF, 34 + .irqs = { 80, 80, 80, 80 }, 35 + .clk = "scif0", 70 36 }; 71 37 72 - static struct platform_device sci_device = { 38 + static struct platform_device scif0_device = { 73 39 .name = "sh-sci", 74 - .id = -1, 40 + .id = 0, 75 41 .dev = { 76 - .platform_data = sci_platform_data, 42 + .platform_data = &scif0_platform_data, 43 + }, 44 + }; 45 + 46 + static struct plat_sci_port scif1_platform_data = { 47 + .mapbase = 0xffe10000, 48 + .flags = UPF_BOOT_AUTOCONF, 49 + .type = PORT_SCIF, 50 + .irqs = { 81, 81, 81, 81 }, 51 + .clk = "scif1", 52 + }; 53 + 54 + static struct platform_device scif1_device = { 55 + .name = "sh-sci", 56 + .id = 1, 57 + .dev = { 58 + .platform_data = &scif1_platform_data, 59 + }, 60 + }; 61 + 62 + static struct plat_sci_port scif2_platform_data = { 63 + .mapbase = 0xffe20000, 64 + .flags = UPF_BOOT_AUTOCONF, 65 + .type = PORT_SCIF, 66 + .irqs = { 82, 82, 82, 82 }, 67 + .clk = "scif2", 68 + }; 69 + 70 + static struct platform_device scif2_device = { 71 + .name = "sh-sci", 72 + .id = 2, 73 + .dev = { 74 + .platform_data = &scif2_platform_data, 75 + }, 76 + }; 77 + 78 + static struct plat_sci_port scif3_platform_data = { 79 + .mapbase = 0xa4e30000, 80 + .flags = UPF_BOOT_AUTOCONF, 81 + .type = PORT_SCIFA, 82 + .irqs = { 56, 56, 56, 56 }, 83 + .clk = "scif3", 84 + }; 85 + 86 + static struct platform_device scif3_device = { 87 + .name = "sh-sci", 88 + .id = 3, 89 + .dev = { 90 + .platform_data = &scif3_platform_data, 91 + }, 92 + }; 93 + 94 + static struct plat_sci_port scif4_platform_data = { 95 + .mapbase = 0xa4e40000, 96 + .flags = UPF_BOOT_AUTOCONF, 97 + .type = PORT_SCIFA, 98 + .irqs = { 88, 88, 88, 88 }, 99 + .clk = "scif4", 100 + }; 101 + 102 + static struct platform_device scif4_device = { 103 + .name = "sh-sci", 104 + .id = 4, 105 + .dev = { 106 + .platform_data = &scif4_platform_data, 107 + }, 108 + }; 109 + 110 + static struct plat_sci_port scif5_platform_data = { 111 + .mapbase = 0xa4e50000, 112 + .flags = UPF_BOOT_AUTOCONF, 113 + .type = PORT_SCIFA, 114 + .irqs = { 109, 109, 109, 109 }, 115 + .clk = "scif5", 116 + }; 117 + 118 + static struct platform_device scif5_device = { 119 + .name = "sh-sci", 120 + .id = 5, 121 + .dev = { 122 + .platform_data = &scif5_platform_data, 77 123 }, 78 124 }; 79 125 ··· 636 590 }; 637 591 638 592 static struct platform_device *sh7724_devices[] __initdata = { 593 + &scif0_device, 594 + &scif1_device, 595 + &scif2_device, 596 + &scif3_device, 597 + &scif4_device, 598 + &scif5_device, 639 599 &cmt_device, 640 600 &tmu0_device, 641 601 &tmu1_device, ··· 649 597 &tmu3_device, 650 598 &tmu4_device, 651 599 &tmu5_device, 652 - &sci_device, 653 600 &rtc_device, 654 601 &iic0_device, 655 602 &iic1_device, ··· 675 624 arch_initcall(sh7724_devices_setup); 676 625 677 626 static struct platform_device *sh7724_early_devices[] __initdata = { 627 + &scif0_device, 628 + &scif1_device, 629 + &scif2_device, 630 + &scif3_device, 631 + &scif4_device, 632 + &scif5_device, 678 633 &cmt_device, 679 634 &tmu0_device, 680 635 &tmu1_device,
+62 -30
arch/sh/kernel/cpu/sh4a/setup-sh7757.c
··· 17 17 #include <linux/mm.h> 18 18 #include <linux/sh_timer.h> 19 19 20 + static struct plat_sci_port scif2_platform_data = { 21 + .mapbase = 0xfe4b0000, /* SCIF2 */ 22 + .flags = UPF_BOOT_AUTOCONF, 23 + .type = PORT_SCIF, 24 + .irqs = { 40, 40, 40, 40 }, 25 + }; 26 + 27 + static struct platform_device scif2_device = { 28 + .name = "sh-sci", 29 + .id = 2, 30 + .dev = { 31 + .platform_data = &scif2_platform_data, 32 + }, 33 + }; 34 + 35 + static struct plat_sci_port scif3_platform_data = { 36 + .mapbase = 0xfe4c0000, /* SCIF3 */ 37 + .flags = UPF_BOOT_AUTOCONF, 38 + .type = PORT_SCIF, 39 + .irqs = { 76, 76, 76, 76 }, 40 + }; 41 + 42 + static struct platform_device scif3_device = { 43 + .name = "sh-sci", 44 + .id = 3, 45 + .dev = { 46 + .platform_data = &scif3_platform_data, 47 + }, 48 + }; 49 + 50 + static struct plat_sci_port scif4_platform_data = { 51 + .mapbase = 0xfe4d0000, /* SCIF4 */ 52 + .flags = UPF_BOOT_AUTOCONF, 53 + .type = PORT_SCIF, 54 + .irqs = { 104, 104, 104, 104 }, 55 + }; 56 + 57 + static struct platform_device scif4_device = { 58 + .name = "sh-sci", 59 + .id = 4, 60 + .dev = { 61 + .platform_data = &scif4_platform_data, 62 + }, 63 + }; 64 + 20 65 static struct sh_timer_config tmu0_platform_data = { 21 66 .name = "TMU0", 22 67 .channel_offset = 0x04, ··· 124 79 .num_resources = ARRAY_SIZE(tmu1_resources), 125 80 }; 126 81 127 - static struct plat_sci_port sci_platform_data[] = { 128 - { 129 - .mapbase = 0xfe4b0000, /* SCIF2 */ 130 - .flags = UPF_BOOT_AUTOCONF, 131 - .type = PORT_SCIF, 132 - .irqs = { 40, 40, 40, 40 }, 133 - }, { 134 - .mapbase = 0xfe4c0000, /* SCIF3 */ 135 - .flags = UPF_BOOT_AUTOCONF, 136 - .type = PORT_SCIF, 137 - .irqs = { 76, 76, 76, 76 }, 138 - }, { 139 - .mapbase = 0xfe4d0000, /* SCIF4 */ 140 - .flags = UPF_BOOT_AUTOCONF, 141 - .type = PORT_SCIF, 142 - .irqs = { 104, 104, 104, 104 }, 143 - }, { 144 - .flags = 0, 145 - } 146 - }; 147 - 148 - static struct platform_device sci_device = { 149 - .name = "sh-sci", 150 - .id = -1, 151 - .dev = { 152 - .platform_data = sci_platform_data, 153 - }, 154 - }; 155 - 156 82 static struct platform_device *sh7757_devices[] __initdata = { 83 + &scif2_device, 84 + &scif3_device, 85 + &scif4_device, 157 86 &tmu0_device, 158 87 &tmu1_device, 159 - &sci_device, 160 88 }; 161 89 162 90 static int __init sh7757_devices_setup(void) ··· 138 120 ARRAY_SIZE(sh7757_devices)); 139 121 } 140 122 arch_initcall(sh7757_devices_setup); 123 + 124 + static struct platform_device *sh7757_early_devices[] __initdata = { 125 + &scif2_device, 126 + &scif3_device, 127 + &scif4_device, 128 + &tmu0_device, 129 + &tmu1_device, 130 + }; 131 + 132 + void __init plat_early_device_setup(void) 133 + { 134 + early_platform_add_devices(sh7757_early_devices, 135 + ARRAY_SIZE(sh7757_early_devices)); 136 + } 141 137 142 138 enum { 143 139 UNUSED = 0,
+51 -30
arch/sh/kernel/cpu/sh4a/setup-sh7763.c
··· 16 16 #include <linux/io.h> 17 17 #include <linux/serial_sci.h> 18 18 19 + static struct plat_sci_port scif0_platform_data = { 20 + .mapbase = 0xffe00000, 21 + .flags = UPF_BOOT_AUTOCONF, 22 + .type = PORT_SCIF, 23 + .irqs = { 40, 40, 40, 40 }, 24 + }; 25 + 26 + static struct platform_device scif0_device = { 27 + .name = "sh-sci", 28 + .id = 0, 29 + .dev = { 30 + .platform_data = &scif0_platform_data, 31 + }, 32 + }; 33 + 34 + static struct plat_sci_port scif1_platform_data = { 35 + .mapbase = 0xffe08000, 36 + .flags = UPF_BOOT_AUTOCONF, 37 + .type = PORT_SCIF, 38 + .irqs = { 76, 76, 76, 76 }, 39 + }; 40 + 41 + static struct platform_device scif1_device = { 42 + .name = "sh-sci", 43 + .id = 1, 44 + .dev = { 45 + .platform_data = &scif1_platform_data, 46 + }, 47 + }; 48 + 49 + static struct plat_sci_port scif2_platform_data = { 50 + .mapbase = 0xffe10000, 51 + .flags = UPF_BOOT_AUTOCONF, 52 + .type = PORT_SCIF, 53 + .irqs = { 104, 104, 104, 104 }, 54 + }; 55 + 56 + static struct platform_device scif2_device = { 57 + .name = "sh-sci", 58 + .id = 2, 59 + .dev = { 60 + .platform_data = &scif2_platform_data, 61 + }, 62 + }; 63 + 19 64 static struct resource rtc_resources[] = { 20 65 [0] = { 21 66 .start = 0xffe80000, ··· 79 34 .id = -1, 80 35 .num_resources = ARRAY_SIZE(rtc_resources), 81 36 .resource = rtc_resources, 82 - }; 83 - 84 - static struct plat_sci_port sci_platform_data[] = { 85 - { 86 - .mapbase = 0xffe00000, 87 - .flags = UPF_BOOT_AUTOCONF, 88 - .type = PORT_SCIF, 89 - .irqs = { 40, 40, 40, 40 }, 90 - }, { 91 - .mapbase = 0xffe08000, 92 - .flags = UPF_BOOT_AUTOCONF, 93 - .type = PORT_SCIF, 94 - .irqs = { 76, 76, 76, 76 }, 95 - }, { 96 - .mapbase = 0xffe10000, 97 - .flags = UPF_BOOT_AUTOCONF, 98 - .type = PORT_SCIF, 99 - .irqs = { 104, 104, 104, 104 }, 100 - }, { 101 - .flags = 0, 102 - } 103 - }; 104 - 105 - static struct platform_device sci_device = { 106 - .name = "sh-sci", 107 - .id = -1, 108 - .dev = { 109 - .platform_data = sci_platform_data, 110 - }, 111 37 }; 112 38 113 39 static struct resource usb_ohci_resources[] = { ··· 313 297 }; 314 298 315 299 static struct platform_device *sh7763_devices[] __initdata = { 300 + &scif0_device, 301 + &scif1_device, 302 + &scif2_device, 316 303 &tmu0_device, 317 304 &tmu1_device, 318 305 &tmu2_device, ··· 323 304 &tmu4_device, 324 305 &tmu5_device, 325 306 &rtc_device, 326 - &sci_device, 327 307 &usb_ohci_device, 328 308 &usbf_device, 329 309 }; ··· 335 317 arch_initcall(sh7763_devices_setup); 336 318 337 319 static struct platform_device *sh7763_early_devices[] __initdata = { 320 + &scif0_device, 321 + &scif1_device, 322 + &scif2_device, 338 323 &tmu0_device, 339 324 &tmu1_device, 340 325 &tmu2_device,
+163 -58
arch/sh/kernel/cpu/sh4a/setup-sh7770.c
··· 14 14 #include <linux/sh_timer.h> 15 15 #include <linux/io.h> 16 16 17 - static struct plat_sci_port sci_platform_data[] = { 18 - { 19 - .mapbase = 0xff923000, 20 - .flags = UPF_BOOT_AUTOCONF, 21 - .type = PORT_SCIF, 22 - .irqs = { 61, 61, 61, 61 }, 23 - }, { 24 - .mapbase = 0xff924000, 25 - .flags = UPF_BOOT_AUTOCONF, 26 - .type = PORT_SCIF, 27 - .irqs = { 62, 62, 62, 62 }, 28 - }, { 29 - .mapbase = 0xff925000, 30 - .flags = UPF_BOOT_AUTOCONF, 31 - .type = PORT_SCIF, 32 - .irqs = { 63, 63, 63, 63 }, 33 - }, { 34 - .mapbase = 0xff926000, 35 - .flags = UPF_BOOT_AUTOCONF, 36 - .type = PORT_SCIF, 37 - .irqs = { 64, 64, 64, 64 }, 38 - }, { 39 - .mapbase = 0xff927000, 40 - .flags = UPF_BOOT_AUTOCONF, 41 - .type = PORT_SCIF, 42 - .irqs = { 65, 65, 65, 65 }, 43 - }, { 44 - .mapbase = 0xff928000, 45 - .flags = UPF_BOOT_AUTOCONF, 46 - .type = PORT_SCIF, 47 - .irqs = { 66, 66, 66, 66 }, 48 - }, { 49 - .mapbase = 0xff929000, 50 - .flags = UPF_BOOT_AUTOCONF, 51 - .type = PORT_SCIF, 52 - .irqs = { 67, 67, 67, 67 }, 53 - }, { 54 - .mapbase = 0xff92a000, 55 - .flags = UPF_BOOT_AUTOCONF, 56 - .type = PORT_SCIF, 57 - .irqs = { 68, 68, 68, 68 }, 58 - }, { 59 - .mapbase = 0xff92b000, 60 - .flags = UPF_BOOT_AUTOCONF, 61 - .type = PORT_SCIF, 62 - .irqs = { 69, 69, 69, 69 }, 63 - }, { 64 - .mapbase = 0xff92c000, 65 - .flags = UPF_BOOT_AUTOCONF, 66 - .type = PORT_SCIF, 67 - .irqs = { 70, 70, 70, 70 }, 68 - }, { 69 - .flags = 0, 70 - } 17 + static struct plat_sci_port scif0_platform_data = { 18 + .mapbase = 0xff923000, 19 + .flags = UPF_BOOT_AUTOCONF, 20 + .type = PORT_SCIF, 21 + .irqs = { 61, 61, 61, 61 }, 71 22 }; 72 23 73 - static struct platform_device sci_device = { 24 + static struct platform_device scif0_device = { 74 25 .name = "sh-sci", 75 - .id = -1, 26 + .id = 0, 76 27 .dev = { 77 - .platform_data = sci_platform_data, 28 + .platform_data = &scif0_platform_data, 29 + }, 30 + }; 31 + 32 + static struct plat_sci_port scif1_platform_data = { 33 + .mapbase = 0xff924000, 34 + .flags = UPF_BOOT_AUTOCONF, 35 + .type = PORT_SCIF, 36 + .irqs = { 62, 62, 62, 62 }, 37 + }; 38 + 39 + static struct platform_device scif1_device = { 40 + .name = "sh-sci", 41 + .id = 1, 42 + .dev = { 43 + .platform_data = &scif1_platform_data, 44 + }, 45 + }; 46 + 47 + static struct plat_sci_port scif2_platform_data = { 48 + .mapbase = 0xff925000, 49 + .flags = UPF_BOOT_AUTOCONF, 50 + .type = PORT_SCIF, 51 + .irqs = { 63, 63, 63, 63 }, 52 + }; 53 + 54 + static struct platform_device scif2_device = { 55 + .name = "sh-sci", 56 + .id = 2, 57 + .dev = { 58 + .platform_data = &scif2_platform_data, 59 + }, 60 + }; 61 + 62 + static struct plat_sci_port scif3_platform_data = { 63 + .mapbase = 0xff926000, 64 + .flags = UPF_BOOT_AUTOCONF, 65 + .type = PORT_SCIF, 66 + .irqs = { 64, 64, 64, 64 }, 67 + }; 68 + 69 + static struct platform_device scif3_device = { 70 + .name = "sh-sci", 71 + .id = 3, 72 + .dev = { 73 + .platform_data = &scif3_platform_data, 74 + }, 75 + }; 76 + 77 + static struct plat_sci_port scif4_platform_data = { 78 + .mapbase = 0xff927000, 79 + .flags = UPF_BOOT_AUTOCONF, 80 + .type = PORT_SCIF, 81 + .irqs = { 65, 65, 65, 65 }, 82 + }; 83 + 84 + static struct platform_device scif4_device = { 85 + .name = "sh-sci", 86 + .id = 4, 87 + .dev = { 88 + .platform_data = &scif4_platform_data, 89 + }, 90 + }; 91 + 92 + static struct plat_sci_port scif5_platform_data = { 93 + .mapbase = 0xff928000, 94 + .flags = UPF_BOOT_AUTOCONF, 95 + .type = PORT_SCIF, 96 + .irqs = { 66, 66, 66, 66 }, 97 + }; 98 + 99 + static struct platform_device scif5_device = { 100 + .name = "sh-sci", 101 + .id = 5, 102 + .dev = { 103 + .platform_data = &scif5_platform_data, 104 + }, 105 + }; 106 + 107 + static struct plat_sci_port scif6_platform_data = { 108 + .mapbase = 0xff929000, 109 + .flags = UPF_BOOT_AUTOCONF, 110 + .type = PORT_SCIF, 111 + .irqs = { 67, 67, 67, 67 }, 112 + }; 113 + 114 + static struct platform_device scif6_device = { 115 + .name = "sh-sci", 116 + .id = 6, 117 + .dev = { 118 + .platform_data = &scif6_platform_data, 119 + }, 120 + }; 121 + 122 + static struct plat_sci_port scif7_platform_data = { 123 + .mapbase = 0xff92a000, 124 + .flags = UPF_BOOT_AUTOCONF, 125 + .type = PORT_SCIF, 126 + .irqs = { 68, 68, 68, 68 }, 127 + }; 128 + 129 + static struct platform_device scif7_device = { 130 + .name = "sh-sci", 131 + .id = 7, 132 + .dev = { 133 + .platform_data = &scif7_platform_data, 134 + }, 135 + }; 136 + 137 + static struct plat_sci_port scif8_platform_data = { 138 + .mapbase = 0xff92b000, 139 + .flags = UPF_BOOT_AUTOCONF, 140 + .type = PORT_SCIF, 141 + .irqs = { 69, 69, 69, 69 }, 142 + }; 143 + 144 + static struct platform_device scif8_device = { 145 + .name = "sh-sci", 146 + .id = 8, 147 + .dev = { 148 + .platform_data = &scif8_platform_data, 149 + }, 150 + }; 151 + 152 + static struct plat_sci_port scif9_platform_data = { 153 + .mapbase = 0xff92c000, 154 + .flags = UPF_BOOT_AUTOCONF, 155 + .type = PORT_SCIF, 156 + .irqs = { 70, 70, 70, 70 }, 157 + }; 158 + 159 + static struct platform_device scif9_device = { 160 + .name = "sh-sci", 161 + .id = 9, 162 + .dev = { 163 + .platform_data = &scif9_platform_data, 78 164 }, 79 165 }; 80 166 ··· 437 351 }; 438 352 439 353 static struct platform_device *sh7770_devices[] __initdata = { 354 + &scif0_device, 355 + &scif1_device, 356 + &scif2_device, 357 + &scif3_device, 358 + &scif4_device, 359 + &scif5_device, 360 + &scif6_device, 361 + &scif7_device, 362 + &scif8_device, 363 + &scif9_device, 440 364 &tmu0_device, 441 365 &tmu1_device, 442 366 &tmu2_device, ··· 456 360 &tmu6_device, 457 361 &tmu7_device, 458 362 &tmu8_device, 459 - &sci_device, 460 363 }; 461 364 462 365 static int __init sh7770_devices_setup(void) ··· 466 371 arch_initcall(sh7770_devices_setup); 467 372 468 373 static struct platform_device *sh7770_early_devices[] __initdata = { 374 + &scif0_device, 375 + &scif1_device, 376 + &scif2_device, 377 + &scif3_device, 378 + &scif4_device, 379 + &scif5_device, 380 + &scif6_device, 381 + &scif7_device, 382 + &scif8_device, 383 + &scif9_device, 469 384 &tmu0_device, 470 385 &tmu1_device, 471 386 &tmu2_device,
+34 -26
arch/sh/kernel/cpu/sh4a/setup-sh7780.c
··· 15 15 #include <linux/sh_timer.h> 16 16 #include <asm/dma-sh.h> 17 17 18 + static struct plat_sci_port scif0_platform_data = { 19 + .mapbase = 0xffe00000, 20 + .flags = UPF_BOOT_AUTOCONF, 21 + .type = PORT_SCIF, 22 + .irqs = { 40, 40, 40, 40 }, 23 + }; 24 + 25 + static struct platform_device scif0_device = { 26 + .name = "sh-sci", 27 + .id = 0, 28 + .dev = { 29 + .platform_data = &scif0_platform_data, 30 + }, 31 + }; 32 + 33 + static struct plat_sci_port scif1_platform_data = { 34 + .mapbase = 0xffe10000, 35 + .flags = UPF_BOOT_AUTOCONF, 36 + .type = PORT_SCIF, 37 + .irqs = { 76, 76, 76, 76 }, 38 + }; 39 + 40 + static struct platform_device scif1_device = { 41 + .name = "sh-sci", 42 + .id = 1, 43 + .dev = { 44 + .platform_data = &scif1_platform_data, 45 + }, 46 + }; 47 + 18 48 static struct sh_timer_config tmu0_platform_data = { 19 49 .name = "TMU0", 20 50 .channel_offset = 0x04, ··· 247 217 .resource = rtc_resources, 248 218 }; 249 219 250 - static struct plat_sci_port sci_platform_data[] = { 251 - { 252 - .mapbase = 0xffe00000, 253 - .flags = UPF_BOOT_AUTOCONF, 254 - .type = PORT_SCIF, 255 - .irqs = { 40, 40, 40, 40 }, 256 - }, { 257 - .mapbase = 0xffe10000, 258 - .flags = UPF_BOOT_AUTOCONF, 259 - .type = PORT_SCIF, 260 - .irqs = { 76, 76, 76, 76 }, 261 - }, { 262 - .flags = 0, 263 - } 264 - }; 265 - 266 - static struct platform_device sci_device = { 267 - .name = "sh-sci", 268 - .id = -1, 269 - .dev = { 270 - .platform_data = sci_platform_data, 271 - }, 272 - }; 273 - 274 220 static struct sh_dmae_pdata dma_platform_data = { 275 221 .mode = (SHDMA_MIX_IRQ | SHDMA_DMAOR1), 276 222 }; ··· 260 254 }; 261 255 262 256 static struct platform_device *sh7780_devices[] __initdata = { 257 + &scif0_device, 258 + &scif1_device, 263 259 &tmu0_device, 264 260 &tmu1_device, 265 261 &tmu2_device, ··· 269 261 &tmu4_device, 270 262 &tmu5_device, 271 263 &rtc_device, 272 - &sci_device, 273 264 &dma_device, 274 265 }; 275 266 ··· 278 271 ARRAY_SIZE(sh7780_devices)); 279 272 } 280 273 arch_initcall(sh7780_devices_setup); 281 - 282 274 static struct platform_device *sh7780_early_devices[] __initdata = { 275 + &scif0_device, 276 + &scif1_device, 283 277 &tmu0_device, 284 278 &tmu1_device, 285 279 &tmu2_device,
+108 -51
arch/sh/kernel/cpu/sh4a/setup-sh7785.c
··· 16 16 #include <linux/sh_timer.h> 17 17 #include <asm/mmzone.h> 18 18 19 + static struct plat_sci_port scif0_platform_data = { 20 + .mapbase = 0xffea0000, 21 + .flags = UPF_BOOT_AUTOCONF, 22 + .type = PORT_SCIF, 23 + .irqs = { 40, 40, 40, 40 }, 24 + .clk = "scif_fck", 25 + }; 26 + 27 + static struct platform_device scif0_device = { 28 + .name = "sh-sci", 29 + .id = 0, 30 + .dev = { 31 + .platform_data = &scif0_platform_data, 32 + }, 33 + }; 34 + 35 + static struct plat_sci_port scif1_platform_data = { 36 + .mapbase = 0xffeb0000, 37 + .flags = UPF_BOOT_AUTOCONF, 38 + .type = PORT_SCIF, 39 + .irqs = { 44, 44, 44, 44 }, 40 + .clk = "scif_fck", 41 + }; 42 + 43 + static struct platform_device scif1_device = { 44 + .name = "sh-sci", 45 + .id = 1, 46 + .dev = { 47 + .platform_data = &scif1_platform_data, 48 + }, 49 + }; 50 + 51 + static struct plat_sci_port scif2_platform_data = { 52 + .mapbase = 0xffec0000, 53 + .flags = UPF_BOOT_AUTOCONF, 54 + .type = PORT_SCIF, 55 + .irqs = { 60, 60, 60, 60 }, 56 + .clk = "scif_fck", 57 + }; 58 + 59 + static struct platform_device scif2_device = { 60 + .name = "sh-sci", 61 + .id = 2, 62 + .dev = { 63 + .platform_data = &scif2_platform_data, 64 + }, 65 + }; 66 + 67 + static struct plat_sci_port scif3_platform_data = { 68 + .mapbase = 0xffed0000, 69 + .flags = UPF_BOOT_AUTOCONF, 70 + .type = PORT_SCIF, 71 + .irqs = { 61, 61, 61, 61 }, 72 + .clk = "scif_fck", 73 + }; 74 + 75 + static struct platform_device scif3_device = { 76 + .name = "sh-sci", 77 + .id = 3, 78 + .dev = { 79 + .platform_data = &scif3_platform_data, 80 + }, 81 + }; 82 + 83 + static struct plat_sci_port scif4_platform_data = { 84 + .mapbase = 0xffee0000, 85 + .flags = UPF_BOOT_AUTOCONF, 86 + .type = PORT_SCIF, 87 + .irqs = { 62, 62, 62, 62 }, 88 + .clk = "scif_fck", 89 + }; 90 + 91 + static struct platform_device scif4_device = { 92 + .name = "sh-sci", 93 + .id = 4, 94 + .dev = { 95 + .platform_data = &scif4_platform_data, 96 + }, 97 + }; 98 + 99 + static struct plat_sci_port scif5_platform_data = { 100 + .mapbase = 0xffef0000, 101 + .flags = UPF_BOOT_AUTOCONF, 102 + .type = PORT_SCIF, 103 + .irqs = { 63, 63, 63, 63 }, 104 + .clk = "scif_fck", 105 + }; 106 + 107 + static struct platform_device scif5_device = { 108 + .name = "sh-sci", 109 + .id = 5, 110 + .dev = { 111 + .platform_data = &scif5_platform_data, 112 + }, 113 + }; 114 + 19 115 static struct sh_timer_config tmu0_platform_data = { 20 116 .name = "TMU0", 21 117 .channel_offset = 0x04, ··· 294 198 .num_resources = ARRAY_SIZE(tmu5_resources), 295 199 }; 296 200 297 - static struct plat_sci_port sci_platform_data[] = { 298 - { 299 - .mapbase = 0xffea0000, 300 - .flags = UPF_BOOT_AUTOCONF, 301 - .type = PORT_SCIF, 302 - .irqs = { 40, 40, 40, 40 }, 303 - .clk = "scif_fck", 304 - }, { 305 - .mapbase = 0xffeb0000, 306 - .flags = UPF_BOOT_AUTOCONF, 307 - .type = PORT_SCIF, 308 - .irqs = { 44, 44, 44, 44 }, 309 - .clk = "scif_fck", 310 - }, { 311 - .mapbase = 0xffec0000, 312 - .flags = UPF_BOOT_AUTOCONF, 313 - .type = PORT_SCIF, 314 - .irqs = { 60, 60, 60, 60 }, 315 - .clk = "scif_fck", 316 - }, { 317 - .mapbase = 0xffed0000, 318 - .flags = UPF_BOOT_AUTOCONF, 319 - .type = PORT_SCIF, 320 - .irqs = { 61, 61, 61, 61 }, 321 - .clk = "scif_fck", 322 - }, { 323 - .mapbase = 0xffee0000, 324 - .flags = UPF_BOOT_AUTOCONF, 325 - .type = PORT_SCIF, 326 - .irqs = { 62, 62, 62, 62 }, 327 - .clk = "scif_fck", 328 - }, { 329 - .mapbase = 0xffef0000, 330 - .flags = UPF_BOOT_AUTOCONF, 331 - .type = PORT_SCIF, 332 - .irqs = { 63, 63, 63, 63 }, 333 - .clk = "scif_fck", 334 - }, { 335 - .flags = 0, 336 - } 337 - }; 338 - 339 - static struct platform_device sci_device = { 340 - .name = "sh-sci", 341 - .id = -1, 342 - .dev = { 343 - .platform_data = sci_platform_data, 344 - }, 345 - }; 346 - 347 201 static struct platform_device *sh7785_devices[] __initdata = { 202 + &scif0_device, 203 + &scif1_device, 204 + &scif2_device, 205 + &scif3_device, 206 + &scif4_device, 207 + &scif5_device, 348 208 &tmu0_device, 349 209 &tmu1_device, 350 210 &tmu2_device, 351 211 &tmu3_device, 352 212 &tmu4_device, 353 213 &tmu5_device, 354 - &sci_device, 355 214 }; 356 215 357 216 static int __init sh7785_devices_setup(void) ··· 317 266 arch_initcall(sh7785_devices_setup); 318 267 319 268 static struct platform_device *sh7785_early_devices[] __initdata = { 269 + &scif0_device, 270 + &scif1_device, 271 + &scif2_device, 272 + &scif3_device, 273 + &scif4_device, 274 + &scif5_device, 320 275 &tmu0_device, 321 276 &tmu1_device, 322 277 &tmu2_device,
+92 -42
arch/sh/kernel/cpu/sh4a/setup-sh7786.c
··· 23 23 #include <linux/sh_timer.h> 24 24 #include <asm/mmzone.h> 25 25 26 - static struct plat_sci_port sci_platform_data[] = { 27 - { 28 - .mapbase = 0xffea0000, 29 - .flags = UPF_BOOT_AUTOCONF, 30 - .type = PORT_SCIF, 31 - .irqs = { 40, 41, 43, 42 }, 32 - }, 33 - /* 34 - * The rest of these all have multiplexed IRQs 35 - */ 36 - { 37 - .mapbase = 0xffeb0000, 38 - .flags = UPF_BOOT_AUTOCONF, 39 - .type = PORT_SCIF, 40 - .irqs = { 44, 44, 44, 44 }, 41 - }, { 42 - .mapbase = 0xffec0000, 43 - .flags = UPF_BOOT_AUTOCONF, 44 - .type = PORT_SCIF, 45 - .irqs = { 50, 50, 50, 50 }, 46 - }, { 47 - .mapbase = 0xffed0000, 48 - .flags = UPF_BOOT_AUTOCONF, 49 - .type = PORT_SCIF, 50 - .irqs = { 51, 51, 51, 51 }, 51 - }, { 52 - .mapbase = 0xffee0000, 53 - .flags = UPF_BOOT_AUTOCONF, 54 - .type = PORT_SCIF, 55 - .irqs = { 52, 52, 52, 52 }, 56 - }, { 57 - .mapbase = 0xffef0000, 58 - .flags = UPF_BOOT_AUTOCONF, 59 - .type = PORT_SCIF, 60 - .irqs = { 53, 53, 53, 53 }, 61 - }, { 62 - .flags = 0, 63 - } 26 + static struct plat_sci_port scif0_platform_data = { 27 + .mapbase = 0xffea0000, 28 + .flags = UPF_BOOT_AUTOCONF, 29 + .type = PORT_SCIF, 30 + .irqs = { 40, 41, 43, 42 }, 64 31 }; 65 32 66 - static struct platform_device sci_device = { 33 + static struct platform_device scif0_device = { 67 34 .name = "sh-sci", 68 - .id = -1, 35 + .id = 0, 69 36 .dev = { 70 - .platform_data = sci_platform_data, 37 + .platform_data = &scif0_platform_data, 38 + }, 39 + }; 40 + 41 + /* 42 + * The rest of these all have multiplexed IRQs 43 + */ 44 + static struct plat_sci_port scif1_platform_data = { 45 + .mapbase = 0xffeb0000, 46 + .flags = UPF_BOOT_AUTOCONF, 47 + .type = PORT_SCIF, 48 + .irqs = { 44, 44, 44, 44 }, 49 + }; 50 + 51 + static struct platform_device scif1_device = { 52 + .name = "sh-sci", 53 + .id = 1, 54 + .dev = { 55 + .platform_data = &scif1_platform_data, 56 + }, 57 + }; 58 + 59 + static struct plat_sci_port scif2_platform_data = { 60 + .mapbase = 0xffec0000, 61 + .flags = UPF_BOOT_AUTOCONF, 62 + .type = PORT_SCIF, 63 + .irqs = { 50, 50, 50, 50 }, 64 + }; 65 + 66 + static struct platform_device scif2_device = { 67 + .name = "sh-sci", 68 + .id = 2, 69 + .dev = { 70 + .platform_data = &scif2_platform_data, 71 + }, 72 + }; 73 + 74 + static struct plat_sci_port scif3_platform_data = { 75 + .mapbase = 0xffed0000, 76 + .flags = UPF_BOOT_AUTOCONF, 77 + .type = PORT_SCIF, 78 + .irqs = { 51, 51, 51, 51 }, 79 + }; 80 + 81 + static struct platform_device scif3_device = { 82 + .name = "sh-sci", 83 + .id = 3, 84 + .dev = { 85 + .platform_data = &scif3_platform_data, 86 + }, 87 + }; 88 + 89 + static struct plat_sci_port scif4_platform_data = { 90 + .mapbase = 0xffee0000, 91 + .flags = UPF_BOOT_AUTOCONF, 92 + .type = PORT_SCIF, 93 + .irqs = { 52, 52, 52, 52 }, 94 + }; 95 + 96 + static struct platform_device scif4_device = { 97 + .name = "sh-sci", 98 + .id = 4, 99 + .dev = { 100 + .platform_data = &scif4_platform_data, 101 + }, 102 + }; 103 + 104 + static struct plat_sci_port scif5_platform_data = { 105 + .mapbase = 0xffef0000, 106 + .flags = UPF_BOOT_AUTOCONF, 107 + .type = PORT_SCIF, 108 + .irqs = { 53, 53, 53, 53 }, 109 + }; 110 + 111 + static struct platform_device scif5_device = { 112 + .name = "sh-sci", 113 + .id = 5, 114 + .dev = { 115 + .platform_data = &scif5_platform_data, 71 116 }, 72 117 }; 73 118 ··· 504 459 }; 505 460 506 461 static struct platform_device *sh7786_early_devices[] __initdata = { 462 + &scif0_device, 463 + &scif1_device, 464 + &scif2_device, 465 + &scif3_device, 466 + &scif4_device, 467 + &scif5_device, 507 468 &tmu0_device, 508 469 &tmu1_device, 509 470 &tmu2_device, ··· 525 474 }; 526 475 527 476 static struct platform_device *sh7786_devices[] __initdata = { 528 - &sci_device, 529 477 &usb_ohci_device, 530 478 }; 531 479
+42 -34
arch/sh/kernel/cpu/sh4a/setup-shx3.c
··· 24 24 * silicon in the first place, we just refuse to deal with the port at 25 25 * all rather than adding infrastructure to hack around it. 26 26 */ 27 - static struct plat_sci_port sci_platform_data[] = { 28 - { 29 - .mapbase = 0xffc30000, 30 - .flags = UPF_BOOT_AUTOCONF, 31 - .type = PORT_SCIF, 32 - .irqs = { 40, 41, 43, 42 }, 33 - }, { 34 - .mapbase = 0xffc40000, 35 - .flags = UPF_BOOT_AUTOCONF, 36 - .type = PORT_SCIF, 37 - .irqs = { 44, 45, 47, 46 }, 38 - }, { 39 - .mapbase = 0xffc60000, 40 - .flags = UPF_BOOT_AUTOCONF, 41 - .type = PORT_SCIF, 42 - .irqs = { 52, 53, 55, 54 }, 43 - }, { 44 - .flags = 0, 45 - } 27 + static struct plat_sci_port scif0_platform_data = { 28 + .mapbase = 0xffc30000, 29 + .flags = UPF_BOOT_AUTOCONF, 30 + .type = PORT_SCIF, 31 + .irqs = { 40, 41, 43, 42 }, 46 32 }; 47 33 48 - static struct platform_device sci_device = { 34 + static struct platform_device scif0_device = { 49 35 .name = "sh-sci", 50 - .id = -1, 36 + .id = 0, 51 37 .dev = { 52 - .platform_data = sci_platform_data, 38 + .platform_data = &scif0_platform_data, 39 + }, 40 + }; 41 + 42 + static struct plat_sci_port scif1_platform_data = { 43 + .mapbase = 0xffc40000, 44 + .flags = UPF_BOOT_AUTOCONF, 45 + .type = PORT_SCIF, 46 + .irqs = { 44, 45, 47, 46 }, 47 + }; 48 + 49 + static struct platform_device scif1_device = { 50 + .name = "sh-sci", 51 + .id = 1, 52 + .dev = { 53 + .platform_data = &scif1_platform_data, 54 + }, 55 + }; 56 + 57 + static struct plat_sci_port scif2_platform_data = { 58 + .mapbase = 0xffc60000, 59 + .flags = UPF_BOOT_AUTOCONF, 60 + .type = PORT_SCIF, 61 + .irqs = { 52, 53, 55, 54 }, 62 + }; 63 + 64 + static struct platform_device scif2_device = { 65 + .name = "sh-sci", 66 + .id = 2, 67 + .dev = { 68 + .platform_data = &scif2_platform_data, 53 69 }, 54 70 }; 55 71 ··· 252 236 }; 253 237 254 238 static struct platform_device *shx3_early_devices[] __initdata = { 239 + &scif0_device, 240 + &scif1_device, 241 + &scif2_device, 255 242 &tmu0_device, 256 243 &tmu1_device, 257 244 &tmu2_device, ··· 263 244 &tmu5_device, 264 245 }; 265 246 266 - static struct platform_device *shx3_devices[] __initdata = { 267 - &sci_device, 268 - }; 269 - 270 247 static int __init shx3_devices_setup(void) 271 248 { 272 - int ret; 273 - 274 - ret = platform_add_devices(shx3_early_devices, 249 + return platform_add_devices(shx3_early_devices, 275 250 ARRAY_SIZE(shx3_early_devices)); 276 - if (unlikely(ret != 0)) 277 - return ret; 278 - 279 - return platform_add_devices(shx3_devices, 280 - ARRAY_SIZE(shx3_devices)); 281 251 } 282 252 arch_initcall(shx3_devices_setup); 283 253
+2 -2
arch/sh/kernel/cpu/sh5/fpu.c
··· 34 34 } 35 35 }; 36 36 37 - void save_fpu(struct task_struct *tsk, struct pt_regs *regs) 37 + void save_fpu(struct task_struct *tsk) 38 38 { 39 39 asm volatile("fst.p %0, (0*8), fp0\n\t" 40 40 "fst.p %0, (1*8), fp2\n\t" ··· 153 153 enable_fpu(); 154 154 if (last_task_used_math != NULL) 155 155 /* Other processes fpu state, save away */ 156 - save_fpu(last_task_used_math, regs); 156 + save_fpu(last_task_used_math); 157 157 158 158 last_task_used_math = current; 159 159 if (used_math()) {
+9 -13
arch/sh/kernel/cpu/sh5/setup-sh5.c
··· 16 16 #include <linux/sh_timer.h> 17 17 #include <asm/addrspace.h> 18 18 19 - static struct plat_sci_port sci_platform_data[] = { 20 - { 21 - .mapbase = PHYS_PERIPHERAL_BLOCK + 0x01030000, 22 - .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP, 23 - .type = PORT_SCIF, 24 - .irqs = { 39, 40, 42, 0 }, 25 - }, { 26 - .flags = 0, 27 - } 19 + static struct plat_sci_port scif0_platform_data = { 20 + .mapbase = PHYS_PERIPHERAL_BLOCK + 0x01030000, 21 + .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP, 22 + .type = PORT_SCIF, 23 + .irqs = { 39, 40, 42, 0 }, 28 24 }; 29 25 30 - static struct platform_device sci_device = { 26 + static struct platform_device scif0_device = { 31 27 .name = "sh-sci", 32 - .id = -1, 28 + .id = 0, 33 29 .dev = { 34 - .platform_data = sci_platform_data, 30 + .platform_data = &scif0_platform_data, 35 31 }, 36 32 }; 37 33 ··· 160 164 }; 161 165 162 166 static struct platform_device *sh5_early_devices[] __initdata = { 167 + &scif0_device, 163 168 &tmu0_device, 164 169 &tmu1_device, 165 170 &tmu2_device, 166 171 }; 167 172 168 173 static struct platform_device *sh5_devices[] __initdata = { 169 - &sci_device, 170 174 &rtc_device, 171 175 }; 172 176
+1 -156
arch/sh/kernel/early_printk.c
··· 15 15 #include <linux/io.h> 16 16 #include <linux/delay.h> 17 17 18 - #ifdef CONFIG_SH_STANDARD_BIOS 19 18 #include <asm/sh_bios.h> 20 19 21 20 /* ··· 56 57 .flags = CON_PRINTBUFFER, 57 58 .index = -1, 58 59 }; 59 - #endif 60 60 61 - #ifdef CONFIG_EARLY_SCIF_CONSOLE 62 - #include <linux/serial_core.h> 63 - #include "../../../drivers/serial/sh-sci.h" 64 - 65 - #if defined(CONFIG_CPU_SUBTYPE_SH7720) || \ 66 - defined(CONFIG_CPU_SUBTYPE_SH7721) 67 - #define EPK_SCSMR_VALUE 0x000 68 - #define EPK_SCBRR_VALUE 0x00C 69 - #define EPK_FIFO_SIZE 64 70 - #define EPK_FIFO_BITS (0x7f00 >> 8) 71 - #else 72 - #define EPK_FIFO_SIZE 16 73 - #define EPK_FIFO_BITS (0x1f00 >> 8) 74 - #endif 75 - 76 - static struct uart_port scif_port = { 77 - .type = PORT_SCIF, 78 - .mapbase = CONFIG_EARLY_SCIF_CONSOLE_PORT, 79 - .membase = (char __iomem *)CONFIG_EARLY_SCIF_CONSOLE_PORT, 80 - }; 81 - 82 - static void scif_sercon_putc(int c) 83 - { 84 - while (((sci_in(&scif_port, SCFDR) & EPK_FIFO_BITS) >= EPK_FIFO_SIZE)) 85 - ; 86 - 87 - sci_in(&scif_port, SCxSR); 88 - sci_out(&scif_port, SCxSR, 0xf3 & ~(0x20 | 0x40)); 89 - sci_out(&scif_port, SCxTDR, c); 90 - 91 - while ((sci_in(&scif_port, SCxSR) & 0x40) == 0) 92 - ; 93 - 94 - if (c == '\n') 95 - scif_sercon_putc('\r'); 96 - } 97 - 98 - static void scif_sercon_write(struct console *con, const char *s, 99 - unsigned count) 100 - { 101 - while (count-- > 0) 102 - scif_sercon_putc(*s++); 103 - } 104 - 105 - static int __init scif_sercon_setup(struct console *con, char *options) 106 - { 107 - con->cflag = CREAD | HUPCL | CLOCAL | B115200 | CS8; 108 - 109 - return 0; 110 - } 111 - 112 - static struct console scif_console = { 113 - .name = "sercon", 114 - .write = scif_sercon_write, 115 - .setup = scif_sercon_setup, 116 - .flags = CON_PRINTBUFFER, 117 - .index = -1, 118 - }; 119 - 120 - #if !defined(CONFIG_SH_STANDARD_BIOS) 121 - #if defined(CONFIG_CPU_SUBTYPE_SH7720) || \ 122 - defined(CONFIG_CPU_SUBTYPE_SH7721) 123 - static void scif_sercon_init(char *s) 124 - { 125 - sci_out(&scif_port, SCSCR, 0x0000); /* clear TE and RE */ 126 - sci_out(&scif_port, SCFCR, 0x4006); /* reset */ 127 - sci_out(&scif_port, SCSCR, 0x0000); /* select internal clock */ 128 - sci_out(&scif_port, SCSMR, EPK_SCSMR_VALUE); 129 - sci_out(&scif_port, SCBRR, EPK_SCBRR_VALUE); 130 - 131 - mdelay(1); /* wait 1-bit time */ 132 - 133 - sci_out(&scif_port, SCFCR, 0x0030); /* TTRG=b'11 */ 134 - sci_out(&scif_port, SCSCR, 0x0030); /* TE, RE */ 135 - } 136 - #elif defined(CONFIG_CPU_SH4) || defined(CONFIG_CPU_SH3) 137 - #define DEFAULT_BAUD 115200 138 - /* 139 - * Simple SCIF init, primarily aimed at SH7750 and other similar SH-4 140 - * devices that aren't using sh-ipl+g. 141 - */ 142 - static void scif_sercon_init(char *s) 143 - { 144 - struct uart_port *port = &scif_port; 145 - unsigned baud = DEFAULT_BAUD; 146 - unsigned int status; 147 - char *e; 148 - 149 - if (*s == ',') 150 - ++s; 151 - 152 - if (*s) { 153 - /* ignore ioport/device name */ 154 - s += strcspn(s, ","); 155 - if (*s == ',') 156 - s++; 157 - } 158 - 159 - if (*s) { 160 - baud = simple_strtoul(s, &e, 0); 161 - if (baud == 0 || s == e) 162 - baud = DEFAULT_BAUD; 163 - } 164 - 165 - do { 166 - status = sci_in(port, SCxSR); 167 - } while (!(status & SCxSR_TEND(port))); 168 - 169 - sci_out(port, SCSCR, 0); /* TE=0, RE=0 */ 170 - sci_out(port, SCFCR, SCFCR_RFRST | SCFCR_TFRST); 171 - sci_out(port, SCSMR, 0); 172 - 173 - /* Set baud rate */ 174 - sci_out(port, SCBRR, (CONFIG_SH_PCLK_FREQ + 16 * baud) / 175 - (32 * baud) - 1); 176 - udelay((1000000+(baud-1)) / baud); /* Wait one bit interval */ 177 - 178 - sci_out(port, SCSPTR, 0); 179 - sci_out(port, SCxSR, 0x60); 180 - sci_out(port, SCLSR, 0); 181 - 182 - sci_out(port, SCFCR, 0); 183 - sci_out(port, SCSCR, 0x30); /* TE=1, RE=1 */ 184 - } 185 - #endif /* defined(CONFIG_CPU_SUBTYPE_SH7720) */ 186 - #endif /* !defined(CONFIG_SH_STANDARD_BIOS) */ 187 - #endif /* CONFIG_EARLY_SCIF_CONSOLE */ 188 - 189 - /* 190 - * Setup a default console, if more than one is compiled in, rely on the 191 - * earlyprintk= parsing to give priority. 192 - */ 193 - static struct console *early_console = 194 - #ifdef CONFIG_SH_STANDARD_BIOS 195 - &bios_console 196 - #elif defined(CONFIG_EARLY_SCIF_CONSOLE) 197 - &scif_console 198 - #else 199 - NULL 200 - #endif 201 - ; 61 + static struct console *early_console; 202 62 203 63 static int __init setup_early_printk(char *buf) 204 64 { ··· 69 211 if (strstr(buf, "keep")) 70 212 keep_early = 1; 71 213 72 - #ifdef CONFIG_SH_STANDARD_BIOS 73 214 if (!strncmp(buf, "bios", 4)) 74 215 early_console = &bios_console; 75 - #endif 76 - #if defined(CONFIG_EARLY_SCIF_CONSOLE) 77 - if (!strncmp(buf, "serial", 6)) { 78 - early_console = &scif_console; 79 - 80 - #if !defined(CONFIG_SH_STANDARD_BIOS) 81 - #if defined(CONFIG_CPU_SH4) || defined(CONFIG_CPU_SH3) 82 - scif_sercon_init(buf + 6); 83 - #endif 84 - #endif 85 - } 86 - #endif 87 216 88 217 if (likely(early_console)) { 89 218 if (keep_early)
+2 -74
arch/sh/kernel/ftrace.c
··· 401 401 #endif /* CONFIG_FUNCTION_GRAPH_TRACER */ 402 402 403 403 #ifdef CONFIG_FTRACE_SYSCALLS 404 - 405 - extern unsigned long __start_syscalls_metadata[]; 406 - extern unsigned long __stop_syscalls_metadata[]; 407 404 extern unsigned long *sys_call_table; 408 405 409 - static struct syscall_metadata **syscalls_metadata; 410 - 411 - static struct syscall_metadata *find_syscall_meta(unsigned long *syscall) 406 + unsigned long __init arch_syscall_addr(int nr) 412 407 { 413 - struct syscall_metadata *start; 414 - struct syscall_metadata *stop; 415 - char str[KSYM_SYMBOL_LEN]; 416 - 417 - 418 - start = (struct syscall_metadata *)__start_syscalls_metadata; 419 - stop = (struct syscall_metadata *)__stop_syscalls_metadata; 420 - kallsyms_lookup((unsigned long) syscall, NULL, NULL, NULL, str); 421 - 422 - for ( ; start < stop; start++) { 423 - if (start->name && !strcmp(start->name, str)) 424 - return start; 425 - } 426 - 427 - return NULL; 408 + return (unsigned long)sys_call_table[nr]; 428 409 } 429 - 430 - struct syscall_metadata *syscall_nr_to_meta(int nr) 431 - { 432 - if (!syscalls_metadata || nr >= FTRACE_SYSCALL_MAX || nr < 0) 433 - return NULL; 434 - 435 - return syscalls_metadata[nr]; 436 - } 437 - 438 - int syscall_name_to_nr(char *name) 439 - { 440 - int i; 441 - 442 - if (!syscalls_metadata) 443 - return -1; 444 - for (i = 0; i < NR_syscalls; i++) 445 - if (syscalls_metadata[i]) 446 - if (!strcmp(syscalls_metadata[i]->name, name)) 447 - return i; 448 - return -1; 449 - } 450 - 451 - void set_syscall_enter_id(int num, int id) 452 - { 453 - syscalls_metadata[num]->enter_id = id; 454 - } 455 - 456 - void set_syscall_exit_id(int num, int id) 457 - { 458 - syscalls_metadata[num]->exit_id = id; 459 - } 460 - 461 - static int __init arch_init_ftrace_syscalls(void) 462 - { 463 - int i; 464 - struct syscall_metadata *meta; 465 - unsigned long **psys_syscall_table = &sys_call_table; 466 - 467 - syscalls_metadata = kzalloc(sizeof(*syscalls_metadata) * 468 - FTRACE_SYSCALL_MAX, GFP_KERNEL); 469 - if (!syscalls_metadata) { 470 - WARN_ON(1); 471 - return -ENOMEM; 472 - } 473 - 474 - for (i = 0; i < FTRACE_SYSCALL_MAX; i++) { 475 - meta = find_syscall_meta(psys_syscall_table[i]); 476 - syscalls_metadata[i] = meta; 477 - } 478 - 479 - return 0; 480 - } 481 - arch_initcall(arch_init_ftrace_syscalls); 482 410 #endif /* CONFIG_FTRACE_SYSCALLS */
+2 -2
arch/sh/kernel/process_64.c
··· 404 404 if (fpvalid) { 405 405 if (current == last_task_used_math) { 406 406 enable_fpu(); 407 - save_fpu(tsk, regs); 407 + save_fpu(tsk); 408 408 disable_fpu(); 409 409 last_task_used_math = 0; 410 410 regs->sr |= SR_FD; ··· 431 431 #ifdef CONFIG_SH_FPU 432 432 if(last_task_used_math == current) { 433 433 enable_fpu(); 434 - save_fpu(current, regs); 434 + save_fpu(current); 435 435 disable_fpu(); 436 436 last_task_used_math = NULL; 437 437 regs->sr |= SR_FD;
+2 -2
arch/sh/kernel/ptrace_64.c
··· 82 82 83 83 if (last_task_used_math == task) { 84 84 enable_fpu(); 85 - save_fpu(task, regs); 85 + save_fpu(task); 86 86 disable_fpu(); 87 87 last_task_used_math = 0; 88 88 regs->sr |= SR_FD; ··· 118 118 set_stopped_child_used_math(task); 119 119 } else if (last_task_used_math == task) { 120 120 enable_fpu(); 121 - save_fpu(task, regs); 121 + save_fpu(task); 122 122 disable_fpu(); 123 123 last_task_used_math = 0; 124 124 regs->sr |= SR_FD;
+3
arch/sh/kernel/setup.c
··· 423 423 424 424 plat_early_device_setup(); 425 425 426 + /* Let earlyprintk output early console messages */ 427 + early_platform_driver_probe("earlyprintk", 1, 1); 428 + 426 429 sh_mv_setup(); 427 430 428 431 /*
+1 -1
arch/sh/kernel/signal_64.c
··· 314 314 315 315 if (current == last_task_used_math) { 316 316 enable_fpu(); 317 - save_fpu(current, regs); 317 + save_fpu(current); 318 318 disable_fpu(); 319 319 last_task_used_math = NULL; 320 320 regs->sr |= SR_FD;
+1
arch/sh/kernel/syscalls_32.S
··· 353 353 .long sys_pwritev 354 354 .long sys_rt_tgsigqueueinfo /* 335 */ 355 355 .long sys_perf_event_open 356 + .long sys_recvmmsg
+12 -6
arch/sh/kernel/traps_32.c
··· 452 452 rm = regs->regs[index]; 453 453 454 454 /* shout about fixups */ 455 - if (!expected && printk_ratelimit()) 456 - printk(KERN_NOTICE "Fixing up unaligned %s access " 457 - "in \"%s\" pid=%d pc=0x%p ins=0x%04hx\n", 458 - user_mode(regs) ? "userspace" : "kernel", 459 - current->comm, task_pid_nr(current), 460 - (void *)regs->pc, instruction); 455 + if (!expected) { 456 + if (user_mode(regs) && (se_usermode & 1) && printk_ratelimit()) 457 + pr_notice("Fixing up unaligned userspace access " 458 + "in \"%s\" pid=%d pc=0x%p ins=0x%04hx\n", 459 + current->comm, task_pid_nr(current), 460 + (void *)regs->pc, instruction); 461 + else if (se_kernmode_warn && printk_ratelimit()) 462 + pr_notice("Fixing up unaligned kernel access " 463 + "in \"%s\" pid=%d pc=0x%p ins=0x%04hx\n", 464 + current->comm, task_pid_nr(current), 465 + (void *)regs->pc, instruction); 466 + } 461 467 462 468 ret = -EFAULT; 463 469 switch (instruction&0xF000) {
+2 -2
arch/sh/kernel/traps_64.c
··· 600 600 indexed by register number. */ 601 601 if (last_task_used_math == current) { 602 602 enable_fpu(); 603 - save_fpu(current, regs); 603 + save_fpu(current); 604 604 disable_fpu(); 605 605 last_task_used_math = NULL; 606 606 regs->sr |= SR_FD; ··· 673 673 indexed by register number. */ 674 674 if (last_task_used_math == current) { 675 675 enable_fpu(); 676 - save_fpu(current, regs); 676 + save_fpu(current); 677 677 disable_fpu(); 678 678 last_task_used_math = NULL; 679 679 regs->sr |= SR_FD;
+1 -2
arch/sh/mm/cache-sh4.c
··· 256 256 address = (unsigned long)vaddr; 257 257 } 258 258 259 - if (pages_do_alias(address, phys)) 260 - flush_cache_one(CACHE_OC_ADDRESS_ARRAY | 259 + flush_cache_one(CACHE_OC_ADDRESS_ARRAY | 261 260 (address & shm_align_mask), phys); 262 261 263 262 if (vma->vm_flags & VM_EXEC)
+5 -5
arch/sh/mm/ioremap_32.c
··· 33 33 * have to convert them into an offset in a page-aligned mapping, but the 34 34 * caller shouldn't need to know that small detail. 35 35 */ 36 - void __iomem *__ioremap(unsigned long phys_addr, unsigned long size, 37 - unsigned long flags) 36 + void __iomem *__ioremap_caller(unsigned long phys_addr, unsigned long size, 37 + unsigned long flags, void *caller) 38 38 { 39 - struct vm_struct * area; 39 + struct vm_struct *area; 40 40 unsigned long offset, last_addr, addr, orig_addr; 41 41 pgprot_t pgprot; 42 42 ··· 67 67 /* 68 68 * Ok, go for it.. 69 69 */ 70 - area = get_vm_area(size, VM_IOREMAP); 70 + area = get_vm_area_caller(size, VM_IOREMAP, caller); 71 71 if (!area) 72 72 return NULL; 73 73 area->phys_addr = phys_addr; ··· 103 103 104 104 return (void __iomem *)(offset + (char *)orig_addr); 105 105 } 106 - EXPORT_SYMBOL(__ioremap); 106 + EXPORT_SYMBOL(__ioremap_caller); 107 107 108 108 void __iounmap(void __iomem *addr) 109 109 {
+3 -3
arch/sh/mm/ioremap_64.c
··· 258 258 pte_clear(&init_mm, vaddr, ptep); 259 259 } 260 260 261 - void __iomem *__ioremap(unsigned long offset, unsigned long size, 262 - unsigned long flags) 261 + void __iomem *__ioremap_caller(unsigned long offset, unsigned long size, 262 + unsigned long flags, void *caller) 263 263 { 264 264 char name[14]; 265 265 266 266 sprintf(name, "phys_%08x", (u32)offset); 267 267 return shmedia_alloc_io(offset, size, name, flags); 268 268 } 269 - EXPORT_SYMBOL(__ioremap); 269 + EXPORT_SYMBOL(__ioremap_caller); 270 270 271 271 void __iounmap(void __iomem *virtual) 272 272 {
+12 -3
arch/sh/mm/numa.c
··· 28 28 { 29 29 unsigned long free_pfn = PFN_UP(__pa(_end)); 30 30 u64 base = min_low_pfn << PAGE_SHIFT; 31 - u64 size = (max_low_pfn << PAGE_SHIFT) - min_low_pfn; 31 + u64 size = (max_low_pfn << PAGE_SHIFT) - base; 32 32 33 33 lmb_add(base, size); 34 34 ··· 36 36 lmb_reserve(__MEMORY_START + CONFIG_ZERO_PAGE_OFFSET, 37 37 (PFN_PHYS(free_pfn) + PAGE_SIZE - 1) - 38 38 (__MEMORY_START + CONFIG_ZERO_PAGE_OFFSET)); 39 + 40 + /* 41 + * Reserve physical pages below CONFIG_ZERO_PAGE_OFFSET. 42 + */ 43 + if (CONFIG_ZERO_PAGE_OFFSET != 0) 44 + lmb_reserve(__MEMORY_START, CONFIG_ZERO_PAGE_OFFSET); 45 + 46 + lmb_analyze(); 47 + lmb_dump_all(); 39 48 40 49 /* 41 50 * Node 0 sets up its pgdat at the first available pfn, ··· 80 71 81 72 /* Node-local pgdat */ 82 73 NODE_DATA(nid) = __va(lmb_alloc_base(sizeof(struct pglist_data), 83 - SMP_CACHE_BYTES, end_pfn)); 74 + SMP_CACHE_BYTES, end)); 84 75 memset(NODE_DATA(nid), 0, sizeof(struct pglist_data)); 85 76 86 77 NODE_DATA(nid)->bdata = &bootmem_node_data[nid]; ··· 90 81 /* Node-local bootmap */ 91 82 bootmap_pages = bootmem_bootmap_pages(end_pfn - start_pfn); 92 83 bootmem_paddr = lmb_alloc_base(bootmap_pages << PAGE_SHIFT, 93 - PAGE_SIZE, end_pfn); 84 + PAGE_SIZE, end); 94 85 init_bootmem_node(NODE_DATA(nid), bootmem_paddr >> PAGE_SHIFT, 95 86 start_pfn, end_pfn); 96 87
+45 -9
drivers/serial/sh-sci.c
··· 1043 1043 sci_port->port.iotype = UPIO_MEM; 1044 1044 sci_port->port.line = index; 1045 1045 sci_port->port.fifosize = 1; 1046 - sci_port->iclk = p->clk ? clk_get(&dev->dev, p->clk) : NULL; 1047 - sci_port->dclk = clk_get(&dev->dev, "peripheral_clk"); 1048 - sci_port->enable = sci_clk_enable; 1049 - sci_port->disable = sci_clk_disable; 1046 + 1047 + if (dev) { 1048 + sci_port->iclk = p->clk ? clk_get(&dev->dev, p->clk) : NULL; 1049 + sci_port->dclk = clk_get(&dev->dev, "peripheral_clk"); 1050 + sci_port->enable = sci_clk_enable; 1051 + sci_port->disable = sci_clk_disable; 1052 + sci_port->port.dev = &dev->dev; 1053 + } 1050 1054 1051 1055 sci_port->break_timer.data = (unsigned long)sci_port; 1052 1056 sci_port->break_timer.function = sci_break_timer; ··· 1061 1057 1062 1058 sci_port->port.irq = p->irqs[SCIx_TXI_IRQ]; 1063 1059 sci_port->port.flags = p->flags; 1064 - sci_port->port.dev = &dev->dev; 1065 1060 sci_port->type = sci_port->port.type = p->type; 1066 1061 1067 1062 memcpy(&sci_port->irqs, &p->irqs, sizeof(p->irqs)); ··· 1104 1101 sci_port->disable(port); 1105 1102 } 1106 1103 1107 - static int __init serial_console_setup(struct console *co, char *options) 1104 + static int __devinit serial_console_setup(struct console *co, char *options) 1108 1105 { 1109 1106 struct sci_port *sci_port; 1110 1107 struct uart_port *port; ··· 1122 1119 if (co->index >= SCI_NPORTS) 1123 1120 co->index = 0; 1124 1121 1125 - sci_port = &sci_ports[co->index]; 1126 - port = &sci_port->port; 1127 - co->data = port; 1122 + if (co->data) { 1123 + port = co->data; 1124 + sci_port = to_sci_port(port); 1125 + } else { 1126 + sci_port = &sci_ports[co->index]; 1127 + port = &sci_port->port; 1128 + co->data = port; 1129 + } 1128 1130 1129 1131 /* 1130 1132 * Also need to check port->type, we don't actually have any ··· 1173 1165 return 0; 1174 1166 } 1175 1167 console_initcall(sci_console_init); 1168 + 1169 + static struct sci_port early_serial_port; 1170 + static struct console early_serial_console = { 1171 + .name = "early_ttySC", 1172 + .write = serial_console_write, 1173 + .flags = CON_PRINTBUFFER, 1174 + }; 1175 + static char early_serial_buf[32]; 1176 + 1176 1177 #endif /* CONFIG_SERIAL_SH_SCI_CONSOLE */ 1177 1178 1178 1179 #if defined(CONFIG_SERIAL_SH_SCI_CONSOLE) ··· 1266 1249 struct plat_sci_port *p = dev->dev.platform_data; 1267 1250 struct sh_sci_priv *priv; 1268 1251 int i, ret = -EINVAL; 1252 + 1253 + #ifdef CONFIG_SERIAL_SH_SCI_CONSOLE 1254 + if (is_early_platform_device(dev)) { 1255 + if (dev->id == -1) 1256 + return -ENOTSUPP; 1257 + early_serial_console.index = dev->id; 1258 + early_serial_console.data = &early_serial_port.port; 1259 + sci_init_single(NULL, &early_serial_port, dev->id, p); 1260 + serial_console_setup(&early_serial_console, early_serial_buf); 1261 + if (!strstr(early_serial_buf, "keep")) 1262 + early_serial_console.flags |= CON_BOOT; 1263 + register_console(&early_serial_console); 1264 + return 0; 1265 + } 1266 + #endif 1269 1267 1270 1268 priv = kzalloc(sizeof(*priv), GFP_KERNEL); 1271 1269 if (!priv) ··· 1381 1349 uart_unregister_driver(&sci_uart_driver); 1382 1350 } 1383 1351 1352 + #ifdef CONFIG_SERIAL_SH_SCI_CONSOLE 1353 + early_platform_init_buffer("earlyprintk", &sci_driver, 1354 + early_serial_buf, ARRAY_SIZE(early_serial_buf)); 1355 + #endif 1384 1356 module_init(sci_init); 1385 1357 module_exit(sci_exit); 1386 1358
+2
drivers/sh/intc.c
··· 806 806 if (d->state.event != PM_EVENT_FREEZE) 807 807 break; 808 808 for_each_irq_desc(irq, desc) { 809 + if (desc->handle_irq == intc_redirect_irq) 810 + continue; 809 811 if (desc->chip != &d->chip) 810 812 continue; 811 813 if (desc->status & IRQ_DISABLED)
+1 -1
drivers/sh/pfc.c
··· 71 71 72 72 pos = dr->reg_width - (in_pos + 1); 73 73 74 - pr_debug("write_bit addr = %lx, value = %ld, pos = %ld, " 74 + pr_debug("write_bit addr = %lx, value = %d, pos = %ld, " 75 75 "r_width = %ld\n", 76 76 dr->reg, !!value, pos, dr->reg_width); 77 77
+9 -1
drivers/video/sh_mobile_lcdcfb.c
··· 281 281 struct list_head *pagelist) 282 282 { 283 283 struct sh_mobile_lcdc_chan *ch = info->par; 284 + struct sh_mobile_lcdc_board_cfg *bcfg = &ch->cfg.board_cfg; 284 285 285 286 /* enable clocks before accessing hardware */ 286 287 sh_mobile_lcdc_clk_on(ch->lcdc); ··· 306 305 307 306 /* trigger panel update */ 308 307 dma_map_sg(info->dev, ch->sglist, nr_pages, DMA_TO_DEVICE); 308 + if (bcfg->start_transfer) 309 + bcfg->start_transfer(bcfg->board_data, ch, 310 + &sh_mobile_lcdc_sys_bus_ops); 309 311 lcdc_write_chan(ch, LDSM2R, 1); 310 312 dma_unmap_sg(info->dev, ch->sglist, nr_pages, DMA_TO_DEVICE); 311 - } else 313 + } else { 314 + if (bcfg->start_transfer) 315 + bcfg->start_transfer(bcfg->board_data, ch, 316 + &sh_mobile_lcdc_sys_bus_ops); 312 317 lcdc_write_chan(ch, LDSM2R, 1); 318 + } 313 319 } 314 320 315 321 static void sh_mobile_lcdc_deferred_io_touch(struct fb_info *info)
+2
include/video/sh_mobile_lcdc.h
··· 50 50 void *board_data; 51 51 int (*setup_sys)(void *board_data, void *sys_ops_handle, 52 52 struct sh_mobile_lcdc_sys_bus_ops *sys_ops); 53 + void (*start_transfer)(void *board_data, void *sys_ops_handle, 54 + struct sh_mobile_lcdc_sys_bus_ops *sys_ops); 53 55 void (*display_on)(void *board_data); 54 56 void (*display_off)(void *board_data); 55 57 };