Loading arch/arm/mach-omap1/board-ams-delta.c +69 −0 Original line number Diff line number Diff line Loading @@ -16,9 +16,12 @@ #include <linux/init.h> #include <linux/input.h> #include <linux/interrupt.h> #include <linux/leds.h> #include <linux/platform_device.h> #include <linux/serial_8250.h> #include <media/soc_camera.h> #include <asm/serial.h> #include <mach/hardware.h> #include <asm/mach-types.h> Loading @@ -32,6 +35,7 @@ #include <plat/usb.h> #include <plat/board.h> #include <plat/common.h> #include <mach/camera.h> #include <mach/ams-delta-fiq.h> Loading Loading @@ -213,10 +217,56 @@ static struct platform_device ams_delta_led_device = { .id = -1 }; static struct i2c_board_info ams_delta_camera_board_info[] = { { I2C_BOARD_INFO("ov6650", 0x60), }, }; #ifdef CONFIG_LEDS_TRIGGERS DEFINE_LED_TRIGGER(ams_delta_camera_led_trigger); static int ams_delta_camera_power(struct device *dev, int power) { /* * turn on camera LED */ if (power) led_trigger_event(ams_delta_camera_led_trigger, LED_FULL); else led_trigger_event(ams_delta_camera_led_trigger, LED_OFF); return 0; } #else #define ams_delta_camera_power NULL #endif static struct soc_camera_link __initdata ams_delta_iclink = { .bus_id = 0, /* OMAP1 SoC camera bus */ .i2c_adapter_id = 1, .board_info = &ams_delta_camera_board_info[0], .module_name = "ov6650", .power = ams_delta_camera_power, }; static struct platform_device ams_delta_camera_device = { .name = "soc-camera-pdrv", .id = 0, .dev = { .platform_data = &ams_delta_iclink, }, }; static struct omap1_cam_platform_data ams_delta_camera_platform_data = { .camexclk_khz = 12000, /* default 12MHz clock, no extra DPLL */ .lclk_khz_max = 1334, /* results in 5fps CIF, 10fps QCIF */ }; static struct platform_device *ams_delta_devices[] __initdata = { &ams_delta_kp_device, &ams_delta_lcd_device, &ams_delta_led_device, &ams_delta_camera_device, }; static void __init ams_delta_init(void) Loading @@ -225,6 +275,20 @@ static void __init ams_delta_init(void) omap_cfg_reg(UART1_TX); omap_cfg_reg(UART1_RTS); /* parallel camera interface */ omap_cfg_reg(H19_1610_CAM_EXCLK); omap_cfg_reg(J15_1610_CAM_LCLK); omap_cfg_reg(L18_1610_CAM_VS); omap_cfg_reg(L15_1610_CAM_HS); omap_cfg_reg(L19_1610_CAM_D0); omap_cfg_reg(K14_1610_CAM_D1); omap_cfg_reg(K15_1610_CAM_D2); omap_cfg_reg(K19_1610_CAM_D3); omap_cfg_reg(K18_1610_CAM_D4); omap_cfg_reg(J14_1610_CAM_D5); omap_cfg_reg(J19_1610_CAM_D6); omap_cfg_reg(J18_1610_CAM_D7); iotable_init(ams_delta_io_desc, ARRAY_SIZE(ams_delta_io_desc)); omap_board_config = ams_delta_config; Loading @@ -236,6 +300,11 @@ static void __init ams_delta_init(void) ams_delta_latch2_write(~0, 0); omap1_usb_init(&ams_delta_usb_config); omap1_set_camera_info(&ams_delta_camera_platform_data); #ifdef CONFIG_LEDS_TRIGGERS led_trigger_register_simple("ams_delta_camera", &ams_delta_camera_led_trigger); #endif platform_add_devices(ams_delta_devices, ARRAY_SIZE(ams_delta_devices)); #ifdef CONFIG_AMS_DELTA_FIQ Loading arch/arm/mach-omap1/devices.c +43 −0 Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ * (at your option) any later version. */ #include <linux/dma-mapping.h> #include <linux/module.h> #include <linux/kernel.h> #include <linux/init.h> Loading Loading @@ -191,6 +192,48 @@ static inline void omap_init_spi100k(void) } #endif #define OMAP1_CAMERA_BASE 0xfffb6800 #define OMAP1_CAMERA_IOSIZE 0x1c static struct resource omap1_camera_resources[] = { [0] = { .start = OMAP1_CAMERA_BASE, .end = OMAP1_CAMERA_BASE + OMAP1_CAMERA_IOSIZE - 1, .flags = IORESOURCE_MEM, }, [1] = { .start = INT_CAMERA, .flags = IORESOURCE_IRQ, }, }; static u64 omap1_camera_dma_mask = DMA_BIT_MASK(32); static struct platform_device omap1_camera_device = { .name = "omap1-camera", .id = 0, /* This is used to put cameras on this interface */ .dev = { .dma_mask = &omap1_camera_dma_mask, .coherent_dma_mask = DMA_BIT_MASK(32), }, .num_resources = ARRAY_SIZE(omap1_camera_resources), .resource = omap1_camera_resources, }; void __init omap1_camera_init(void *info) { struct platform_device *dev = &omap1_camera_device; int ret; dev->dev.platform_data = info; ret = platform_device_register(dev); if (ret) dev_err(&dev->dev, "unable to register device: %d\n", ret); } /*-------------------------------------------------------------------------*/ static inline void omap_init_sti(void) {} Loading arch/arm/mach-omap1/include/mach/camera.h 0 → 100644 +11 −0 Original line number Diff line number Diff line #ifndef __ASM_ARCH_CAMERA_H_ #define __ASM_ARCH_CAMERA_H_ void omap1_camera_init(void *); static inline void omap1_set_camera_info(struct omap1_cam_platform_data *info) { omap1_camera_init(info); } #endif /* __ASM_ARCH_CAMERA_H_ */ arch/arm/mach-omap2/board-4430sdp.c +8 −1 Original line number Diff line number Diff line Loading @@ -243,6 +243,7 @@ static struct omap2_hsmmc_info mmc[] = { .gpio_cd = -EINVAL, .gpio_wp = -EINVAL, .nonremovable = true, .ocr_mask = MMC_VDD_29_30, }, {} /* Terminator */ }; Loading Loading @@ -276,8 +277,14 @@ static int omap4_twl6030_hsmmc_late_init(struct device *dev) static __init void omap4_twl6030_hsmmc_set_late_init(struct device *dev) { struct omap_mmc_platform_data *pdata = dev->platform_data; struct omap_mmc_platform_data *pdata; /* dev can be null if CONFIG_MMC_OMAP_HS is not set */ if (!dev) { pr_err("Failed %s\n", __func__); return; } pdata = dev->platform_data; pdata->init = omap4_twl6030_hsmmc_late_init; } Loading arch/arm/mach-omap2/board-omap3pandora.c +35 −11 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ #include <linux/gpio_keys.h> #include <linux/mmc/host.h> #include <linux/mmc/card.h> #include <linux/regulator/fixed.h> #include <asm/mach-types.h> #include <asm/mach/arch.h> Loading Loading @@ -345,6 +346,9 @@ static struct regulator_consumer_supply pandora_vmmc1_supply = static struct regulator_consumer_supply pandora_vmmc2_supply = REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1"); static struct regulator_consumer_supply pandora_vmmc3_supply = REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.2"); static struct regulator_consumer_supply pandora_vdda_dac_supply = REGULATOR_SUPPLY("vdda_dac", "omapdss"); Loading Loading @@ -489,6 +493,33 @@ static struct regulator_init_data pandora_vsim = { .consumer_supplies = &pandora_adac_supply, }; /* Fixed regulator internal to Wifi module */ static struct regulator_init_data pandora_vmmc3 = { .constraints = { .valid_ops_mask = REGULATOR_CHANGE_STATUS, }, .num_consumer_supplies = 1, .consumer_supplies = &pandora_vmmc3_supply, }; static struct fixed_voltage_config pandora_vwlan = { .supply_name = "vwlan", .microvolts = 1800000, /* 1.8V */ .gpio = PANDORA_WIFI_NRESET_GPIO, .startup_delay = 50000, /* 50ms */ .enable_high = 1, .enabled_at_boot = 0, .init_data = &pandora_vmmc3, }; static struct platform_device pandora_vwlan_device = { .name = "reg-fixed-voltage", .id = 1, .dev = { .platform_data = &pandora_vwlan, }, }; static struct twl4030_usb_data omap3pandora_usb_data = { .usb_mode = T2_USB_MODE_ULPI, }; Loading @@ -502,6 +533,8 @@ static struct twl4030_codec_data omap3pandora_codec_data = { .audio = &omap3pandora_audio_data, }; static struct twl4030_bci_platform_data pandora_bci_data; static struct twl4030_platform_data omap3pandora_twldata = { .irq_base = TWL4030_IRQ_BASE, .irq_end = TWL4030_IRQ_END, Loading @@ -517,6 +550,7 @@ static struct twl4030_platform_data omap3pandora_twldata = { .vaux4 = &pandora_vaux4, .vsim = &pandora_vsim, .keypad = &pandora_kp_data, .bci = &pandora_bci_data, }; static struct i2c_board_info __initdata omap3pandora_i2c_boardinfo[] = { Loading Loading @@ -645,19 +679,8 @@ static void pandora_wl1251_init(void) if (pandora_wl1251_pdata.irq < 0) goto fail_irq; ret = gpio_request(PANDORA_WIFI_NRESET_GPIO, "wl1251 nreset"); if (ret < 0) goto fail_irq; /* start powered so that it probes with MMC subsystem */ ret = gpio_direction_output(PANDORA_WIFI_NRESET_GPIO, 1); if (ret < 0) goto fail_nreset; return; fail_nreset: gpio_free(PANDORA_WIFI_NRESET_GPIO); fail_irq: gpio_free(PANDORA_WIFI_IRQ_GPIO); fail: Loading @@ -669,6 +692,7 @@ static struct platform_device *omap3pandora_devices[] __initdata = { &pandora_keys_gpio, &pandora_dss_device, &pandora_wl1251_data, &pandora_vwlan_device, }; static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { Loading Loading
arch/arm/mach-omap1/board-ams-delta.c +69 −0 Original line number Diff line number Diff line Loading @@ -16,9 +16,12 @@ #include <linux/init.h> #include <linux/input.h> #include <linux/interrupt.h> #include <linux/leds.h> #include <linux/platform_device.h> #include <linux/serial_8250.h> #include <media/soc_camera.h> #include <asm/serial.h> #include <mach/hardware.h> #include <asm/mach-types.h> Loading @@ -32,6 +35,7 @@ #include <plat/usb.h> #include <plat/board.h> #include <plat/common.h> #include <mach/camera.h> #include <mach/ams-delta-fiq.h> Loading Loading @@ -213,10 +217,56 @@ static struct platform_device ams_delta_led_device = { .id = -1 }; static struct i2c_board_info ams_delta_camera_board_info[] = { { I2C_BOARD_INFO("ov6650", 0x60), }, }; #ifdef CONFIG_LEDS_TRIGGERS DEFINE_LED_TRIGGER(ams_delta_camera_led_trigger); static int ams_delta_camera_power(struct device *dev, int power) { /* * turn on camera LED */ if (power) led_trigger_event(ams_delta_camera_led_trigger, LED_FULL); else led_trigger_event(ams_delta_camera_led_trigger, LED_OFF); return 0; } #else #define ams_delta_camera_power NULL #endif static struct soc_camera_link __initdata ams_delta_iclink = { .bus_id = 0, /* OMAP1 SoC camera bus */ .i2c_adapter_id = 1, .board_info = &ams_delta_camera_board_info[0], .module_name = "ov6650", .power = ams_delta_camera_power, }; static struct platform_device ams_delta_camera_device = { .name = "soc-camera-pdrv", .id = 0, .dev = { .platform_data = &ams_delta_iclink, }, }; static struct omap1_cam_platform_data ams_delta_camera_platform_data = { .camexclk_khz = 12000, /* default 12MHz clock, no extra DPLL */ .lclk_khz_max = 1334, /* results in 5fps CIF, 10fps QCIF */ }; static struct platform_device *ams_delta_devices[] __initdata = { &ams_delta_kp_device, &ams_delta_lcd_device, &ams_delta_led_device, &ams_delta_camera_device, }; static void __init ams_delta_init(void) Loading @@ -225,6 +275,20 @@ static void __init ams_delta_init(void) omap_cfg_reg(UART1_TX); omap_cfg_reg(UART1_RTS); /* parallel camera interface */ omap_cfg_reg(H19_1610_CAM_EXCLK); omap_cfg_reg(J15_1610_CAM_LCLK); omap_cfg_reg(L18_1610_CAM_VS); omap_cfg_reg(L15_1610_CAM_HS); omap_cfg_reg(L19_1610_CAM_D0); omap_cfg_reg(K14_1610_CAM_D1); omap_cfg_reg(K15_1610_CAM_D2); omap_cfg_reg(K19_1610_CAM_D3); omap_cfg_reg(K18_1610_CAM_D4); omap_cfg_reg(J14_1610_CAM_D5); omap_cfg_reg(J19_1610_CAM_D6); omap_cfg_reg(J18_1610_CAM_D7); iotable_init(ams_delta_io_desc, ARRAY_SIZE(ams_delta_io_desc)); omap_board_config = ams_delta_config; Loading @@ -236,6 +300,11 @@ static void __init ams_delta_init(void) ams_delta_latch2_write(~0, 0); omap1_usb_init(&ams_delta_usb_config); omap1_set_camera_info(&ams_delta_camera_platform_data); #ifdef CONFIG_LEDS_TRIGGERS led_trigger_register_simple("ams_delta_camera", &ams_delta_camera_led_trigger); #endif platform_add_devices(ams_delta_devices, ARRAY_SIZE(ams_delta_devices)); #ifdef CONFIG_AMS_DELTA_FIQ Loading
arch/arm/mach-omap1/devices.c +43 −0 Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ * (at your option) any later version. */ #include <linux/dma-mapping.h> #include <linux/module.h> #include <linux/kernel.h> #include <linux/init.h> Loading Loading @@ -191,6 +192,48 @@ static inline void omap_init_spi100k(void) } #endif #define OMAP1_CAMERA_BASE 0xfffb6800 #define OMAP1_CAMERA_IOSIZE 0x1c static struct resource omap1_camera_resources[] = { [0] = { .start = OMAP1_CAMERA_BASE, .end = OMAP1_CAMERA_BASE + OMAP1_CAMERA_IOSIZE - 1, .flags = IORESOURCE_MEM, }, [1] = { .start = INT_CAMERA, .flags = IORESOURCE_IRQ, }, }; static u64 omap1_camera_dma_mask = DMA_BIT_MASK(32); static struct platform_device omap1_camera_device = { .name = "omap1-camera", .id = 0, /* This is used to put cameras on this interface */ .dev = { .dma_mask = &omap1_camera_dma_mask, .coherent_dma_mask = DMA_BIT_MASK(32), }, .num_resources = ARRAY_SIZE(omap1_camera_resources), .resource = omap1_camera_resources, }; void __init omap1_camera_init(void *info) { struct platform_device *dev = &omap1_camera_device; int ret; dev->dev.platform_data = info; ret = platform_device_register(dev); if (ret) dev_err(&dev->dev, "unable to register device: %d\n", ret); } /*-------------------------------------------------------------------------*/ static inline void omap_init_sti(void) {} Loading
arch/arm/mach-omap1/include/mach/camera.h 0 → 100644 +11 −0 Original line number Diff line number Diff line #ifndef __ASM_ARCH_CAMERA_H_ #define __ASM_ARCH_CAMERA_H_ void omap1_camera_init(void *); static inline void omap1_set_camera_info(struct omap1_cam_platform_data *info) { omap1_camera_init(info); } #endif /* __ASM_ARCH_CAMERA_H_ */
arch/arm/mach-omap2/board-4430sdp.c +8 −1 Original line number Diff line number Diff line Loading @@ -243,6 +243,7 @@ static struct omap2_hsmmc_info mmc[] = { .gpio_cd = -EINVAL, .gpio_wp = -EINVAL, .nonremovable = true, .ocr_mask = MMC_VDD_29_30, }, {} /* Terminator */ }; Loading Loading @@ -276,8 +277,14 @@ static int omap4_twl6030_hsmmc_late_init(struct device *dev) static __init void omap4_twl6030_hsmmc_set_late_init(struct device *dev) { struct omap_mmc_platform_data *pdata = dev->platform_data; struct omap_mmc_platform_data *pdata; /* dev can be null if CONFIG_MMC_OMAP_HS is not set */ if (!dev) { pr_err("Failed %s\n", __func__); return; } pdata = dev->platform_data; pdata->init = omap4_twl6030_hsmmc_late_init; } Loading
arch/arm/mach-omap2/board-omap3pandora.c +35 −11 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ #include <linux/gpio_keys.h> #include <linux/mmc/host.h> #include <linux/mmc/card.h> #include <linux/regulator/fixed.h> #include <asm/mach-types.h> #include <asm/mach/arch.h> Loading Loading @@ -345,6 +346,9 @@ static struct regulator_consumer_supply pandora_vmmc1_supply = static struct regulator_consumer_supply pandora_vmmc2_supply = REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1"); static struct regulator_consumer_supply pandora_vmmc3_supply = REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.2"); static struct regulator_consumer_supply pandora_vdda_dac_supply = REGULATOR_SUPPLY("vdda_dac", "omapdss"); Loading Loading @@ -489,6 +493,33 @@ static struct regulator_init_data pandora_vsim = { .consumer_supplies = &pandora_adac_supply, }; /* Fixed regulator internal to Wifi module */ static struct regulator_init_data pandora_vmmc3 = { .constraints = { .valid_ops_mask = REGULATOR_CHANGE_STATUS, }, .num_consumer_supplies = 1, .consumer_supplies = &pandora_vmmc3_supply, }; static struct fixed_voltage_config pandora_vwlan = { .supply_name = "vwlan", .microvolts = 1800000, /* 1.8V */ .gpio = PANDORA_WIFI_NRESET_GPIO, .startup_delay = 50000, /* 50ms */ .enable_high = 1, .enabled_at_boot = 0, .init_data = &pandora_vmmc3, }; static struct platform_device pandora_vwlan_device = { .name = "reg-fixed-voltage", .id = 1, .dev = { .platform_data = &pandora_vwlan, }, }; static struct twl4030_usb_data omap3pandora_usb_data = { .usb_mode = T2_USB_MODE_ULPI, }; Loading @@ -502,6 +533,8 @@ static struct twl4030_codec_data omap3pandora_codec_data = { .audio = &omap3pandora_audio_data, }; static struct twl4030_bci_platform_data pandora_bci_data; static struct twl4030_platform_data omap3pandora_twldata = { .irq_base = TWL4030_IRQ_BASE, .irq_end = TWL4030_IRQ_END, Loading @@ -517,6 +550,7 @@ static struct twl4030_platform_data omap3pandora_twldata = { .vaux4 = &pandora_vaux4, .vsim = &pandora_vsim, .keypad = &pandora_kp_data, .bci = &pandora_bci_data, }; static struct i2c_board_info __initdata omap3pandora_i2c_boardinfo[] = { Loading Loading @@ -645,19 +679,8 @@ static void pandora_wl1251_init(void) if (pandora_wl1251_pdata.irq < 0) goto fail_irq; ret = gpio_request(PANDORA_WIFI_NRESET_GPIO, "wl1251 nreset"); if (ret < 0) goto fail_irq; /* start powered so that it probes with MMC subsystem */ ret = gpio_direction_output(PANDORA_WIFI_NRESET_GPIO, 1); if (ret < 0) goto fail_nreset; return; fail_nreset: gpio_free(PANDORA_WIFI_NRESET_GPIO); fail_irq: gpio_free(PANDORA_WIFI_IRQ_GPIO); fail: Loading @@ -669,6 +692,7 @@ static struct platform_device *omap3pandora_devices[] __initdata = { &pandora_keys_gpio, &pandora_dss_device, &pandora_wl1251_data, &pandora_vwlan_device, }; static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { Loading