diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-12 14:45:16 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-12 14:45:16 -0500 |
| commit | 8287361abca36504da813638310d2547469283eb (patch) | |
| tree | 8d98e9a910885efdb09ae5390a3ae44040557e2f /include/linux/platform_data | |
| parent | 2989950cea13711f0cc573c26cde8fe08a36be03 (diff) | |
| parent | 8556650dd3370a927217f16444aac5cc0c71e61b (diff) | |
Merge tag 'headers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC Header cleanups from Olof Johansson:
"This is a collection of header file cleanups, mostly for OMAP and
AT91, that keeps moving the platforms in the direction of
multiplatform by removing the need for mach-dependent header files
used in drivers and other places."
Fix up mostly trivial conflicts as per Olof.
* tag 'headers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (106 commits)
ARM: OMAP2+: Move iommu/iovmm headers to platform_data
ARM: OMAP2+: Make some definitions local
ARM: OMAP2+: Move iommu2 to drivers/iommu/omap-iommu2.c
ARM: OMAP2+: Move plat/iovmm.h to include/linux/omap-iommu.h
ARM: OMAP2+: Move iopgtable header to drivers/iommu/
ARM: OMAP: Merge iommu2.h into iommu.h
atmel: move ATMEL_MAX_UART to platform_data/atmel.h
ARM: OMAP: Remove omap_init_consistent_dma_size()
arm: at91: move at91rm9200 rtc header in drivers/rtc
arm: at91: move reset controller header to arm/arm/mach-at91
arm: at91: move pit define to the driver
arm: at91: move at91_shdwc.h to arch/arm/mach-at91
arm: at91: move board header to arch/arm/mach-at91
arn: at91: move at91_tc.h to arch/arm/mach-at91
arm: at91 move at91_aic.h to arch/arm/mach-at91
arm: at91 move board.h to arch/arm/mach-at91
arm: at91: move platfarm_data to include/linux/platform_data/atmel.h
arm: at91: drop machine defconfig
ARM: OMAP: Remove NEED_MACH_GPIO_H
ARM: OMAP: Remove unnecessary mach and plat includes
...
Diffstat (limited to 'include/linux/platform_data')
| -rw-r--r-- | include/linux/platform_data/atmel.h | 73 | ||||
| -rw-r--r-- | include/linux/platform_data/gpio-omap.h | 1 | ||||
| -rw-r--r-- | include/linux/platform_data/iommu-omap.h | 49 | ||||
| -rw-r--r-- | include/linux/platform_data/leds-omap.h | 22 | ||||
| -rw-r--r-- | include/linux/platform_data/mmc-omap.h | 151 | ||||
| -rw-r--r-- | include/linux/platform_data/mtd-nand-omap2.h | 46 | ||||
| -rw-r--r-- | include/linux/platform_data/mtd-onenand-omap2.h | 28 | ||||
| -rw-r--r-- | include/linux/platform_data/usb-omap.h | 80 |
8 files changed, 413 insertions, 37 deletions
diff --git a/include/linux/platform_data/atmel.h b/include/linux/platform_data/atmel.h index b0f2c56a8ea2..6a293b7fff3b 100644 --- a/include/linux/platform_data/atmel.h +++ b/include/linux/platform_data/atmel.h | |||
| @@ -8,6 +8,55 @@ | |||
| 8 | #define __ATMEL_H__ | 8 | #define __ATMEL_H__ |
| 9 | 9 | ||
| 10 | #include <linux/mtd/nand.h> | 10 | #include <linux/mtd/nand.h> |
| 11 | #include <linux/mtd/partitions.h> | ||
| 12 | #include <linux/device.h> | ||
| 13 | #include <linux/i2c.h> | ||
| 14 | #include <linux/leds.h> | ||
| 15 | #include <linux/spi/spi.h> | ||
| 16 | #include <linux/usb/atmel_usba_udc.h> | ||
| 17 | #include <linux/atmel-mci.h> | ||
| 18 | #include <sound/atmel-ac97c.h> | ||
| 19 | #include <linux/serial.h> | ||
| 20 | #include <linux/platform_data/macb.h> | ||
| 21 | |||
| 22 | /* | ||
| 23 | * at91: 6 USARTs and one DBGU port (SAM9260) | ||
| 24 | * avr32: 4 | ||
| 25 | */ | ||
| 26 | #define ATMEL_MAX_UART 7 | ||
| 27 | |||
| 28 | /* USB Device */ | ||
| 29 | struct at91_udc_data { | ||
| 30 | int vbus_pin; /* high == host powering us */ | ||
| 31 | u8 vbus_active_low; /* vbus polarity */ | ||
| 32 | u8 vbus_polled; /* Use polling, not interrupt */ | ||
| 33 | int pullup_pin; /* active == D+ pulled up */ | ||
| 34 | u8 pullup_active_low; /* true == pullup_pin is active low */ | ||
| 35 | }; | ||
| 36 | |||
| 37 | /* Compact Flash */ | ||
| 38 | struct at91_cf_data { | ||
| 39 | int irq_pin; /* I/O IRQ */ | ||
| 40 | int det_pin; /* Card detect */ | ||
| 41 | int vcc_pin; /* power switching */ | ||
| 42 | int rst_pin; /* card reset */ | ||
| 43 | u8 chipselect; /* EBI Chip Select number */ | ||
| 44 | u8 flags; | ||
| 45 | #define AT91_CF_TRUE_IDE 0x01 | ||
| 46 | #define AT91_IDE_SWAP_A0_A2 0x02 | ||
| 47 | }; | ||
| 48 | |||
| 49 | /* USB Host */ | ||
| 50 | #define AT91_MAX_USBH_PORTS 3 | ||
| 51 | struct at91_usbh_data { | ||
| 52 | int vbus_pin[AT91_MAX_USBH_PORTS]; /* port power-control pin */ | ||
| 53 | int overcurrent_pin[AT91_MAX_USBH_PORTS]; | ||
| 54 | u8 ports; /* number of ports on root hub */ | ||
| 55 | u8 overcurrent_supported; | ||
| 56 | u8 vbus_pin_active_low[AT91_MAX_USBH_PORTS]; | ||
| 57 | u8 overcurrent_status[AT91_MAX_USBH_PORTS]; | ||
| 58 | u8 overcurrent_changed[AT91_MAX_USBH_PORTS]; | ||
| 59 | }; | ||
| 11 | 60 | ||
| 12 | /* NAND / SmartMedia */ | 61 | /* NAND / SmartMedia */ |
| 13 | struct atmel_nand_data { | 62 | struct atmel_nand_data { |
| @@ -24,4 +73,28 @@ struct atmel_nand_data { | |||
| 24 | unsigned int num_parts; | 73 | unsigned int num_parts; |
| 25 | }; | 74 | }; |
| 26 | 75 | ||
| 76 | /* Serial */ | ||
| 77 | struct atmel_uart_data { | ||
| 78 | int num; /* port num */ | ||
| 79 | short use_dma_tx; /* use transmit DMA? */ | ||
| 80 | short use_dma_rx; /* use receive DMA? */ | ||
| 81 | void __iomem *regs; /* virt. base address, if any */ | ||
| 82 | struct serial_rs485 rs485; /* rs485 settings */ | ||
| 83 | }; | ||
| 84 | |||
| 85 | /* Touchscreen Controller */ | ||
| 86 | struct at91_tsadcc_data { | ||
| 87 | unsigned int adc_clock; | ||
| 88 | u8 pendet_debounce; | ||
| 89 | u8 ts_sample_hold_time; | ||
| 90 | }; | ||
| 91 | |||
| 92 | /* CAN */ | ||
| 93 | struct at91_can_data { | ||
| 94 | void (*transceiver_switch)(int on); | ||
| 95 | }; | ||
| 96 | |||
| 97 | /* FIXME: this needs a better location, but gets stuff building again */ | ||
| 98 | extern int at91_suspend_entering_slow_clock(void); | ||
| 99 | |||
| 27 | #endif /* __ATMEL_H__ */ | 100 | #endif /* __ATMEL_H__ */ |
diff --git a/include/linux/platform_data/gpio-omap.h b/include/linux/platform_data/gpio-omap.h index e8741c2678d5..5d50b25a73d7 100644 --- a/include/linux/platform_data/gpio-omap.h +++ b/include/linux/platform_data/gpio-omap.h | |||
| @@ -26,7 +26,6 @@ | |||
| 26 | 26 | ||
| 27 | #include <linux/io.h> | 27 | #include <linux/io.h> |
| 28 | #include <linux/platform_device.h> | 28 | #include <linux/platform_device.h> |
| 29 | #include <mach/irqs.h> | ||
| 30 | 29 | ||
| 31 | #define OMAP1_MPUIO_BASE 0xfffb5000 | 30 | #define OMAP1_MPUIO_BASE 0xfffb5000 |
| 32 | 31 | ||
diff --git a/include/linux/platform_data/iommu-omap.h b/include/linux/platform_data/iommu-omap.h new file mode 100644 index 000000000000..c677b9f2fefa --- /dev/null +++ b/include/linux/platform_data/iommu-omap.h | |||
| @@ -0,0 +1,49 @@ | |||
| 1 | /* | ||
| 2 | * omap iommu: main structures | ||
| 3 | * | ||
| 4 | * Copyright (C) 2008-2009 Nokia Corporation | ||
| 5 | * | ||
| 6 | * Written by Hiroshi DOYU <Hiroshi.DOYU@nokia.com> | ||
| 7 | * | ||
| 8 | * This program is free software; you can redistribute it and/or modify | ||
| 9 | * it under the terms of the GNU General Public License version 2 as | ||
| 10 | * published by the Free Software Foundation. | ||
| 11 | */ | ||
| 12 | |||
| 13 | #define MMU_REG_SIZE 256 | ||
| 14 | |||
| 15 | /** | ||
| 16 | * struct iommu_arch_data - omap iommu private data | ||
| 17 | * @name: name of the iommu device | ||
| 18 | * @iommu_dev: handle of the iommu device | ||
| 19 | * | ||
| 20 | * This is an omap iommu private data object, which binds an iommu user | ||
| 21 | * to its iommu device. This object should be placed at the iommu user's | ||
| 22 | * dev_archdata so generic IOMMU API can be used without having to | ||
| 23 | * utilize omap-specific plumbing anymore. | ||
| 24 | */ | ||
| 25 | struct omap_iommu_arch_data { | ||
| 26 | const char *name; | ||
| 27 | struct omap_iommu *iommu_dev; | ||
| 28 | }; | ||
| 29 | |||
| 30 | /** | ||
| 31 | * struct omap_mmu_dev_attr - OMAP mmu device attributes for omap_hwmod | ||
| 32 | * @da_start: device address where the va space starts. | ||
| 33 | * @da_end: device address where the va space ends. | ||
| 34 | * @nr_tlb_entries: number of entries supported by the translation | ||
| 35 | * look-aside buffer (TLB). | ||
| 36 | */ | ||
| 37 | struct omap_mmu_dev_attr { | ||
| 38 | u32 da_start; | ||
| 39 | u32 da_end; | ||
| 40 | int nr_tlb_entries; | ||
| 41 | }; | ||
| 42 | |||
| 43 | struct iommu_platform_data { | ||
| 44 | const char *name; | ||
| 45 | const char *clk_name; | ||
| 46 | const int nr_tlb_entries; | ||
| 47 | u32 da_start; | ||
| 48 | u32 da_end; | ||
| 49 | }; | ||
diff --git a/include/linux/platform_data/leds-omap.h b/include/linux/platform_data/leds-omap.h new file mode 100644 index 000000000000..56c9b2a0ada5 --- /dev/null +++ b/include/linux/platform_data/leds-omap.h | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2006 Samsung Electronics | ||
| 3 | * Kyungmin Park <kyungmin.park@samsung.com> | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or modify | ||
| 6 | * it under the terms of the GNU General Public License version 2 as | ||
| 7 | * published by the Free Software Foundation. | ||
| 8 | */ | ||
| 9 | #ifndef ASMARM_ARCH_LED_H | ||
| 10 | #define ASMARM_ARCH_LED_H | ||
| 11 | |||
| 12 | struct omap_led_config { | ||
| 13 | struct led_classdev cdev; | ||
| 14 | s16 gpio; | ||
| 15 | }; | ||
| 16 | |||
| 17 | struct omap_led_platform_data { | ||
| 18 | s16 nr_leds; | ||
| 19 | struct omap_led_config *leds; | ||
| 20 | }; | ||
| 21 | |||
| 22 | #endif | ||
diff --git a/include/linux/platform_data/mmc-omap.h b/include/linux/platform_data/mmc-omap.h new file mode 100644 index 000000000000..2bf1b30cb5dc --- /dev/null +++ b/include/linux/platform_data/mmc-omap.h | |||
| @@ -0,0 +1,151 @@ | |||
| 1 | /* | ||
| 2 | * MMC definitions for OMAP2 | ||
| 3 | * | ||
| 4 | * Copyright (C) 2006 Nokia Corporation | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License version 2 as | ||
| 8 | * published by the Free Software Foundation. | ||
| 9 | */ | ||
| 10 | |||
| 11 | #define OMAP_MMC_MAX_SLOTS 2 | ||
| 12 | |||
| 13 | /* | ||
| 14 | * struct omap_mmc_dev_attr.flags possibilities | ||
| 15 | * | ||
| 16 | * OMAP_HSMMC_SUPPORTS_DUAL_VOLT: Some HSMMC controller instances can | ||
| 17 | * operate with either 1.8Vdc or 3.0Vdc card voltages; this flag | ||
| 18 | * should be set if this is the case. See for example Section 22.5.3 | ||
| 19 | * "MMC/SD/SDIO1 Bus Voltage Selection" of the OMAP34xx Multimedia | ||
| 20 | * Device Silicon Revision 3.1.x Revision ZR (July 2011) (SWPU223R). | ||
| 21 | * | ||
| 22 | * OMAP_HSMMC_BROKEN_MULTIBLOCK_READ: Multiple-block read transfers | ||
| 23 | * don't work correctly on some MMC controller instances on some | ||
| 24 | * OMAP3 SoCs; this flag should be set if this is the case. See | ||
| 25 | * for example Advisory 2.1.1.128 "MMC: Multiple Block Read | ||
| 26 | * Operation Issue" in _OMAP3530/3525/3515/3503 Silicon Errata_ | ||
| 27 | * Revision F (October 2010) (SPRZ278F). | ||
| 28 | */ | ||
| 29 | #define OMAP_HSMMC_SUPPORTS_DUAL_VOLT BIT(0) | ||
| 30 | #define OMAP_HSMMC_BROKEN_MULTIBLOCK_READ BIT(1) | ||
| 31 | |||
| 32 | struct mmc_card; | ||
| 33 | |||
| 34 | struct omap_mmc_dev_attr { | ||
| 35 | u8 flags; | ||
| 36 | }; | ||
| 37 | |||
| 38 | struct omap_mmc_platform_data { | ||
| 39 | /* back-link to device */ | ||
| 40 | struct device *dev; | ||
| 41 | |||
| 42 | /* number of slots per controller */ | ||
| 43 | unsigned nr_slots:2; | ||
| 44 | |||
| 45 | /* set if your board has components or wiring that limits the | ||
| 46 | * maximum frequency on the MMC bus */ | ||
| 47 | unsigned int max_freq; | ||
| 48 | |||
| 49 | /* switch the bus to a new slot */ | ||
| 50 | int (*switch_slot)(struct device *dev, int slot); | ||
| 51 | /* initialize board-specific MMC functionality, can be NULL if | ||
| 52 | * not supported */ | ||
| 53 | int (*init)(struct device *dev); | ||
| 54 | void (*cleanup)(struct device *dev); | ||
| 55 | void (*shutdown)(struct device *dev); | ||
| 56 | |||
| 57 | /* To handle board related suspend/resume functionality for MMC */ | ||
| 58 | int (*suspend)(struct device *dev, int slot); | ||
| 59 | int (*resume)(struct device *dev, int slot); | ||
| 60 | |||
| 61 | /* Return context loss count due to PM states changing */ | ||
| 62 | int (*get_context_loss_count)(struct device *dev); | ||
| 63 | |||
| 64 | /* Integrating attributes from the omap_hwmod layer */ | ||
| 65 | u8 controller_flags; | ||
| 66 | |||
| 67 | /* Register offset deviation */ | ||
| 68 | u16 reg_offset; | ||
| 69 | |||
| 70 | struct omap_mmc_slot_data { | ||
| 71 | |||
| 72 | /* | ||
| 73 | * 4/8 wires and any additional host capabilities | ||
| 74 | * need to OR'd all capabilities (ref. linux/mmc/host.h) | ||
| 75 | */ | ||
| 76 | u8 wires; /* Used for the MMC driver on omap1 and 2420 */ | ||
| 77 | u32 caps; /* Used for the MMC driver on 2430 and later */ | ||
| 78 | u32 pm_caps; /* PM capabilities of the mmc */ | ||
| 79 | |||
| 80 | /* | ||
| 81 | * nomux means "standard" muxing is wrong on this board, and | ||
| 82 | * that board-specific code handled it before common init logic. | ||
| 83 | */ | ||
| 84 | unsigned nomux:1; | ||
| 85 | |||
| 86 | /* switch pin can be for card detect (default) or card cover */ | ||
| 87 | unsigned cover:1; | ||
| 88 | |||
| 89 | /* use the internal clock */ | ||
| 90 | unsigned internal_clock:1; | ||
| 91 | |||
| 92 | /* nonremovable e.g. eMMC */ | ||
| 93 | unsigned nonremovable:1; | ||
| 94 | |||
| 95 | /* Try to sleep or power off when possible */ | ||
| 96 | unsigned power_saving:1; | ||
| 97 | |||
| 98 | /* If using power_saving and the MMC power is not to go off */ | ||
| 99 | unsigned no_off:1; | ||
| 100 | |||
| 101 | /* eMMC does not handle power off when not in sleep state */ | ||
| 102 | unsigned no_regulator_off_init:1; | ||
| 103 | |||
| 104 | /* Regulator off remapped to sleep */ | ||
| 105 | unsigned vcc_aux_disable_is_sleep:1; | ||
| 106 | |||
| 107 | /* we can put the features above into this variable */ | ||
| 108 | #define HSMMC_HAS_PBIAS (1 << 0) | ||
| 109 | #define HSMMC_HAS_UPDATED_RESET (1 << 1) | ||
| 110 | #define HSMMC_HAS_HSPE_SUPPORT (1 << 2) | ||
| 111 | #define MMC_OMAP7XX (1 << 3) | ||
| 112 | #define MMC_OMAP15XX (1 << 4) | ||
| 113 | #define MMC_OMAP16XX (1 << 5) | ||
| 114 | unsigned features; | ||
| 115 | |||
| 116 | int switch_pin; /* gpio (card detect) */ | ||
| 117 | int gpio_wp; /* gpio (write protect) */ | ||
| 118 | |||
| 119 | int (*set_bus_mode)(struct device *dev, int slot, int bus_mode); | ||
| 120 | int (*set_power)(struct device *dev, int slot, | ||
| 121 | int power_on, int vdd); | ||
| 122 | int (*get_ro)(struct device *dev, int slot); | ||
| 123 | void (*remux)(struct device *dev, int slot, int power_on); | ||
| 124 | /* Call back before enabling / disabling regulators */ | ||
| 125 | void (*before_set_reg)(struct device *dev, int slot, | ||
| 126 | int power_on, int vdd); | ||
| 127 | /* Call back after enabling / disabling regulators */ | ||
| 128 | void (*after_set_reg)(struct device *dev, int slot, | ||
| 129 | int power_on, int vdd); | ||
| 130 | /* if we have special card, init it using this callback */ | ||
| 131 | void (*init_card)(struct mmc_card *card); | ||
| 132 | |||
| 133 | /* return MMC cover switch state, can be NULL if not supported. | ||
| 134 | * | ||
| 135 | * possible return values: | ||
| 136 | * 0 - closed | ||
| 137 | * 1 - open | ||
| 138 | */ | ||
| 139 | int (*get_cover_state)(struct device *dev, int slot); | ||
| 140 | |||
| 141 | const char *name; | ||
| 142 | u32 ocr_mask; | ||
| 143 | |||
| 144 | /* Card detection IRQs */ | ||
| 145 | int card_detect_irq; | ||
| 146 | int (*card_detect)(struct device *dev, int slot); | ||
| 147 | |||
| 148 | unsigned int ban_openended:1; | ||
| 149 | |||
| 150 | } slots[OMAP_MMC_MAX_SLOTS]; | ||
| 151 | }; | ||
diff --git a/include/linux/platform_data/mtd-nand-omap2.h b/include/linux/platform_data/mtd-nand-omap2.h index 1a68c1e5fe53..24d32ca34bef 100644 --- a/include/linux/platform_data/mtd-nand-omap2.h +++ b/include/linux/platform_data/mtd-nand-omap2.h | |||
| @@ -8,9 +8,13 @@ | |||
| 8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
| 9 | */ | 9 | */ |
| 10 | 10 | ||
| 11 | #include <plat/gpmc.h> | 11 | #ifndef _MTD_NAND_OMAP2_H |
| 12 | #define _MTD_NAND_OMAP2_H | ||
| 13 | |||
| 12 | #include <linux/mtd/partitions.h> | 14 | #include <linux/mtd/partitions.h> |
| 13 | 15 | ||
| 16 | #define GPMC_BCH_NUM_REMAINDER 8 | ||
| 17 | |||
| 14 | enum nand_io { | 18 | enum nand_io { |
| 15 | NAND_OMAP_PREFETCH_POLLED = 0, /* prefetch polled mode, default */ | 19 | NAND_OMAP_PREFETCH_POLLED = 0, /* prefetch polled mode, default */ |
| 16 | NAND_OMAP_POLLED, /* polled mode, without prefetch */ | 20 | NAND_OMAP_POLLED, /* polled mode, without prefetch */ |
| @@ -18,10 +22,38 @@ enum nand_io { | |||
| 18 | NAND_OMAP_PREFETCH_IRQ /* prefetch enabled irq mode */ | 22 | NAND_OMAP_PREFETCH_IRQ /* prefetch enabled irq mode */ |
| 19 | }; | 23 | }; |
| 20 | 24 | ||
| 25 | enum omap_ecc { | ||
| 26 | /* 1-bit ecc: stored at end of spare area */ | ||
| 27 | OMAP_ECC_HAMMING_CODE_DEFAULT = 0, /* Default, s/w method */ | ||
| 28 | OMAP_ECC_HAMMING_CODE_HW, /* gpmc to detect the error */ | ||
| 29 | /* 1-bit ecc: stored at beginning of spare area as romcode */ | ||
| 30 | OMAP_ECC_HAMMING_CODE_HW_ROMCODE, /* gpmc method & romcode layout */ | ||
| 31 | OMAP_ECC_BCH4_CODE_HW, /* 4-bit BCH ecc code */ | ||
| 32 | OMAP_ECC_BCH8_CODE_HW, /* 8-bit BCH ecc code */ | ||
| 33 | }; | ||
| 34 | |||
| 35 | struct gpmc_nand_regs { | ||
| 36 | void __iomem *gpmc_status; | ||
| 37 | void __iomem *gpmc_nand_command; | ||
| 38 | void __iomem *gpmc_nand_address; | ||
| 39 | void __iomem *gpmc_nand_data; | ||
| 40 | void __iomem *gpmc_prefetch_config1; | ||
| 41 | void __iomem *gpmc_prefetch_config2; | ||
| 42 | void __iomem *gpmc_prefetch_control; | ||
| 43 | void __iomem *gpmc_prefetch_status; | ||
| 44 | void __iomem *gpmc_ecc_config; | ||
| 45 | void __iomem *gpmc_ecc_control; | ||
| 46 | void __iomem *gpmc_ecc_size_config; | ||
| 47 | void __iomem *gpmc_ecc1_result; | ||
| 48 | void __iomem *gpmc_bch_result0[GPMC_BCH_NUM_REMAINDER]; | ||
| 49 | void __iomem *gpmc_bch_result1[GPMC_BCH_NUM_REMAINDER]; | ||
| 50 | void __iomem *gpmc_bch_result2[GPMC_BCH_NUM_REMAINDER]; | ||
| 51 | void __iomem *gpmc_bch_result3[GPMC_BCH_NUM_REMAINDER]; | ||
| 52 | }; | ||
| 53 | |||
| 21 | struct omap_nand_platform_data { | 54 | struct omap_nand_platform_data { |
| 22 | int cs; | 55 | int cs; |
| 23 | struct mtd_partition *parts; | 56 | struct mtd_partition *parts; |
| 24 | struct gpmc_timings *gpmc_t; | ||
| 25 | int nr_parts; | 57 | int nr_parts; |
| 26 | bool dev_ready; | 58 | bool dev_ready; |
| 27 | enum nand_io xfer_type; | 59 | enum nand_io xfer_type; |
| @@ -30,14 +62,4 @@ struct omap_nand_platform_data { | |||
| 30 | struct gpmc_nand_regs reg; | 62 | struct gpmc_nand_regs reg; |
| 31 | }; | 63 | }; |
| 32 | 64 | ||
| 33 | /* minimum size for IO mapping */ | ||
| 34 | #define NAND_IO_SIZE 4 | ||
| 35 | |||
| 36 | #if defined(CONFIG_MTD_NAND_OMAP2) || defined(CONFIG_MTD_NAND_OMAP2_MODULE) | ||
| 37 | extern int gpmc_nand_init(struct omap_nand_platform_data *d); | ||
| 38 | #else | ||
| 39 | static inline int gpmc_nand_init(struct omap_nand_platform_data *d) | ||
| 40 | { | ||
| 41 | return 0; | ||
| 42 | } | ||
| 43 | #endif | 65 | #endif |
diff --git a/include/linux/platform_data/mtd-onenand-omap2.h b/include/linux/platform_data/mtd-onenand-omap2.h index 2858667d2e4f..685af7e8b120 100644 --- a/include/linux/platform_data/mtd-onenand-omap2.h +++ b/include/linux/platform_data/mtd-onenand-omap2.h | |||
| @@ -9,17 +9,15 @@ | |||
| 9 | * published by the Free Software Foundation. | 9 | * published by the Free Software Foundation. |
| 10 | */ | 10 | */ |
| 11 | 11 | ||
| 12 | #ifndef __MTD_ONENAND_OMAP2_H | ||
| 13 | #define __MTD_ONENAND_OMAP2_H | ||
| 14 | |||
| 12 | #include <linux/mtd/mtd.h> | 15 | #include <linux/mtd/mtd.h> |
| 13 | #include <linux/mtd/partitions.h> | 16 | #include <linux/mtd/partitions.h> |
| 14 | 17 | ||
| 15 | #define ONENAND_SYNC_READ (1 << 0) | 18 | #define ONENAND_SYNC_READ (1 << 0) |
| 16 | #define ONENAND_SYNC_READWRITE (1 << 1) | 19 | #define ONENAND_SYNC_READWRITE (1 << 1) |
| 17 | 20 | #define ONENAND_IN_OMAP34XX (1 << 2) | |
| 18 | struct onenand_freq_info { | ||
| 19 | u16 maf_id; | ||
| 20 | u16 dev_id; | ||
| 21 | u16 ver_id; | ||
| 22 | }; | ||
| 23 | 21 | ||
| 24 | struct omap_onenand_platform_data { | 22 | struct omap_onenand_platform_data { |
| 25 | int cs; | 23 | int cs; |
| @@ -27,27 +25,9 @@ struct omap_onenand_platform_data { | |||
| 27 | struct mtd_partition *parts; | 25 | struct mtd_partition *parts; |
| 28 | int nr_parts; | 26 | int nr_parts; |
| 29 | int (*onenand_setup)(void __iomem *, int *freq_ptr); | 27 | int (*onenand_setup)(void __iomem *, int *freq_ptr); |
| 30 | int (*get_freq)(const struct onenand_freq_info *freq_info, | ||
| 31 | bool *clk_dep); | ||
| 32 | int dma_channel; | 28 | int dma_channel; |
| 33 | u8 flags; | 29 | u8 flags; |
| 34 | u8 regulator_can_sleep; | 30 | u8 regulator_can_sleep; |
| 35 | u8 skip_initial_unlocking; | 31 | u8 skip_initial_unlocking; |
| 36 | }; | 32 | }; |
| 37 | |||
| 38 | #define ONENAND_MAX_PARTITIONS 8 | ||
| 39 | |||
| 40 | #if defined(CONFIG_MTD_ONENAND_OMAP2) || \ | ||
| 41 | defined(CONFIG_MTD_ONENAND_OMAP2_MODULE) | ||
| 42 | |||
| 43 | extern void gpmc_onenand_init(struct omap_onenand_platform_data *d); | ||
| 44 | |||
| 45 | #else | ||
| 46 | |||
| 47 | #define board_onenand_data NULL | ||
| 48 | |||
| 49 | static inline void gpmc_onenand_init(struct omap_onenand_platform_data *d) | ||
| 50 | { | ||
| 51 | } | ||
| 52 | |||
| 53 | #endif | 33 | #endif |
diff --git a/include/linux/platform_data/usb-omap.h b/include/linux/platform_data/usb-omap.h new file mode 100644 index 000000000000..8570bcfe6311 --- /dev/null +++ b/include/linux/platform_data/usb-omap.h | |||
| @@ -0,0 +1,80 @@ | |||
| 1 | /* | ||
| 2 | * usb-omap.h - Platform data for the various OMAP USB IPs | ||
| 3 | * | ||
| 4 | * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com | ||
| 5 | * | ||
| 6 | * This software is distributed under the terms of the GNU General Public | ||
| 7 | * License ("GPL") version 2, as published by the Free Software Foundation. | ||
| 8 | * | ||
| 9 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
| 10 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 11 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 12 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||
| 13 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
| 14 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
| 15 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
| 16 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
| 17 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 18 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
| 19 | * POSSIBILITY OF SUCH DAMAGE. | ||
| 20 | */ | ||
| 21 | |||
| 22 | #define OMAP3_HS_USB_PORTS 3 | ||
| 23 | |||
| 24 | enum usbhs_omap_port_mode { | ||
| 25 | OMAP_USBHS_PORT_MODE_UNUSED, | ||
| 26 | OMAP_EHCI_PORT_MODE_PHY, | ||
| 27 | OMAP_EHCI_PORT_MODE_TLL, | ||
| 28 | OMAP_EHCI_PORT_MODE_HSIC, | ||
| 29 | OMAP_OHCI_PORT_MODE_PHY_6PIN_DATSE0, | ||
| 30 | OMAP_OHCI_PORT_MODE_PHY_6PIN_DPDM, | ||
| 31 | OMAP_OHCI_PORT_MODE_PHY_3PIN_DATSE0, | ||
| 32 | OMAP_OHCI_PORT_MODE_PHY_4PIN_DPDM, | ||
| 33 | OMAP_OHCI_PORT_MODE_TLL_6PIN_DATSE0, | ||
| 34 | OMAP_OHCI_PORT_MODE_TLL_6PIN_DPDM, | ||
| 35 | OMAP_OHCI_PORT_MODE_TLL_3PIN_DATSE0, | ||
| 36 | OMAP_OHCI_PORT_MODE_TLL_4PIN_DPDM, | ||
| 37 | OMAP_OHCI_PORT_MODE_TLL_2PIN_DATSE0, | ||
| 38 | OMAP_OHCI_PORT_MODE_TLL_2PIN_DPDM | ||
| 39 | }; | ||
| 40 | |||
| 41 | struct usbtll_omap_platform_data { | ||
| 42 | enum usbhs_omap_port_mode port_mode[OMAP3_HS_USB_PORTS]; | ||
| 43 | }; | ||
| 44 | |||
| 45 | struct ehci_hcd_omap_platform_data { | ||
| 46 | enum usbhs_omap_port_mode port_mode[OMAP3_HS_USB_PORTS]; | ||
| 47 | int reset_gpio_port[OMAP3_HS_USB_PORTS]; | ||
| 48 | struct regulator *regulator[OMAP3_HS_USB_PORTS]; | ||
| 49 | unsigned phy_reset:1; | ||
| 50 | }; | ||
| 51 | |||
| 52 | struct ohci_hcd_omap_platform_data { | ||
| 53 | enum usbhs_omap_port_mode port_mode[OMAP3_HS_USB_PORTS]; | ||
| 54 | unsigned es2_compatibility:1; | ||
| 55 | }; | ||
| 56 | |||
| 57 | struct usbhs_omap_platform_data { | ||
| 58 | enum usbhs_omap_port_mode port_mode[OMAP3_HS_USB_PORTS]; | ||
| 59 | |||
| 60 | struct ehci_hcd_omap_platform_data *ehci_data; | ||
| 61 | struct ohci_hcd_omap_platform_data *ohci_data; | ||
| 62 | }; | ||
| 63 | |||
| 64 | /*-------------------------------------------------------------------------*/ | ||
| 65 | |||
| 66 | struct omap_musb_board_data { | ||
| 67 | u8 interface_type; | ||
| 68 | u8 mode; | ||
| 69 | u16 power; | ||
| 70 | unsigned extvbus:1; | ||
| 71 | void (*set_phy_power)(u8 on); | ||
| 72 | void (*clear_irq)(void); | ||
| 73 | void (*set_mode)(u8 mode); | ||
| 74 | void (*reset)(void); | ||
| 75 | }; | ||
| 76 | |||
| 77 | enum musb_interface { | ||
| 78 | MUSB_INTERFACE_ULPI, | ||
| 79 | MUSB_INTERFACE_UTMI | ||
| 80 | }; | ||
