|
@@ -499,3 +499,197 @@ static struct hash_platform_data u8500_hash1_platform_data = {
|
|
|
|
|
|
/* add any platform devices here - TODO */
|
|
|
static struct platform_device *mop500_platform_devs[] __initdata = {
|
|
|
+ &mop500_gpio_keys_device,
|
|
|
+};
|
|
|
+
|
|
|
+#ifdef CONFIG_STE_DMA40
|
|
|
+static struct stedma40_chan_cfg ssp0_dma_cfg_rx = {
|
|
|
+ .mode = STEDMA40_MODE_LOGICAL,
|
|
|
+ .dir = STEDMA40_PERIPH_TO_MEM,
|
|
|
+ .src_dev_type = DB8500_DMA_DEV8_SSP0_RX,
|
|
|
+ .dst_dev_type = STEDMA40_DEV_DST_MEMORY,
|
|
|
+ .src_info.data_width = STEDMA40_BYTE_WIDTH,
|
|
|
+ .dst_info.data_width = STEDMA40_BYTE_WIDTH,
|
|
|
+};
|
|
|
+
|
|
|
+static struct stedma40_chan_cfg ssp0_dma_cfg_tx = {
|
|
|
+ .mode = STEDMA40_MODE_LOGICAL,
|
|
|
+ .dir = STEDMA40_MEM_TO_PERIPH,
|
|
|
+ .src_dev_type = STEDMA40_DEV_SRC_MEMORY,
|
|
|
+ .dst_dev_type = DB8500_DMA_DEV8_SSP0_TX,
|
|
|
+ .src_info.data_width = STEDMA40_BYTE_WIDTH,
|
|
|
+ .dst_info.data_width = STEDMA40_BYTE_WIDTH,
|
|
|
+};
|
|
|
+#endif
|
|
|
+
|
|
|
+struct pl022_ssp_controller ssp0_plat = {
|
|
|
+ .bus_id = 0,
|
|
|
+#ifdef CONFIG_STE_DMA40
|
|
|
+ .enable_dma = 1,
|
|
|
+ .dma_filter = stedma40_filter,
|
|
|
+ .dma_rx_param = &ssp0_dma_cfg_rx,
|
|
|
+ .dma_tx_param = &ssp0_dma_cfg_tx,
|
|
|
+#else
|
|
|
+ .enable_dma = 0,
|
|
|
+#endif
|
|
|
+ /* on this platform, gpio 31,142,144,214 &
|
|
|
+ * 224 are connected as chip selects
|
|
|
+ */
|
|
|
+ .num_chipselect = 5,
|
|
|
+};
|
|
|
+
|
|
|
+static void __init mop500_spi_init(struct device *parent)
|
|
|
+{
|
|
|
+ db8500_add_ssp0(parent, &ssp0_plat);
|
|
|
+}
|
|
|
+
|
|
|
+#ifdef CONFIG_STE_DMA40
|
|
|
+static struct stedma40_chan_cfg uart0_dma_cfg_rx = {
|
|
|
+ .mode = STEDMA40_MODE_LOGICAL,
|
|
|
+ .dir = STEDMA40_PERIPH_TO_MEM,
|
|
|
+ .src_dev_type = DB8500_DMA_DEV13_UART0_RX,
|
|
|
+ .dst_dev_type = STEDMA40_DEV_DST_MEMORY,
|
|
|
+ .src_info.data_width = STEDMA40_BYTE_WIDTH,
|
|
|
+ .dst_info.data_width = STEDMA40_BYTE_WIDTH,
|
|
|
+};
|
|
|
+
|
|
|
+static struct stedma40_chan_cfg uart0_dma_cfg_tx = {
|
|
|
+ .mode = STEDMA40_MODE_LOGICAL,
|
|
|
+ .dir = STEDMA40_MEM_TO_PERIPH,
|
|
|
+ .src_dev_type = STEDMA40_DEV_SRC_MEMORY,
|
|
|
+ .dst_dev_type = DB8500_DMA_DEV13_UART0_TX,
|
|
|
+ .src_info.data_width = STEDMA40_BYTE_WIDTH,
|
|
|
+ .dst_info.data_width = STEDMA40_BYTE_WIDTH,
|
|
|
+};
|
|
|
+
|
|
|
+static struct stedma40_chan_cfg uart1_dma_cfg_rx = {
|
|
|
+ .mode = STEDMA40_MODE_LOGICAL,
|
|
|
+ .dir = STEDMA40_PERIPH_TO_MEM,
|
|
|
+ .src_dev_type = DB8500_DMA_DEV12_UART1_RX,
|
|
|
+ .dst_dev_type = STEDMA40_DEV_DST_MEMORY,
|
|
|
+ .src_info.data_width = STEDMA40_BYTE_WIDTH,
|
|
|
+ .dst_info.data_width = STEDMA40_BYTE_WIDTH,
|
|
|
+};
|
|
|
+
|
|
|
+static struct stedma40_chan_cfg uart1_dma_cfg_tx = {
|
|
|
+ .mode = STEDMA40_MODE_LOGICAL,
|
|
|
+ .dir = STEDMA40_MEM_TO_PERIPH,
|
|
|
+ .src_dev_type = STEDMA40_DEV_SRC_MEMORY,
|
|
|
+ .dst_dev_type = DB8500_DMA_DEV12_UART1_TX,
|
|
|
+ .src_info.data_width = STEDMA40_BYTE_WIDTH,
|
|
|
+ .dst_info.data_width = STEDMA40_BYTE_WIDTH,
|
|
|
+};
|
|
|
+
|
|
|
+static struct stedma40_chan_cfg uart2_dma_cfg_rx = {
|
|
|
+ .mode = STEDMA40_MODE_LOGICAL,
|
|
|
+ .dir = STEDMA40_PERIPH_TO_MEM,
|
|
|
+ .src_dev_type = DB8500_DMA_DEV11_UART2_RX,
|
|
|
+ .dst_dev_type = STEDMA40_DEV_DST_MEMORY,
|
|
|
+ .src_info.data_width = STEDMA40_BYTE_WIDTH,
|
|
|
+ .dst_info.data_width = STEDMA40_BYTE_WIDTH,
|
|
|
+};
|
|
|
+
|
|
|
+static struct stedma40_chan_cfg uart2_dma_cfg_tx = {
|
|
|
+ .mode = STEDMA40_MODE_LOGICAL,
|
|
|
+ .dir = STEDMA40_MEM_TO_PERIPH,
|
|
|
+ .src_dev_type = STEDMA40_DEV_SRC_MEMORY,
|
|
|
+ .dst_dev_type = DB8500_DMA_DEV11_UART2_TX,
|
|
|
+ .src_info.data_width = STEDMA40_BYTE_WIDTH,
|
|
|
+ .dst_info.data_width = STEDMA40_BYTE_WIDTH,
|
|
|
+};
|
|
|
+#endif
|
|
|
+
|
|
|
+struct amba_pl011_data uart0_plat = {
|
|
|
+#ifdef CONFIG_STE_DMA40
|
|
|
+ .dma_filter = stedma40_filter,
|
|
|
+ .dma_rx_param = &uart0_dma_cfg_rx,
|
|
|
+ .dma_tx_param = &uart0_dma_cfg_tx,
|
|
|
+#endif
|
|
|
+};
|
|
|
+
|
|
|
+struct amba_pl011_data uart1_plat = {
|
|
|
+#ifdef CONFIG_STE_DMA40
|
|
|
+ .dma_filter = stedma40_filter,
|
|
|
+ .dma_rx_param = &uart1_dma_cfg_rx,
|
|
|
+ .dma_tx_param = &uart1_dma_cfg_tx,
|
|
|
+#endif
|
|
|
+};
|
|
|
+
|
|
|
+struct amba_pl011_data uart2_plat = {
|
|
|
+#ifdef CONFIG_STE_DMA40
|
|
|
+ .dma_filter = stedma40_filter,
|
|
|
+ .dma_rx_param = &uart2_dma_cfg_rx,
|
|
|
+ .dma_tx_param = &uart2_dma_cfg_tx,
|
|
|
+#endif
|
|
|
+};
|
|
|
+
|
|
|
+static void __init mop500_uart_init(struct device *parent)
|
|
|
+{
|
|
|
+ db8500_add_uart0(parent, &uart0_plat);
|
|
|
+ db8500_add_uart1(parent, &uart1_plat);
|
|
|
+ db8500_add_uart2(parent, &uart2_plat);
|
|
|
+}
|
|
|
+
|
|
|
+static void __init u8500_cryp1_hash1_init(struct device *parent)
|
|
|
+{
|
|
|
+ db8500_add_cryp1(parent, &u8500_cryp1_platform_data);
|
|
|
+ db8500_add_hash1(parent, &u8500_hash1_platform_data);
|
|
|
+}
|
|
|
+
|
|
|
+static struct platform_device *snowball_platform_devs[] __initdata = {
|
|
|
+ &snowball_led_dev,
|
|
|
+ &snowball_key_dev,
|
|
|
+ &snowball_sbnet_dev,
|
|
|
+ &snowball_gpio_en_3v3_regulator_dev,
|
|
|
+ &u8500_thsens_device,
|
|
|
+ &u8500_cpufreq_cooling_device,
|
|
|
+};
|
|
|
+
|
|
|
+static void __init mop500_init_machine(void)
|
|
|
+{
|
|
|
+ struct device *parent = NULL;
|
|
|
+ int i2c0_devs;
|
|
|
+ int i;
|
|
|
+
|
|
|
+ mop500_gpio_keys[0].gpio = GPIO_PROX_SENSOR;
|
|
|
+
|
|
|
+ mop500_pinmaps_init();
|
|
|
+ parent = u8500_init_devices(&ab8500_platdata);
|
|
|
+
|
|
|
+ for (i = 0; i < ARRAY_SIZE(mop500_platform_devs); i++)
|
|
|
+ mop500_platform_devs[i]->dev.parent = parent;
|
|
|
+
|
|
|
+ platform_add_devices(mop500_platform_devs,
|
|
|
+ ARRAY_SIZE(mop500_platform_devs));
|
|
|
+
|
|
|
+ mop500_i2c_init(parent);
|
|
|
+ mop500_sdi_init(parent);
|
|
|
+ mop500_spi_init(parent);
|
|
|
+ mop500_audio_init(parent);
|
|
|
+ mop500_uart_init(parent);
|
|
|
+
|
|
|
+ u8500_cryp1_hash1_init(parent);
|
|
|
+
|
|
|
+ i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices);
|
|
|
+
|
|
|
+ i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs);
|
|
|
+ i2c_register_board_info(2, mop500_i2c2_devices,
|
|
|
+ ARRAY_SIZE(mop500_i2c2_devices));
|
|
|
+
|
|
|
+ /* This board has full regulator constraints */
|
|
|
+ regulator_has_full_constraints();
|
|
|
+}
|
|
|
+
|
|
|
+static void __init snowball_init_machine(void)
|
|
|
+{
|
|
|
+ struct device *parent = NULL;
|
|
|
+ int i;
|
|
|
+
|
|
|
+ snowball_pinmaps_init();
|
|
|
+ parent = u8500_init_devices(&ab8500_platdata);
|
|
|
+
|
|
|
+ for (i = 0; i < ARRAY_SIZE(snowball_platform_devs); i++)
|
|
|
+ snowball_platform_devs[i]->dev.parent = parent;
|
|
|
+
|
|
|
+ platform_add_devices(snowball_platform_devs,
|
|
|
+ ARRAY_SIZE(snowball_platform_devs));
|