summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* OMAP: Platform support for twl4030_codec MFDPeter Ujfalusi2009-11-226-0/+54
| | | | | | | | | Add needed platform data for the twl4030_codec MFD on boards, where the audio part of the twl4030 codec is used. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* MFD: twl4030: add twl4030_codec MFD as a new child to the corePeter Ujfalusi2009-11-226-0/+551
| | | | | | | | | | | | | | | | | | | | New MFD child to twl4030 MFD device. Reason for the twl4030_codec MFD: the vibra control is actually in the codec part of the twl4030. If both the vibra and the audio functionality is needed from the twl4030 at the same time, than they need to control the codec power and APLL at the same time without breaking the other driver. Also these two has to be able to work without the need for the other driver. This MFD device will be used by the drivers, which needs resources from the twl4030 codec like audio and vibra. The platform specific configuration data is passed along to the child drivers (audio, vibra). Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* Merge 7xx-iosplit-plat-merge with omap-fixesTony Lindgren2009-11-22272-1655/+3839
|\ | | | | | | Merge branch '7xx-iosplit-plat-merge' into omap-for-linus
| * Merge branch 'pm-upstream/pm-cpuidle' of ↵Tony Lindgren2009-11-114-50/+329
| |\ | | | | | | | | | ssh://master.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm into 7xx-iosplit-plat-merge
| | * OMAP3: PM: Added resched check into idle callsTero Kristo2009-11-112-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes a bug where scheduling is delayed until next wakeup due to race condition (e.g. interrupt requests scheduling just before omap_sram_idle is entered.) Signed-off-by: Tero Kristo <tero.kristo@nokia.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
| | * OMAP3: PM: idle: Remove fclk check for idle loopPeter 'p2' De Schrijver2009-11-111-42/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes the check to see if some functional clocks are still enabled before entering sleep. This is no longer needed when using safe state (C1) that keeps CORE active. Signed-off-by: Peter 'p2' De Schrijver <peter.de-schrijver@nokia.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
| | * OMAP3: PM: Use pwrdm_set_next_pwrst instead of set_pwrdm_state in idle loopJouni Hogander2009-11-112-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | It is more efficient to use pwrdm_set_next_pwrst for mpu, core and neon instead of set_pwrdm_state in idle loop. It is anyway known that those are active in idle loop. So no need to use set_pwrdm_state. Signed-off-by: Jouni Hogander <jouni.hogander@nokia.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
| | * OMAP3: PM: CPUidle: Start C-state definitions from base 0Sanjeev Premi2009-11-111-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current definition of C-states starts from base 1. Whereas, the cpuidle driver uses base 0. This patch eliminates need for explicit mapping (add/ sbutract) due to different base values. Signed-off-by: Sanjeev Premi <premi@ti.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
| | * OMAP3: PM: CPUidle: Add new lower-latency C1 statePeter 'p2' De Schrijver2009-11-111-44/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces a new C state which allows MPU to go to WFI but keeps the core domain active. This offers a much better wakeup latency (3us vs 10s of us for the current C1) at the cost of a higher power consumption. Signed-off-by: Peter 'p2' De Schrijver <peter.de-schrijver@nokia.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
| | * OMAP3: PM: CPUidle: fix init sequencingKalle Jokiniemi2009-11-113-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously omap3_idle_init() was called in device_init, while omap_pm_init() is called at late_initcall. This causes the cpu idle driver to call omap_sram_idle before it is properly initialized. This patch fixes the issue by moving omap3_idle_init into omap3_pm_init. Signed-off-by: Kalle Jokiniemi <ext-kalle.jokiniemi@nokia.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
| | * OMAP3: PM: CPUidle: check activity for C2, C3, correct accountingKevin Hilman2009-11-111-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the activity check for states C2 and C3 as well. This is primarily to prevent deeper states during UART activity. Also, if a different state is chosen than the target state, update the 'last_state' accordingly so that CPUidle state accounting is coorect. Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
| | * OMAP3: PM: CPUidle: obey enable_off_mode flagKevin Hilman2009-11-111-2/+12
| | | | | | | | | | | | | | | | | | | | | If 'enable_off_mode' is not set, force powerdomain states to RET instead of OFF. Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
| | * OMAP3: PM: CPUidle: support retention and off-mode C-statesRajendra Nayak2009-11-113-16/+20
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds support and enables state C4(MPU RET + CORE RET) and MPU OFF states (C3 and C5.) Signed-off-by: Rajendra Nayak <rnayak@ti.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
| | * OMAP3: PM: CPUidle: base driver and support for C1-C2Rajendra Nayak2009-11-114-2/+260
| | | | | | | | | | | | | | | | | | | | | | | | Basic CPUidle driver for OMAP3 with deepest sleep state supported being MPU CSWR. Signed-off-by: Rajendra Nayak <rnayak@ti.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
| * | Merge branch 'pm-upstream/pm-off' of ↵Tony Lindgren2009-11-1124-50/+1809
| |\ \ | | |/ | | | | | | ssh://master.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm into 7xx-iosplit-plat-merge
| | * OMAP3: PM: Program SDRC to send self refresh on timeout of AUTO_CNTRajendra Nayak2009-11-113-18/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to an OMAP3 errata (1.142), on HS/EMU devices SDRC should be programed to issue automatic self refresh on timeout of AUTO_CNT = 1 prior to any transition to OFF mode. This is needed only on sil rev's ES3.0 and above. This patch enables the above needed WA in the SDRC power register value stored in scratchpad, so that ROM code restores this value in SDRC POWER on the wakeup path. The original SDRC POWER register value is stored and restored back in omap_sram_idle() function. This fixes some random crashes observed while stressing suspend on HS/EMU devices. Signed-off-by: Rajendra Nayak <rnayak@ti.com> Signed-off-by: Kalle Jokiniemi <kalle.jokiniemi@digia.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
| | * OMAP3: PM: Enable IO-CHAIN wakeupKalle Jokiniemi2009-11-112-3/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OMAP 3430 ES3.1 chips have a separate bit for IO daisy-chain wake up enabling. It needs to be enabled when entering retention or off state, otherwise waking up might not work in all situations. Signed-off-by: Kalle Jokiniemi <kalle.jokiniemi@digia.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
| | * OMAP3: PM: MPU and CORE should stay awake if there is CAM domain ACTIVETero Kristo2009-11-111-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MPU and CORE should stay awake if there is CAM domain ACTIVE. This is because that module doesn't have wake-up capability. This should replace the patch that is currently in the PM branch. Signed-off-by: Jouni Hogander <jouni.hogander@nokia.com> Signed-off-by: Tero Kristo <tero.kristo@nokia.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
| | * OMAP3: PM: Prevent PER from going OFF when CORE is going INATero Kristo2009-11-111-5/+14
| | | | | | | | | | | | | | | | | | | | | OMAP3 can't generate wakeups in this state, thus it is not permitted. Signed-off-by: Tero Kristo <tero.kristo@nokia.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
| | * OMAP3: PM: decouple PER and CORE context save and restoreKevin Hilman2009-11-111-22/+29
| | | | | | | | | | | | Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
| | * PM debug: allow configurable wakeup from suspend on OMAP GPtimerKevin Hilman2009-11-114-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using debugfs, export a configurable wakeup timer to be used to wakeup system from suspend. If a non-zero value is written to /debug/pm_debug/wakeup_timer_seconds, A timer wakeup event will wake the system and resume after the configured number of seconds. Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
| | * OMAP3: PM debug: allow runtime toggle of PM featuresKevin Hilman2009-11-114-2/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow enable/disable of low-power states during idle. To enable low-power idle: echo 1 > /debug/pm_debug/sleep_while_idle to disable: echo 0 > /debug/pm_debug/sleep_while_idle Also allow enable/disable of OFF-mode. To enable: echo 1 > /debug/pm_debug/enable_off_mode to disable: echo 0 > /debug/pm_debug/enable_off_mode Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
| | * OMAP3: PM: Wait for SDRC ready iso a blind delayPeter 'p2' De Schrijver2009-11-111-12/+36
| | | | | | | | | | | | | | | | | | | | | | | | This patch improves the wakeup SRAM code polling the SDRC to become ready instead of just waiting for a fixed amount of time. Signed-off-by: Peter 'p2' De Schrijver <peter.de-schrijver@nokia.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
| | * PM: Disable usb host HW save and restoreKalle Jokiniemi2009-11-111-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The hardware SAVEANDRESTORE mechanism seems to leave USB HOST power domain permanently into active state after one transition from off to active state. Disabling for now. Signed-off-by: Kalle Jokiniemi <ext-kalle.jokiniemi@nokia.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
| | * OMAP3: PM: Fix INTC context save/restoreAaro Koskinen2009-11-111-2/+2
| | | | | | | | | | | | | | | | | | | | | Wrong index was used for ILR. Signed-off-by: Aaro Koskinen <Aaro.Koskinen@nokia.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
| | * OMAP3: PM: SDRC auto-refresh workaround for off-modeTero Kristo2009-11-113-3/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | Errata: ES3.0, ES3.1 SDRC not sending auto-refresh when OMAP wakes-up from OFF mode Signed-off-by: Tero Kristo <tero.kristo@nokia.com> Signed-off-by: Kalle Jokiniemi <kalle.jokiniemi@digia.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
| | * OMAP: Store reboot mode in scratchpad on OMAP34xxJuha Yrjola2009-11-111-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The reboot mode can be communicated to a bootloader (or the kernel itself) with a scratchpad register. This functionality is especially useful, if userspace is allowed to change the reboot mode. Signed-off-by: Juha Yrjola <juha.yrjola@solidboot.com> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
| | * OMAP: PM: Clear DMA channel state after a wakeupAaro Koskinen2009-11-111-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | Clear DMA channel states so that users can assume a known initial state. Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
| | * OMAP3: PM: Fix PLL_MOD CLKEN offset in scratchpadKalle Jokiniemi2009-11-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The CM_CLKEN_PLL register saved in scratchpad memory was wrongly using offset of 0x0004 instead of 0x0000. The effect of this was that boot ROM code would restore the wrong value when waking up from off mode. This wrong value, however, will be overwritten by prcm context restore. Still, a short period of wrong clock settings in CM_CLKEN_PLL remained between ROM code and prcm context restore. This is fixed by the patch. Problem reported by: Jouni Hogander <jouni.hogander@nokia.com> Signed-off-by: Kalle Jokiniemi <kalle.jokiniemi@digia.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
| | * ARM: OMAP: SMS: save/restore of SMS_SYSCONFIG for off-modeKalle Jokiniemi2009-11-113-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | The SMS_SYSCONFIG register gets reset in off mode, added a save/restore mechanism for that. Signed-off-by: Kalle Jokiniemi <kalle.jokiniemi@digia.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
| | * OMAP3: PM: Fix secure SRAM context save/restoreKalle Jokiniemi2009-11-113-19/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The secure sram context save uses dma channels 0 and 1. In order to avoid collision between kernel DMA transfers and ROM code dma transfers, we need to reserve DMA channels 0 1 on high security devices. A bug in ROM code leaves dma irq status bits uncleared. Hence those irq status bits need to be cleared when restoring DMA context after off mode. There was also a faulty parameter given to PPA in the secure ram context save assembly code, which caused interrupts to be enabled during secure ram context save. This caused the save to fail sometimes, which resulted the saved context to be corrupted, but also left DMA channels in secure mode. The secure mode DMA channels caused "DMA secure error with device 0" errors to be displayed. Signed-off-by: Kalle Jokiniemi <kalle.jokiniemi@digia.com> Signed-off-by: Jouni Hogander <jouni.hogander@nokia.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
| | * OMAP3: PM: Save and restore also CM_CLKSEL1_PLL_IVA2Jouni Hogander2009-11-111-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | CM_CLKSEL1_PLL_IVA2 is not saved/restored currently. This patch is adding save and restore for it. Signed-off-by: Jouni Hogander <jouni.hogander@nokia.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
| | * OMAP3: PM: Enable SDRAM auto-refresh during sleepTero Kristo2009-11-111-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | Fix for ES3.0 bug: SDRC not sending auto-refresh when OMAP wakes-up from OFF mode (warning for HS devices.) Signed-off-by: Tero Kristo <tero.kristo@nokia.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
| | * OMAP3: PM: save secure RAM only during initTero Kristo2009-11-111-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The function omap3_save_secure_ram() is now called only once during the initialization of the device and consequent sleep cycles will re-use the same saved contents for secure RAM. Users who need secure services should do secure RAM saving before entering off-mode, if a secure service has been accessed after last save. There are both latency and reliability issues with saving secure RAM context in the idle path. The context save uses a hardware resource which takes an order of hundreds of milliseconds to initialize after a wake up from off-mode, and also there is no way of checking whether it is ready from kernel side or not. It just crashes if you use it too quickly Additional fix to ensure scratchpad save is done after secure RAM by Roger Quadros. Signed-off-by: Tero Kristo <tero.kristo@nokia.com> Signed-off-by: Roger Quadros <ext-roger.quadros@nokia.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
| | * OMAP3 PM: off-mode support for HS/EMU devicesTero Kristo2009-11-114-3/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | | For HS/EMU devices, some additional resources need to be saved/restored for off-mode support. Namely, saving the secure RAM and a pointer to it in the scratchpad. Signed-off-by: Tero Kristo <tero.kristo@nokia.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
| | * OMAP: PM: DMA context save/restore for off-mode supportTero Kristo2009-11-113-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For HS/EMU devices, these additional features are also used: - DMA interrupt disable routine added - Added DMA controller reset to DMA context restore Signed-off-by: Tero Kristo <tero.kristo@nokia.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
| | * OMAP3: PM: CORE domain off-mode supportRajendra Nayak2009-11-112-1/+73
| | | | | | | | | | | | | | | | | | | | | | | | Add context save and restore for CORE powerdomain resources in order to support off-mode. Signed-off-by: Rajendra Nayak <rnayak@ti.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
| | * OMAP3: PM: MPU off-mode supportRajendra Nayak2009-11-112-8/+14
| | | | | | | | | | | | | | | | | | | | | | | | Adds a 'save_state' option when calling into SRAM idle function and adds some minor cleanups of SRAM asm code. Signed-off-by: Rajendra Nayak <rnayak@ti.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
| | * OMAP3: PM: Restore MMU table entryRajendra Nayak2009-11-111-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During the MMU restoration on the restore path from MPU OFF, the page table entry for the page consisting of the code being executed is modified to make MMU return VA=PA. The MMU is then enabled and the original entry is being stored in scratchpad. This patch reads the original values stored in scratchpad, and restores them back. Signed-off-by: Rajendra Nayak <rnayak@ti.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
| | * OMAP3: PM: handle PER/NEON/CORE in idleRajendra Nayak2009-11-111-10/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Expand the powerdomains handled in the idle path to include PER, NEON and CORE. This includes properly clearing the previous powerstates, linking NEON state to MPU state and calling the UART prepare functions for only the appropraite powerdomain transitions (CORE for UART1,2, PER for UART3.) Signed-off-by: Rajendra Nayak <rnayak@ti.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
| | * OMAP3: PM: restore SRAM functions after off-mode.Rajendra Nayak2009-11-113-6/+18
| | | | | | | | | | | | | | | | | | | | | | | | Generalize the copy of SRAM functions into omap_push_sram_idle() so it can be used on init but also after off-mode transitions. Signed-off-by: Rajendra Nayak <rnayak@ti.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
| | * OMAP3: PM: SCM context save/restoreRajendra Nayak2009-11-112-4/+202
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add context save and restore for the System Control Module to suport off-mode. ETK and debobs definitions added by Peter De Schrijver. Signed-off-by: Rajendra Nayak <rnayak@ti.com> Signed-off-by: Peter 'p2' De Schrijver <peter.de-schrijver@nokia.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
| | * OMAP3: PM: Populate scratchpad contentsRajendra Nayak2009-11-112-0/+213
| | | | | | | | | | | | | | | | | | | | | | | | This patch populates the scratchpad contents as expected by the bootROM code. Signed-off-by: Rajendra Nayak <rnayak@ti.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
| | * OMAP3: PM: PRCM context save/restoreRajendra Nayak2009-11-113-1/+396
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add context save and restore for PRCM module to support off-mode. Additional registers (CM_CLKSEL4, CM_CLKEN, CM_CLKEN2) added by Tero Kristo. Missing CM_CLKEN_PLL_IVA2 register added by Kalle Jokiniemi. Signed-off-by: Rajendra Nayak <rnayak@ti.com> Signed-off-by: Tero Kristo <tero.kristo@nokia.com> Signed-off-by: Kalle Jokiniemi <kalle.jokiniemi@digia.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
| | * OMAP3: PM: INTC context save/restoreRajendra Nayak2009-11-112-0/+71
| | | | | | | | | | | | | | | | | | | | | Add context save and restore for the INTC module to support off-mode. Signed-off-by: Rajendra Nayak <rnayak@ti.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
| | * OMAP3: PM: GPIO context save/restoreRajendra Nayak2009-11-112-1/+94
| | | | | | | | | | | | | | | | | | | | | Add context save and restore to enable off-mode. Signed-off-by: Rajendra Nayak <rnayak@ti.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
| | * OMAP3: PM: GPMC context save/restoreRajendra Nayak2009-11-112-3/+98
| |/ | | | | | | | | | | | | | | This patch adds the context save and restore functions for GPMC to enable off-mode. Signed-off-by: Rajendra Nayak <rnayak@ti.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
| * Merge branch '7xx-iosplit-plat' with omap-fixesTony Lindgren2009-11-10269-1559/+1705
| |\
| | * omap: headers: Move remaining headers from include/mach to include/platTony Lindgren2009-10-20228-544/+544
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the remaining headers under plat-omap/include/mach to plat-omap/include/plat. Also search and replace the files using these headers to include using the right path. This was done with: #!/bin/bash mach_dir_old="arch/arm/plat-omap/include/mach" plat_dir_new="arch/arm/plat-omap/include/plat" headers=$(cd $mach_dir_old && ls *.h) omap_dirs="arch/arm/*omap*/ \ drivers/video/omap \ sound/soc/omap" other_files="drivers/leds/leds-ams-delta.c \ drivers/mfd/menelaus.c \ drivers/mfd/twl4030-core.c \ drivers/mtd/nand/ams-delta.c" for header in $headers; do old="#include <mach\/$header" new="#include <plat\/$header" for dir in $omap_dirs; do find $dir -type f -name \*.[chS] | \ xargs sed -i "s/$old/$new/" done find drivers/ -type f -name \*omap*.[chS] | \ xargs sed -i "s/$old/$new/" for file in $other_files; do sed -i "s/$old/$new/" $file done done for header in $(ls $mach_dir_old/*.h); do git mv $header $plat_dir_new/ done Signed-off-by: Tony Lindgren <tony@atomide.com>
| | * omap: headers: Create headers necessary for compile under mach-omap1 and ↵Tony Lindgren2009-10-1930-0/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mach-omap2 Create the headers needed for compiling under mach-omap1/include/mach and mach-omap2/include/mach. This was done with the following script: #!/bin/bash mach_files="clkdev.h gpio.h hardware.h io.h irqs.h memory.h \ smp.h system.h timex.h uncompress.h vmalloc.h" omaps="mach-omap1 mach-omap2" mach_dir_old="arch/arm/plat-omap/include/mach" plat_dir_new="arch/arm/plat-omap/include/plat" mkdir -p $plat_dir_new git add $plat_dir_new for dir in $omaps; do mach_dir_new="arch/arm/$dir/include/mach" for header in $mach_files; do file="$mach_dir_new/$header" if [ ! -f $file ]; then echo -ne "/*\n * $file\n */\n\n#include <plat/$header>\n" > $file git add $file if [ ! -f $plat_dir_new/$header ]; then git mv $mach_dir_old/$header $plat_dir_new/$header fi fi done done Signed-off-by: Tony Lindgren <tony@atomide.com>
OpenPOWER on IntegriCloud