From 9f575d9741ff28b6661f639d63b4f465c19889c4 Mon Sep 17 00:00:00 2001 From: Linus Walleij Date: Fri, 4 Jan 2013 10:35:06 +0100 Subject: dma: coh901318: create a proper platform data file This extracts the platform data that we will keep generic from the U300 platform and associates it with the COH901318 driver in . Acked-by: Vinod Koul Signed-off-by: Linus Walleij --- include/linux/platform_data/dma-coh901318.h | 72 +++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 include/linux/platform_data/dma-coh901318.h (limited to 'include') diff --git a/include/linux/platform_data/dma-coh901318.h b/include/linux/platform_data/dma-coh901318.h new file mode 100644 index 000000000000..c4cb9590d115 --- /dev/null +++ b/include/linux/platform_data/dma-coh901318.h @@ -0,0 +1,72 @@ +/* + * Platform data for the COH901318 DMA controller + * Copyright (C) 2007-2013 ST-Ericsson + * License terms: GNU General Public License (GPL) version 2 + */ + +#ifndef PLAT_COH901318_H +#define PLAT_COH901318_H + +#ifdef CONFIG_COH901318 + +/* We only support the U300 DMA channels */ +#define U300_DMA_MSL_TX_0 0 +#define U300_DMA_MSL_TX_1 1 +#define U300_DMA_MSL_TX_2 2 +#define U300_DMA_MSL_TX_3 3 +#define U300_DMA_MSL_TX_4 4 +#define U300_DMA_MSL_TX_5 5 +#define U300_DMA_MSL_TX_6 6 +#define U300_DMA_MSL_RX_0 7 +#define U300_DMA_MSL_RX_1 8 +#define U300_DMA_MSL_RX_2 9 +#define U300_DMA_MSL_RX_3 10 +#define U300_DMA_MSL_RX_4 11 +#define U300_DMA_MSL_RX_5 12 +#define U300_DMA_MSL_RX_6 13 +#define U300_DMA_MMCSD_RX_TX 14 +#define U300_DMA_MSPRO_TX 15 +#define U300_DMA_MSPRO_RX 16 +#define U300_DMA_UART0_TX 17 +#define U300_DMA_UART0_RX 18 +#define U300_DMA_APEX_TX 19 +#define U300_DMA_APEX_RX 20 +#define U300_DMA_PCM_I2S0_TX 21 +#define U300_DMA_PCM_I2S0_RX 22 +#define U300_DMA_PCM_I2S1_TX 23 +#define U300_DMA_PCM_I2S1_RX 24 +#define U300_DMA_XGAM_CDI 25 +#define U300_DMA_XGAM_PDI 26 +#define U300_DMA_SPI_TX 27 +#define U300_DMA_SPI_RX 28 +#define U300_DMA_GENERAL_PURPOSE_0 29 +#define U300_DMA_GENERAL_PURPOSE_1 30 +#define U300_DMA_GENERAL_PURPOSE_2 31 +#define U300_DMA_GENERAL_PURPOSE_3 32 +#define U300_DMA_GENERAL_PURPOSE_4 33 +#define U300_DMA_GENERAL_PURPOSE_5 34 +#define U300_DMA_GENERAL_PURPOSE_6 35 +#define U300_DMA_GENERAL_PURPOSE_7 36 +#define U300_DMA_GENERAL_PURPOSE_8 37 +#define U300_DMA_UART1_TX 38 +#define U300_DMA_UART1_RX 39 + +#define U300_DMA_DEVICE_CHANNELS 32 +#define U300_DMA_CHANNELS 40 + +/** + * coh901318_filter_id() - DMA channel filter function + * @chan: dma channel handle + * @chan_id: id of dma channel to be filter out + * + * In dma_request_channel() it specifies what channel id to be requested + */ +bool coh901318_filter_id(struct dma_chan *chan, void *chan_id); +#else +static inline bool coh901318_filter_id(struct dma_chan *chan, void *chan_id) +{ + return false; +} +#endif + +#endif /* PLAT_COH901318_H */ -- cgit v1.2.3 From ccf04c51004d0b973a688a91c879e2d91780d03c Mon Sep 17 00:00:00 2001 From: Daniel Mack Date: Fri, 14 Dec 2012 11:36:41 +0100 Subject: mtd: omap-nand: pass device_node in platform data Pass an optional device_node pointer in the platform data, which in turn will be put into a mtd_part_parser_data. This way, code that sets up the platform devices can pass along the node from DT so that the partitions can be parsed. For non-DT boards, this change has no effect. Signed-off-by: Daniel Mack Acked-by: Grant Likely Acked-by: Artem Bityutskiy Signed-off-by: Tony Lindgren --- include/linux/platform_data/mtd-nand-omap2.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/linux/platform_data/mtd-nand-omap2.h b/include/linux/platform_data/mtd-nand-omap2.h index 24d32ca34bef..6bf9ef43ddb1 100644 --- a/include/linux/platform_data/mtd-nand-omap2.h +++ b/include/linux/platform_data/mtd-nand-omap2.h @@ -60,6 +60,8 @@ struct omap_nand_platform_data { int devsize; enum omap_ecc ecc_opt; struct gpmc_nand_regs reg; -}; + /* for passing the partitions */ + struct device_node *of_node; +}; #endif -- cgit v1.2.3 From da660b4a3b15caea9c198c4f26d1cf7023df92fc Mon Sep 17 00:00:00 2001 From: Catalin Marinas Date: Fri, 4 Jan 2013 14:17:15 +0000 Subject: arm: Move sp810.h to include/linux/amba/ Since it is now used by code under drivers/clk/ it makes sense for this file to be in a more generic location. This is required for building vexpress support on arm64. Signed-off-by: Catalin Marinas Acked-by: Viresh Kumar Acked-by: Pawel Moll Cc: Shiraz Hashim Cc: Russell King Signed-off-by: Pawel Moll --- include/linux/amba/sp810.h | 64 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 include/linux/amba/sp810.h (limited to 'include') diff --git a/include/linux/amba/sp810.h b/include/linux/amba/sp810.h new file mode 100644 index 000000000000..6636430dd0e6 --- /dev/null +++ b/include/linux/amba/sp810.h @@ -0,0 +1,64 @@ +/* + * arch/arm/include/asm/hardware/sp810.h + * + * ARM PrimeXsys System Controller SP810 header file + * + * Copyright (C) 2009 ST Microelectronics + * Viresh Kumar + * + * This file is licensed under the terms of the GNU General Public + * License version 2. This program is licensed "as is" without any + * warranty of any kind, whether express or implied. + */ + +#ifndef __ASM_ARM_SP810_H +#define __ASM_ARM_SP810_H + +#include + +/* sysctl registers offset */ +#define SCCTRL 0x000 +#define SCSYSSTAT 0x004 +#define SCIMCTRL 0x008 +#define SCIMSTAT 0x00C +#define SCXTALCTRL 0x010 +#define SCPLLCTRL 0x014 +#define SCPLLFCTRL 0x018 +#define SCPERCTRL0 0x01C +#define SCPERCTRL1 0x020 +#define SCPEREN 0x024 +#define SCPERDIS 0x028 +#define SCPERCLKEN 0x02C +#define SCPERSTAT 0x030 +#define SCSYSID0 0xEE0 +#define SCSYSID1 0xEE4 +#define SCSYSID2 0xEE8 +#define SCSYSID3 0xEEC +#define SCITCR 0xF00 +#define SCITIR0 0xF04 +#define SCITIR1 0xF08 +#define SCITOR 0xF0C +#define SCCNTCTRL 0xF10 +#define SCCNTDATA 0xF14 +#define SCCNTSTEP 0xF18 +#define SCPERIPHID0 0xFE0 +#define SCPERIPHID1 0xFE4 +#define SCPERIPHID2 0xFE8 +#define SCPERIPHID3 0xFEC +#define SCPCELLID0 0xFF0 +#define SCPCELLID1 0xFF4 +#define SCPCELLID2 0xFF8 +#define SCPCELLID3 0xFFC + +#define SCCTRL_TIMERENnSEL_SHIFT(n) (15 + ((n) * 2)) + +static inline void sysctl_soft_reset(void __iomem *base) +{ + /* switch to slow mode */ + writel(0x2, base + SCCTRL); + + /* writing any value to SCSYSSTAT reg will reset system */ + writel(0, base + SCSYSSTAT); +} + +#endif /* __ASM_ARM_SP810_H */ -- cgit v1.2.3 From dc75eb36c3233409728e88acfd6b45a223856289 Mon Sep 17 00:00:00 2001 From: Ezequiel Garcia Date: Fri, 25 Jan 2013 09:23:09 -0300 Subject: mtd: omap-onenand: pass device_node in platform data Pass an optional device_node pointer in the platform data, which in turn will be put into a mtd_part_parser_data. This way, code that sets up the platform devices can pass along the node from DT so that the partitions can be parsed. For non-DT boards, this change has no effect. Acked-by: Artem Bityutskiy Signed-off-by: Ezequiel Garcia Signed-off-by: Tony Lindgren --- include/linux/platform_data/mtd-onenand-omap2.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/linux/platform_data/mtd-onenand-omap2.h b/include/linux/platform_data/mtd-onenand-omap2.h index 685af7e8b120..e9a9fb188f97 100644 --- a/include/linux/platform_data/mtd-onenand-omap2.h +++ b/include/linux/platform_data/mtd-onenand-omap2.h @@ -29,5 +29,8 @@ struct omap_onenand_platform_data { u8 flags; u8 regulator_can_sleep; u8 skip_initial_unlocking; + + /* for passing the partitions */ + struct device_node *of_node; }; #endif -- cgit v1.2.3