25 #include <linux/kernel.h>
26 #include <linux/input.h>
34 #include <linux/videodev2.h>
41 #include <mach/common.h>
42 #include <mach/irqs.h>
140 #define IRQ7 evt2irq(0x02e0)
141 #define USBCR1 IOMEM(0xe605810a)
142 #define USBH 0xC6700000
143 #define USBH_USBCTR 0x10834
155 #define usbhsf_get_priv(pdev) \
156 container_of(renesas_usbhs_get_info(pdev), \
157 struct usbhsf_private, info)
238 if (!IS_ERR(priv->
phy))
240 if (!IS_ERR(priv->
usb24))
242 if (!IS_ERR(priv->
pci))
244 if (!IS_ERR(priv->
host))
246 if (!IS_ERR(priv->
func))
273 if (IS_ERR(priv->
phy) ||
274 IS_ERR(priv->
usb24) ||
276 IS_ERR(priv->
host) ||
277 IS_ERR(priv->
func) ||
279 dev_err(&pdev->
dev,
"USB clock setting failed\n");
280 usbhsf_hardware_exit(pdev);
285 dev_name(&pdev->
dev), pdev);
301 .platform_callback = {
302 .get_id = usbhsf_get_id,
303 .get_vbus = usbhsf_get_vbus,
304 .hardware_init = usbhsf_hardware_init,
305 .hardware_exit = usbhsf_hardware_exit,
306 .power_ctrl = usbhsf_power_ctrl,
310 .detection_delay = 5,
317 static struct resource usbhsf_resources[] = {
321 .end = 0xe6890104 - 1,
331 .name =
"renesas_usbhs",
333 .platform_data = &usbhsf_private.
info,
336 .num_resources =
ARRAY_SIZE(usbhsf_resources),
337 .resource = usbhsf_resources,
348 static struct resource sh_eth_resources[] = {
351 .end = 0xe9a00800 - 1,
355 .end = 0xe9a02000 - 1,
367 .platform_data = &sh_eth_platdata,
369 .resource = sh_eth_resources,
370 .num_resources =
ARRAY_SIZE(sh_eth_resources),
375 .name =
"AMPIER/AM-800480",
392 .interface_type =
RGB24,
395 .lcd_modes = &lcdc0_mode,
404 static struct resource lcdc0_resources[] = {
418 .name =
"sh_mobile_lcdc_fb",
420 .resource = lcdc0_resources,
423 .platform_data = &lcdc0_info,
424 .coherent_dma_mask = ~0,
451 .name =
"HDMI emma3pf",
459 .name =
"sh-mobile-hdmi",
461 .resource = hdmi_resources,
464 .platform_data = &hdmi_info,
488 .interface_type =
RGB24,
491 .lcd_modes = &lcdc1_mode,
493 .tx_dev = &hdmi_device,
501 static struct resource hdmi_lcdc_resources[] = {
505 .end = 0xfe948000 - 1,
515 .name =
"sh_mobile_lcdc_fb",
516 .num_resources =
ARRAY_SIZE(hdmi_lcdc_resources),
517 .resource = hdmi_lcdc_resources,
520 .platform_data = &hdmi_lcdc_info,
521 .coherent_dma_mask = ~0,
526 #define GPIO_KEY(c, g, d, ...) \
527 { .code = c, .gpio = g, .desc = d, .active_low = 1, __VA_ARGS__ }
537 .buttons = gpio_buttons,
545 .platform_data = &gpio_key_info,
569 #define IRQ31 evt2irq(0x33E0)
579 static struct resource sdhi0_resources[] = {
583 .end = 0xe6850100 - 1,
602 .name =
"sh_mobile_sdhi",
605 .platform_data = &sdhi0_info,
608 .resource = sdhi0_resources,
620 static struct resource sdhi1_resources[] = {
624 .end = 0xe6860100 - 1,
642 .name =
"sh_mobile_sdhi",
645 .platform_data = &sdhi1_info,
648 .resource = sdhi1_resources,
660 static struct resource sh_mmcif_resources[] = {
664 .end = 0xe6bd0100 - 1,
683 .platform_data = &sh_mmcif_plat,
685 .num_resources =
ARRAY_SIZE(sh_mmcif_resources),
686 .resource = sh_mmcif_resources,
695 dev_err(dev,
"can't get video1 clock\n");
719 .divider = { 16, 0, 0, 7, 0, 10, 14, 7, 7 },
725 .board_info = &i2c_camera_mt9t111,
726 .power = mt9t111_power,
727 .priv = &mt9t111_info,
731 .name =
"soc-camera-pdrv",
734 .platform_data = &mt9t111_link,
743 static struct resource ceu0_resources[] = {
760 .name =
"sh_mobile_ceu",
763 .resource = ceu0_resources,
765 .platform_data = &sh_mobile_ceu0_info,
766 .coherent_dma_mask = 0xffffffff,
771 static int fsi_hdmi_set_rate(
struct device *dev,
int rate,
int enable)
806 .set_rate = fsi_hdmi_set_rate,
811 static struct resource fsi_resources[] = {
815 .end = 0xfe1f8400 - 1,
828 .resource = fsi_resources,
830 .platform_data = &fsi_info,
844 .card =
"FSI2A-WM8978",
845 .cpu_dai =
"fsia-dai",
846 .codec =
"wm8978.0-001a",
847 .platform =
"sh_fsi2",
848 .codec_dai =
"wm8978-hifi",
849 .init = &fsi_wm8978_init_info,
853 .name =
"asoc-simple-card",
856 .platform_data = &fsi_wm8978_info,
867 .card =
"FSI2B-HDMI",
868 .cpu_dai =
"fsib-dai",
869 .codec =
"sh-mobile-hdmi",
870 .platform =
"sh_fsi2",
871 .codec_dai =
"sh_mobile_hdmi-hifi",
872 .init = &fsi2_hdmi_init_info,
876 .name =
"asoc-simple-card",
879 .platform_data = &fsi2_hdmi_info,
894 .platform_data = &i2c_gpio_data,
935 static void __init eva_clock_init(
void)
943 if (IS_ERR(system) ||
948 pr_err(
"armadillo800eva board clock init failed\n");
979 #define GPIO_PORT7CR IOMEM(0xe6050007)
980 #define GPIO_PORT8CR IOMEM(0xe6050008)
981 static void __init eva_init(
void)
986 ARRAY_SIZE(fixed3v3_power_consumers), 3300000);
1082 usb = &usbhsf_device;
1197 #ifdef CONFIG_CACHE_L2X0
1218 static void __init eva_earlytimer_init(
void)
1224 static void __init eva_add_early_devices(
void)
1232 static const char *eva_boards_compat_dt[] __initdata = {
1233 "renesas,armadillo800eva",
1239 .init_early = eva_add_early_devices,
1242 .init_machine = eva_init,
1243 .init_late = shmobile_init_late,
1245 .dt_compat = eva_boards_compat_dt,