diff options
Diffstat (limited to 'arch/sh/boards')
-rw-r--r-- | arch/sh/boards/mach-ap325rxa/setup.c | 3 | ||||
-rw-r--r-- | arch/sh/boards/mach-ecovec24/setup.c | 334 | ||||
-rw-r--r-- | arch/sh/boards/mach-kfr2r09/lcd_wqvga.c | 6 | ||||
-rw-r--r-- | arch/sh/boards/mach-kfr2r09/setup.c | 1 | ||||
-rw-r--r-- | arch/sh/boards/mach-se/7722/irq.c | 7 | ||||
-rw-r--r-- | arch/sh/boards/mach-se/7724/setup.c | 19 |
6 files changed, 361 insertions, 9 deletions
diff --git a/arch/sh/boards/mach-ap325rxa/setup.c b/arch/sh/boards/mach-ap325rxa/setup.c index 7a9f69663f1a..1f5fa5c44f6d 100644 --- a/arch/sh/boards/mach-ap325rxa/setup.c +++ b/arch/sh/boards/mach-ap325rxa/setup.c | |||
@@ -323,7 +323,8 @@ static struct soc_camera_platform_info camera_info = { | |||
323 | .height = 480, | 323 | .height = 480, |
324 | }, | 324 | }, |
325 | .bus_param = SOCAM_PCLK_SAMPLE_RISING | SOCAM_HSYNC_ACTIVE_HIGH | | 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 | .set_capture = camera_set_capture, | 328 | .set_capture = camera_set_capture, |
328 | }; | 329 | }; |
329 | 330 | ||
diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c index 826e62326d51..5c246289b4f0 100644 --- a/arch/sh/boards/mach-ecovec24/setup.c +++ b/arch/sh/boards/mach-ecovec24/setup.c | |||
@@ -19,11 +19,18 @@ | |||
19 | #include <linux/usb/r8a66597.h> | 19 | #include <linux/usb/r8a66597.h> |
20 | #include <linux/i2c.h> | 20 | #include <linux/i2c.h> |
21 | #include <linux/i2c/tsc2007.h> | 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 | #include <linux/input.h> | 26 | #include <linux/input.h> |
23 | #include <linux/input/sh_keysc.h> | 27 | #include <linux/input/sh_keysc.h> |
24 | #include <linux/mfd/sh_mobile_sdhi.h> | 28 | #include <linux/mfd/sh_mobile_sdhi.h> |
25 | #include <video/sh_mobile_lcdc.h> | 29 | #include <video/sh_mobile_lcdc.h> |
30 | #include <sound/sh_fsi.h> | ||
26 | #include <media/sh_mobile_ceu.h> | 31 | #include <media/sh_mobile_ceu.h> |
32 | #include <media/tw9910.h> | ||
33 | #include <media/mt9t112.h> | ||
27 | #include <asm/heartbeat.h> | 34 | #include <asm/heartbeat.h> |
28 | #include <asm/sh_eth.h> | 35 | #include <asm/sh_eth.h> |
29 | #include <asm/clock.h> | 36 | #include <asm/clock.h> |
@@ -121,8 +128,6 @@ static struct platform_device nor_flash_device = { | |||
121 | 128 | ||
122 | /* SH Eth */ | 129 | /* SH Eth */ |
123 | #define SH_ETH_ADDR (0xA4600000) | 130 | #define SH_ETH_ADDR (0xA4600000) |
124 | #define SH_ETH_MAHR (SH_ETH_ADDR + 0x1C0) | ||
125 | #define SH_ETH_MALR (SH_ETH_ADDR + 0x1C8) | ||
126 | static struct resource sh_eth_resources[] = { | 131 | static struct resource sh_eth_resources[] = { |
127 | [0] = { | 132 | [0] = { |
128 | .start = SH_ETH_ADDR, | 133 | .start = SH_ETH_ADDR, |
@@ -338,10 +343,20 @@ static struct platform_device ceu1_device = { | |||
338 | }; | 343 | }; |
339 | 344 | ||
340 | /* I2C device */ | 345 | /* I2C device */ |
346 | static struct i2c_board_info i2c0_devices[] = { | ||
347 | { | ||
348 | I2C_BOARD_INFO("da7210", 0x1a), | ||
349 | }, | ||
350 | }; | ||
351 | |||
341 | static struct i2c_board_info i2c1_devices[] = { | 352 | static struct i2c_board_info i2c1_devices[] = { |
342 | { | 353 | { |
343 | I2C_BOARD_INFO("r2025sd", 0x32), | 354 | I2C_BOARD_INFO("r2025sd", 0x32), |
344 | }, | 355 | }, |
356 | { | ||
357 | I2C_BOARD_INFO("lis3lv02d", 0x1c), | ||
358 | .irq = 33, | ||
359 | } | ||
345 | }; | 360 | }; |
346 | 361 | ||
347 | /* KEYSC */ | 362 | /* KEYSC */ |
@@ -421,6 +436,7 @@ static struct i2c_board_info ts_i2c_clients = { | |||
421 | .irq = IRQ0, | 436 | .irq = IRQ0, |
422 | }; | 437 | }; |
423 | 438 | ||
439 | #ifdef CONFIG_MFD_SH_MOBILE_SDHI | ||
424 | /* SHDI0 */ | 440 | /* SHDI0 */ |
425 | static void sdhi0_set_pwr(struct platform_device *pdev, int state) | 441 | static void sdhi0_set_pwr(struct platform_device *pdev, int state) |
426 | { | 442 | { |
@@ -493,6 +509,250 @@ static struct platform_device sdhi1_device = { | |||
493 | }, | 509 | }, |
494 | }; | 510 | }; |
495 | 511 | ||
512 | #else | ||
513 | |||
514 | /* MMC SPI */ | ||
515 | static int mmc_spi_get_ro(struct device *dev) | ||
516 | { | ||
517 | return gpio_get_value(GPIO_PTY6); | ||
518 | } | ||
519 | |||
520 | static int mmc_spi_get_cd(struct device *dev) | ||
521 | { | ||
522 | return !gpio_get_value(GPIO_PTY7); | ||
523 | } | ||
524 | |||
525 | static void mmc_spi_setpower(struct device *dev, unsigned int maskval) | ||
526 | { | ||
527 | gpio_set_value(GPIO_PTB6, maskval ? 1 : 0); | ||
528 | } | ||
529 | |||
530 | static struct mmc_spi_platform_data mmc_spi_info = { | ||
531 | .get_ro = mmc_spi_get_ro, | ||
532 | .get_cd = mmc_spi_get_cd, | ||
533 | .caps = MMC_CAP_NEEDS_POLL, | ||
534 | .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, /* 3.3V only */ | ||
535 | .setpower = mmc_spi_setpower, | ||
536 | }; | ||
537 | |||
538 | static struct spi_board_info spi_bus[] = { | ||
539 | { | ||
540 | .modalias = "mmc_spi", | ||
541 | .platform_data = &mmc_spi_info, | ||
542 | .max_speed_hz = 5000000, | ||
543 | .mode = SPI_MODE_0, | ||
544 | .controller_data = (void *) GPIO_PTM4, | ||
545 | }, | ||
546 | }; | ||
547 | |||
548 | /* MSIOF0 */ | ||
549 | static struct sh_msiof_spi_info msiof0_data = { | ||
550 | .num_chipselect = 1, | ||
551 | }; | ||
552 | |||
553 | static struct resource msiof0_resources[] = { | ||
554 | [0] = { | ||
555 | .name = "MSIOF0", | ||
556 | .start = 0xa4c40000, | ||
557 | .end = 0xa4c40063, | ||
558 | .flags = IORESOURCE_MEM, | ||
559 | }, | ||
560 | [1] = { | ||
561 | .start = 84, | ||
562 | .flags = IORESOURCE_IRQ, | ||
563 | }, | ||
564 | }; | ||
565 | |||
566 | static struct platform_device msiof0_device = { | ||
567 | .name = "spi_sh_msiof", | ||
568 | .id = 0, /* MSIOF0 */ | ||
569 | .dev = { | ||
570 | .platform_data = &msiof0_data, | ||
571 | }, | ||
572 | .num_resources = ARRAY_SIZE(msiof0_resources), | ||
573 | .resource = msiof0_resources, | ||
574 | .archdata = { | ||
575 | .hwblk_id = HWBLK_MSIOF0, | ||
576 | }, | ||
577 | }; | ||
578 | |||
579 | #endif | ||
580 | |||
581 | /* I2C Video/Camera */ | ||
582 | static struct i2c_board_info i2c_camera[] = { | ||
583 | { | ||
584 | I2C_BOARD_INFO("tw9910", 0x45), | ||
585 | }, | ||
586 | { | ||
587 | /* 1st camera */ | ||
588 | I2C_BOARD_INFO("mt9t112", 0x3c), | ||
589 | }, | ||
590 | { | ||
591 | /* 2nd camera */ | ||
592 | I2C_BOARD_INFO("mt9t112", 0x3c), | ||
593 | }, | ||
594 | }; | ||
595 | |||
596 | /* tw9910 */ | ||
597 | static int tw9910_power(struct device *dev, int mode) | ||
598 | { | ||
599 | int val = mode ? 0 : 1; | ||
600 | |||
601 | gpio_set_value(GPIO_PTU2, val); | ||
602 | if (mode) | ||
603 | mdelay(100); | ||
604 | |||
605 | return 0; | ||
606 | } | ||
607 | |||
608 | static struct tw9910_video_info tw9910_info = { | ||
609 | .buswidth = SOCAM_DATAWIDTH_8, | ||
610 | .mpout = TW9910_MPO_FIELD, | ||
611 | }; | ||
612 | |||
613 | static struct soc_camera_link tw9910_link = { | ||
614 | .i2c_adapter_id = 0, | ||
615 | .bus_id = 1, | ||
616 | .power = tw9910_power, | ||
617 | .board_info = &i2c_camera[0], | ||
618 | .module_name = "tw9910", | ||
619 | .priv = &tw9910_info, | ||
620 | }; | ||
621 | |||
622 | /* mt9t112 */ | ||
623 | static int mt9t112_power1(struct device *dev, int mode) | ||
624 | { | ||
625 | gpio_set_value(GPIO_PTA3, mode); | ||
626 | if (mode) | ||
627 | mdelay(100); | ||
628 | |||
629 | return 0; | ||
630 | } | ||
631 | |||
632 | static struct mt9t112_camera_info mt9t112_info1 = { | ||
633 | .flags = MT9T112_FLAG_PCLK_RISING_EDGE | MT9T112_FLAG_DATAWIDTH_8, | ||
634 | .divider = { 0x49, 0x6, 0, 6, 0, 9, 9, 6, 0 }, /* for 24MHz */ | ||
635 | }; | ||
636 | |||
637 | static struct soc_camera_link mt9t112_link1 = { | ||
638 | .i2c_adapter_id = 0, | ||
639 | .power = mt9t112_power1, | ||
640 | .bus_id = 0, | ||
641 | .board_info = &i2c_camera[1], | ||
642 | .module_name = "mt9t112", | ||
643 | .priv = &mt9t112_info1, | ||
644 | }; | ||
645 | |||
646 | static int mt9t112_power2(struct device *dev, int mode) | ||
647 | { | ||
648 | gpio_set_value(GPIO_PTA4, mode); | ||
649 | if (mode) | ||
650 | mdelay(100); | ||
651 | |||
652 | return 0; | ||
653 | } | ||
654 | |||
655 | static struct mt9t112_camera_info mt9t112_info2 = { | ||
656 | .flags = MT9T112_FLAG_PCLK_RISING_EDGE | MT9T112_FLAG_DATAWIDTH_8, | ||
657 | .divider = { 0x49, 0x6, 0, 6, 0, 9, 9, 6, 0 }, /* for 24MHz */ | ||
658 | }; | ||
659 | |||
660 | static struct soc_camera_link mt9t112_link2 = { | ||
661 | .i2c_adapter_id = 1, | ||
662 | .power = mt9t112_power2, | ||
663 | .bus_id = 1, | ||
664 | .board_info = &i2c_camera[2], | ||
665 | .module_name = "mt9t112", | ||
666 | .priv = &mt9t112_info2, | ||
667 | }; | ||
668 | |||
669 | static struct platform_device camera_devices[] = { | ||
670 | { | ||
671 | .name = "soc-camera-pdrv", | ||
672 | .id = 0, | ||
673 | .dev = { | ||
674 | .platform_data = &tw9910_link, | ||
675 | }, | ||
676 | }, | ||
677 | { | ||
678 | .name = "soc-camera-pdrv", | ||
679 | .id = 1, | ||
680 | .dev = { | ||
681 | .platform_data = &mt9t112_link1, | ||
682 | }, | ||
683 | }, | ||
684 | { | ||
685 | .name = "soc-camera-pdrv", | ||
686 | .id = 2, | ||
687 | .dev = { | ||
688 | .platform_data = &mt9t112_link2, | ||
689 | }, | ||
690 | }, | ||
691 | }; | ||
692 | |||
693 | /* FSI */ | ||
694 | /* | ||
695 | * FSI-B use external clock which came from da7210. | ||
696 | * So, we should change parent of fsi | ||
697 | */ | ||
698 | #define FCLKBCR 0xa415000c | ||
699 | static void fsimck_init(struct clk *clk) | ||
700 | { | ||
701 | u32 status = ctrl_inl(clk->enable_reg); | ||
702 | |||
703 | /* use external clock */ | ||
704 | status &= ~0x000000ff; | ||
705 | status |= 0x00000080; | ||
706 | |||
707 | ctrl_outl(status, clk->enable_reg); | ||
708 | } | ||
709 | |||
710 | static struct clk_ops fsimck_clk_ops = { | ||
711 | .init = fsimck_init, | ||
712 | }; | ||
713 | |||
714 | static struct clk fsimckb_clk = { | ||
715 | .name = "fsimckb_clk", | ||
716 | .id = -1, | ||
717 | .ops = &fsimck_clk_ops, | ||
718 | .enable_reg = (void __iomem *)FCLKBCR, | ||
719 | .rate = 0, /* unknown */ | ||
720 | }; | ||
721 | |||
722 | struct sh_fsi_platform_info fsi_info = { | ||
723 | .portb_flags = SH_FSI_BRS_INV | | ||
724 | SH_FSI_OUT_SLAVE_MODE | | ||
725 | SH_FSI_IN_SLAVE_MODE | | ||
726 | SH_FSI_OFMT(I2S) | | ||
727 | SH_FSI_IFMT(I2S), | ||
728 | }; | ||
729 | |||
730 | static struct resource fsi_resources[] = { | ||
731 | [0] = { | ||
732 | .name = "FSI", | ||
733 | .start = 0xFE3C0000, | ||
734 | .end = 0xFE3C021d, | ||
735 | .flags = IORESOURCE_MEM, | ||
736 | }, | ||
737 | [1] = { | ||
738 | .start = 108, | ||
739 | .flags = IORESOURCE_IRQ, | ||
740 | }, | ||
741 | }; | ||
742 | |||
743 | static struct platform_device fsi_device = { | ||
744 | .name = "sh_fsi", | ||
745 | .id = 0, | ||
746 | .num_resources = ARRAY_SIZE(fsi_resources), | ||
747 | .resource = fsi_resources, | ||
748 | .dev = { | ||
749 | .platform_data = &fsi_info, | ||
750 | }, | ||
751 | .archdata = { | ||
752 | .hwblk_id = HWBLK_SPU, /* FSI needs SPU hwblk */ | ||
753 | }, | ||
754 | }; | ||
755 | |||
496 | static struct platform_device *ecovec_devices[] __initdata = { | 756 | static struct platform_device *ecovec_devices[] __initdata = { |
497 | &heartbeat_device, | 757 | &heartbeat_device, |
498 | &nor_flash_device, | 758 | &nor_flash_device, |
@@ -503,8 +763,16 @@ static struct platform_device *ecovec_devices[] __initdata = { | |||
503 | &ceu0_device, | 763 | &ceu0_device, |
504 | &ceu1_device, | 764 | &ceu1_device, |
505 | &keysc_device, | 765 | &keysc_device, |
766 | #ifdef CONFIG_MFD_SH_MOBILE_SDHI | ||
506 | &sdhi0_device, | 767 | &sdhi0_device, |
507 | &sdhi1_device, | 768 | &sdhi1_device, |
769 | #else | ||
770 | &msiof0_device, | ||
771 | #endif | ||
772 | &camera_devices[0], | ||
773 | &camera_devices[1], | ||
774 | &camera_devices[2], | ||
775 | &fsi_device, | ||
508 | }; | 776 | }; |
509 | 777 | ||
510 | #define EEPROM_ADDR 0x50 | 778 | #define EEPROM_ADDR 0x50 |
@@ -560,6 +828,8 @@ extern char ecovec24_sdram_leave_end; | |||
560 | 828 | ||
561 | static int __init arch_setup(void) | 829 | static int __init arch_setup(void) |
562 | { | 830 | { |
831 | struct clk *clk; | ||
832 | |||
563 | /* register board specific self-refresh code */ | 833 | /* register board specific self-refresh code */ |
564 | sh_mobile_register_self_refresh(SUSP_SH_STANDBY | SUSP_SH_SF, | 834 | sh_mobile_register_self_refresh(SUSP_SH_STANDBY | SUSP_SH_SF, |
565 | &ecovec24_sdram_enter_start, | 835 | &ecovec24_sdram_enter_start, |
@@ -773,7 +1043,8 @@ static int __init arch_setup(void) | |||
773 | gpio_direction_input(GPIO_PTR5); | 1043 | gpio_direction_input(GPIO_PTR5); |
774 | gpio_direction_input(GPIO_PTR6); | 1044 | gpio_direction_input(GPIO_PTR6); |
775 | 1045 | ||
776 | /* enable SDHI0 (needs DS2.4 set to ON) */ | 1046 | #ifdef CONFIG_MFD_SH_MOBILE_SDHI |
1047 | /* enable SDHI0 on CN11 (needs DS2.4 set to ON) */ | ||
777 | gpio_request(GPIO_FN_SDHI0CD, NULL); | 1048 | gpio_request(GPIO_FN_SDHI0CD, NULL); |
778 | gpio_request(GPIO_FN_SDHI0WP, NULL); | 1049 | gpio_request(GPIO_FN_SDHI0WP, NULL); |
779 | gpio_request(GPIO_FN_SDHI0CMD, NULL); | 1050 | gpio_request(GPIO_FN_SDHI0CMD, NULL); |
@@ -785,7 +1056,7 @@ static int __init arch_setup(void) | |||
785 | gpio_request(GPIO_PTB6, NULL); | 1056 | gpio_request(GPIO_PTB6, NULL); |
786 | gpio_direction_output(GPIO_PTB6, 0); | 1057 | gpio_direction_output(GPIO_PTB6, 0); |
787 | 1058 | ||
788 | /* enable SDHI1 (needs DS2.6,7 set to ON,OFF) */ | 1059 | /* enable SDHI1 on CN12 (needs DS2.6,7 set to ON,OFF) */ |
789 | gpio_request(GPIO_FN_SDHI1CD, NULL); | 1060 | gpio_request(GPIO_FN_SDHI1CD, NULL); |
790 | gpio_request(GPIO_FN_SDHI1WP, NULL); | 1061 | gpio_request(GPIO_FN_SDHI1WP, NULL); |
791 | gpio_request(GPIO_FN_SDHI1CMD, NULL); | 1062 | gpio_request(GPIO_FN_SDHI1CMD, NULL); |
@@ -799,8 +1070,63 @@ static int __init arch_setup(void) | |||
799 | 1070 | ||
800 | /* I/O buffer drive ability is high for SDHI1 */ | 1071 | /* I/O buffer drive ability is high for SDHI1 */ |
801 | ctrl_outw((ctrl_inw(IODRIVEA) & ~0x3000) | 0x2000 , IODRIVEA); | 1072 | ctrl_outw((ctrl_inw(IODRIVEA) & ~0x3000) | 0x2000 , IODRIVEA); |
1073 | #else | ||
1074 | /* enable MSIOF0 on CN11 (needs DS2.4 set to OFF) */ | ||
1075 | gpio_request(GPIO_FN_MSIOF0_TXD, NULL); | ||
1076 | gpio_request(GPIO_FN_MSIOF0_RXD, NULL); | ||
1077 | gpio_request(GPIO_FN_MSIOF0_TSCK, NULL); | ||
1078 | gpio_request(GPIO_PTM4, NULL); /* software CS control of TSYNC pin */ | ||
1079 | gpio_direction_output(GPIO_PTM4, 1); /* active low CS */ | ||
1080 | gpio_request(GPIO_PTB6, NULL); /* 3.3V power control */ | ||
1081 | gpio_direction_output(GPIO_PTB6, 0); /* disable power by default */ | ||
1082 | gpio_request(GPIO_PTY6, NULL); /* write protect */ | ||
1083 | gpio_direction_input(GPIO_PTY6); | ||
1084 | gpio_request(GPIO_PTY7, NULL); /* card detect */ | ||
1085 | gpio_direction_input(GPIO_PTY7); | ||
1086 | |||
1087 | spi_register_board_info(spi_bus, ARRAY_SIZE(spi_bus)); | ||
1088 | #endif | ||
1089 | |||
1090 | /* enable Video */ | ||
1091 | gpio_request(GPIO_PTU2, NULL); | ||
1092 | gpio_direction_output(GPIO_PTU2, 1); | ||
1093 | |||
1094 | /* enable Camera */ | ||
1095 | gpio_request(GPIO_PTA3, NULL); | ||
1096 | gpio_request(GPIO_PTA4, NULL); | ||
1097 | gpio_direction_output(GPIO_PTA3, 0); | ||
1098 | gpio_direction_output(GPIO_PTA4, 0); | ||
1099 | |||
1100 | /* enable FSI */ | ||
1101 | gpio_request(GPIO_FN_FSIMCKB, NULL); | ||
1102 | gpio_request(GPIO_FN_FSIIBSD, NULL); | ||
1103 | gpio_request(GPIO_FN_FSIOBSD, NULL); | ||
1104 | gpio_request(GPIO_FN_FSIIBBCK, NULL); | ||
1105 | gpio_request(GPIO_FN_FSIIBLRCK, NULL); | ||
1106 | gpio_request(GPIO_FN_FSIOBBCK, NULL); | ||
1107 | gpio_request(GPIO_FN_FSIOBLRCK, NULL); | ||
1108 | gpio_request(GPIO_FN_CLKAUDIOBO, NULL); | ||
1109 | |||
1110 | /* change parent of FSI B */ | ||
1111 | clk = clk_get(NULL, "fsib_clk"); | ||
1112 | clk_register(&fsimckb_clk); | ||
1113 | clk_set_parent(clk, &fsimckb_clk); | ||
1114 | clk_set_rate(clk, 11000); | ||
1115 | clk_set_rate(&fsimckb_clk, 11000); | ||
1116 | clk_put(clk); | ||
1117 | |||
1118 | gpio_request(GPIO_PTU0, NULL); | ||
1119 | gpio_direction_output(GPIO_PTU0, 0); | ||
1120 | mdelay(20); | ||
1121 | |||
1122 | /* enable motion sensor */ | ||
1123 | gpio_request(GPIO_FN_INTC_IRQ1, NULL); | ||
1124 | gpio_direction_input(GPIO_FN_INTC_IRQ1); | ||
802 | 1125 | ||
803 | /* enable I2C device */ | 1126 | /* enable I2C device */ |
1127 | i2c_register_board_info(0, i2c0_devices, | ||
1128 | ARRAY_SIZE(i2c0_devices)); | ||
1129 | |||
804 | i2c_register_board_info(1, i2c1_devices, | 1130 | i2c_register_board_info(1, i2c1_devices, |
805 | ARRAY_SIZE(i2c1_devices)); | 1131 | ARRAY_SIZE(i2c1_devices)); |
806 | 1132 | ||
diff --git a/arch/sh/boards/mach-kfr2r09/lcd_wqvga.c b/arch/sh/boards/mach-kfr2r09/lcd_wqvga.c index 8ccb1cc8b589..e9b970846c41 100644 --- a/arch/sh/boards/mach-kfr2r09/lcd_wqvga.c +++ b/arch/sh/boards/mach-kfr2r09/lcd_wqvga.c | |||
@@ -273,6 +273,12 @@ int kfr2r09_lcd_setup(void *board_data, void *sohandle, | |||
273 | return 0; | 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 | #define CTRL_CKSW 0x10 | 282 | #define CTRL_CKSW 0x10 |
277 | #define CTRL_C10 0x20 | 283 | #define CTRL_C10 0x20 |
278 | #define CTRL_CPSW 0x80 | 284 | #define CTRL_CPSW 0x80 |
diff --git a/arch/sh/boards/mach-kfr2r09/setup.c b/arch/sh/boards/mach-kfr2r09/setup.c index 9038d768a525..5d7b5d92475e 100644 --- a/arch/sh/boards/mach-kfr2r09/setup.c +++ b/arch/sh/boards/mach-kfr2r09/setup.c | |||
@@ -150,6 +150,7 @@ static struct sh_mobile_lcdc_info kfr2r09_sh_lcdc_info = { | |||
150 | }, | 150 | }, |
151 | .board_cfg = { | 151 | .board_cfg = { |
152 | .setup_sys = kfr2r09_lcd_setup, | 152 | .setup_sys = kfr2r09_lcd_setup, |
153 | .start_transfer = kfr2r09_lcd_start, | ||
153 | .display_on = kfr2r09_lcd_on, | 154 | .display_on = kfr2r09_lcd_on, |
154 | .display_off = kfr2r09_lcd_off, | 155 | .display_off = kfr2r09_lcd_off, |
155 | }, | 156 | }, |
diff --git a/arch/sh/boards/mach-se/7722/irq.c b/arch/sh/boards/mach-se/7722/irq.c index 4eb31acfafef..b221b6842b0d 100644 --- a/arch/sh/boards/mach-se/7722/irq.c +++ b/arch/sh/boards/mach-se/7722/irq.c | |||
@@ -57,15 +57,16 @@ static void se7722_irq_demux(unsigned int irq, struct irq_desc *desc) | |||
57 | */ | 57 | */ |
58 | void __init init_se7722_IRQ(void) | 58 | void __init init_se7722_IRQ(void) |
59 | { | 59 | { |
60 | int i; | 60 | int i, irq; |
61 | 61 | ||
62 | ctrl_outw(0, IRQ01_MASK); /* disable all irqs */ | 62 | ctrl_outw(0, IRQ01_MASK); /* disable all irqs */ |
63 | ctrl_outw(0x2000, 0xb03fffec); /* mrshpc irq enable */ | 63 | ctrl_outw(0x2000, 0xb03fffec); /* mrshpc irq enable */ |
64 | 64 | ||
65 | for (i = 0; i < SE7722_FPGA_IRQ_NR; i++) { | 65 | for (i = 0; i < SE7722_FPGA_IRQ_NR; i++) { |
66 | se7722_fpga_irq[i] = create_irq(); | 66 | irq = create_irq(); |
67 | if (se7722_fpga_irq[i] < 0) | 67 | if (irq < 0) |
68 | return; | 68 | return; |
69 | se7722_fpga_irq[i] = irq; | ||
69 | 70 | ||
70 | set_irq_chip_and_handler_name(se7722_fpga_irq[i], | 71 | set_irq_chip_and_handler_name(se7722_fpga_irq[i], |
71 | &se7722_irq_chip, | 72 | &se7722_irq_chip, |
diff --git a/arch/sh/boards/mach-se/7724/setup.c b/arch/sh/boards/mach-se/7724/setup.c index 4b0f0c0dc2b8..858ecb25d469 100644 --- a/arch/sh/boards/mach-se/7724/setup.c +++ b/arch/sh/boards/mach-se/7724/setup.c | |||
@@ -514,6 +514,13 @@ static struct platform_device *ms7724se_devices[] __initdata = { | |||
514 | &sdhi1_cn8_device, | 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 | #define EEPROM_OP 0xBA206000 | 524 | #define EEPROM_OP 0xBA206000 |
518 | #define EEPROM_ADR 0xBA206004 | 525 | #define EEPROM_ADR 0xBA206004 |
519 | #define EEPROM_DATA 0xBA20600C | 526 | #define EEPROM_DATA 0xBA20600C |
@@ -526,7 +533,7 @@ static int __init sh_eth_is_eeprom_ready(void) | |||
526 | while (t--) { | 533 | while (t--) { |
527 | if (!ctrl_inw(EEPROM_STAT)) | 534 | if (!ctrl_inw(EEPROM_STAT)) |
528 | return 1; | 535 | return 1; |
529 | cpu_relax(); | 536 | udelay(1); |
530 | } | 537 | } |
531 | 538 | ||
532 | printk(KERN_ERR "ms7724se can not access to eeprom\n"); | 539 | printk(KERN_ERR "ms7724se can not access to eeprom\n"); |
@@ -575,6 +582,16 @@ extern char ms7724se_sdram_enter_end; | |||
575 | extern char ms7724se_sdram_leave_start; | 582 | extern char ms7724se_sdram_leave_start; |
576 | extern char ms7724se_sdram_leave_end; | 583 | extern char ms7724se_sdram_leave_end; |
577 | 584 | ||
585 | |||
586 | static int __init arch_setup(void) | ||
587 | { | ||
588 | /* enable I2C device */ | ||
589 | i2c_register_board_info(0, i2c0_devices, | ||
590 | ARRAY_SIZE(i2c0_devices)); | ||
591 | return 0; | ||
592 | } | ||
593 | arch_initcall(arch_setup); | ||
594 | |||
578 | static int __init devices_setup(void) | 595 | static int __init devices_setup(void) |
579 | { | 596 | { |
580 | u16 sw = ctrl_inw(SW4140); /* select camera, monitor */ | 597 | u16 sw = ctrl_inw(SW4140); /* select camera, monitor */ |