Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 295627
b: refs/heads/master
c: 2c799ce
h: refs/heads/master
i:
  295625: 4c982d2
  295623: 83256a0
v: v3
  • Loading branch information
Tony Lindgren committed Feb 24, 2012
1 parent 3555958 commit b9d7705
Show file tree
Hide file tree
Showing 33 changed files with 185 additions and 110 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ee0839c22cdda7f2e5f06e2d0351e2b49e0975ff
refs/heads/master: 2c799cef4d145af2182594a41cb5e5b42f2535c5
3 changes: 3 additions & 0 deletions trunk/arch/arm/mach-omap1/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <linux/list.h>
#include <linux/errno.h>
#include <linux/err.h>
#include <linux/io.h>
#include <linux/clk.h>
#include <linux/clkdev.h>

Expand All @@ -26,6 +27,8 @@
#include <plat/sram.h>
#include <plat/clkdev_omap.h>

#include <mach/hardware.h>

#include "iomap.h"
#include "clock.h"
#include "opp.h"
Expand Down
3 changes: 3 additions & 0 deletions trunk/arch/arm/mach-omap1/clock_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/

#include <linux/kernel.h>
#include <linux/io.h>
#include <linux/clk.h>
#include <linux/cpufreq.h>
#include <linux/delay.h>
Expand All @@ -27,6 +28,8 @@
#include <plat/sram.h> /* for omap_sram_reprogram_clock() */
#include <plat/usb.h> /* for OTG_BASE */

#include <mach/hardware.h>

#include "iomap.h"
#include "clock.h"

Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/arm/mach-omap1/flash.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
#include <plat/tc.h>
#include <plat/flash.h>

#include <mach/hardware.h>

void omap1_set_vpp(struct platform_device *pdev, int enable)
{
static int count;
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/arm/mach-omap1/id.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

#include <plat/cpu.h>

#include <mach/hardware.h>

#define OMAP_DIE_ID_0 0xfffe1800
#define OMAP_DIE_ID_1 0xfffe1804
#define OMAP_PRODUCTION_ID_0 0xfffe2000
Expand Down
36 changes: 36 additions & 0 deletions trunk/arch/arm/mach-omap1/include/mach/hardware.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,40 @@
* arch/arm/mach-omap1/include/mach/hardware.h
*/

#ifndef __MACH_HARDWARE_H
#define __MACH_HARDWARE_H

#ifndef __ASSEMBLER__
/*
* NOTE: Please use ioremap + __raw_read/write where possible instead of these
*/
extern u8 omap_readb(u32 pa);
extern u16 omap_readw(u32 pa);
extern u32 omap_readl(u32 pa);
extern void omap_writeb(u8 v, u32 pa);
extern void omap_writew(u16 v, u32 pa);
extern void omap_writel(u32 v, u32 pa);

#include <plat/tc.h>

/* Almost all documentation for chip and board memory maps assumes
* BM is clear. Most devel boards have a switch to control booting
* from NOR flash (using external chipselect 3) rather than mask ROM,
* which uses BM to interchange the physical CS0 and CS3 addresses.
*/
static inline u32 omap_cs0m_phys(void)
{
return (omap_readl(EMIFS_CONFIG) & OMAP_EMIFS_CONFIG_BM)
? OMAP_CS3_PHYS : 0;
}

static inline u32 omap_cs3_phys(void)
{
return (omap_readl(EMIFS_CONFIG) & OMAP_EMIFS_CONFIG_BM)
? 0 : OMAP_CS3_PHYS;
}

#endif
#endif

#include <plat/hardware.h>
43 changes: 42 additions & 1 deletion trunk/arch/arm/mach-omap1/include/mach/io.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,46 @@
/*
* arch/arm/mach-omap1/include/mach/io.h
*
* IO definitions for TI OMAP processors and boards
*
* Copied from arch/arm/mach-sa1100/include/mach/io.h
* Copyright (C) 1997-1999 Russell King
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
* NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 675 Mass Ave, Cambridge, MA 02139, USA.
*
* Modifications:
* 06-12-1997 RMK Created.
* 07-04-1999 RMK Major cleanup
*/

#include <plat/io.h>
#ifndef __ASM_ARM_ARCH_IO_H
#define __ASM_ARM_ARCH_IO_H

#define IO_SPACE_LIMIT 0xffffffff

/*
* We don't actually have real ISA nor PCI buses, but there is so many
* drivers out there that might just work if we fake them...
*/
#define __io(a) __typesafe_io(a)
#define __mem_pci(a) (a)

#endif
3 changes: 2 additions & 1 deletion trunk/arch/arm/mach-omap1/include/mach/memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
* Note that the is_lbus_device() test is not very efficient on 1510
* because of the strncmp().
*/
#ifdef CONFIG_ARCH_OMAP15XX
#if defined(CONFIG_ARCH_OMAP15XX) && !defined(__ASSEMBLER__)
#include <plat/cpu.h>

/*
* OMAP-1510 Local Bus address offset
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include <linux/cpufreq.h>
#include <linux/slab.h>

#include <plat/cpu.h>
#include <plat/clock.h>
#include <plat/sram.h>
#include <plat/sdrc.h>
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/arm/mach-omap2/clkt_dpll.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <asm/div64.h>

#include <plat/clock.h>
#include <plat/cpu.h>

#include "clock.h"
#include "cm-regbits-24xx.h"
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/arm/mach-omap2/clock2420_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@
*/

#include <linux/kernel.h>
#include <linux/io.h>
#include <linux/clk.h>
#include <linux/list.h>

#include <plat/hardware.h>
#include <plat/clkdev_omap.h>

#include "iomap.h"
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/arm/mach-omap2/clock2430.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <linux/clk.h>
#include <linux/io.h>

#include <plat/hardware.h>
#include <plat/clock.h>

#include "iomap.h"
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/arm/mach-omap2/clock2430_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <linux/clk.h>
#include <linux/list.h>

#include <plat/hardware.h>
#include <plat/clkdev_omap.h>

#include "iomap.h"
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/arm/mach-omap2/clock2xxx.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <linux/clk.h>
#include <linux/io.h>

#include <plat/cpu.h>
#include <plat/clock.h>

#include "clock.h"
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/arm/mach-omap2/clock3xxx.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <linux/clk.h>
#include <linux/io.h>

#include <plat/hardware.h>
#include <plat/clock.h>

#include "clock.h"
Expand Down
10 changes: 10 additions & 0 deletions trunk/arch/arm/mach-omap2/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -242,5 +242,15 @@ struct omap_sdrc_params;
extern void omap_sdrc_init(struct omap_sdrc_params *sdrc_cs0,
struct omap_sdrc_params *sdrc_cs1);

/*
* NOTE: Please use ioremap + __raw_read/write where possible instead of these
*/
extern u8 omap_readb(u32 pa);
extern u16 omap_readw(u32 pa);
extern u32 omap_readl(u32 pa);
extern void omap_writeb(u8 v, u32 pa);
extern void omap_writew(u16 v, u32 pa);
extern void omap_writel(u32 v, u32 pa);

#endif /* __ASSEMBLER__ */
#endif /* __ARCH_ARM_MACH_OMAP2PLUS_COMMON_H */
1 change: 1 addition & 0 deletions trunk/arch/arm/mach-omap2/gpmc-nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

#include <asm/mach/flash.h>

#include <plat/cpu.h>
#include <plat/nand.h>
#include <plat/board.h>
#include <plat/gpmc.h>
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/arm/mach-omap2/gpmc-onenand.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

#include <asm/mach/flash.h>

#include <plat/cpu.h>
#include <plat/onenand.h>
#include <plat/board.h>
#include <plat/gpmc.h>
Expand Down
46 changes: 45 additions & 1 deletion trunk/arch/arm/mach-omap2/include/mach/io.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,49 @@
/*
* arch/arm/mach-omap2/include/mach/io.h
*
* IO definitions for TI OMAP processors and boards
*
* Copied from arch/arm/mach-sa1100/include/mach/io.h
* Copyright (C) 1997-1999 Russell King
*
* Copyright (C) 2009 Texas Instruments
* Added OMAP4 support - Santosh Shilimkar <santosh.shilimkar@ti.com>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
* NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 675 Mass Ave, Cambridge, MA 02139, USA.
*
* Modifications:
* 06-12-1997 RMK Created.
* 07-04-1999 RMK Major cleanup
*/

#include <plat/io.h>
#ifndef __ASM_ARM_ARCH_IO_H
#define __ASM_ARM_ARCH_IO_H

#define IO_SPACE_LIMIT 0xffffffff

/*
* We don't actually have real ISA nor PCI buses, but there is so many
* drivers out there that might just work if we fake them...
*/
#define __io(a) __typesafe_io(a)
#define __mem_pci(a) (a)

#endif
2 changes: 2 additions & 0 deletions trunk/arch/arm/mach-omap2/opp2420_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
* http://repository.maemo.org/pool/diablo/free/k/kernel-source-diablo/
*/

#include <plat/hardware.h>

#include "opp2xxx.h"
#include "sdrc.h"
#include "clock.h"
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/arm/mach-omap2/opp2430_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
* This is technically part of the OMAP2xxx clock code.
*/

#include <plat/hardware.h>

#include "opp2xxx.h"
#include "sdrc.h"
#include "clock.h"
Expand Down
2 changes: 0 additions & 2 deletions trunk/arch/arm/mach-omap2/pm24xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include <linux/module.h>
#include <linux/delay.h>
#include <linux/clk.h>
#include <linux/io.h>
#include <linux/irq.h>
#include <linux/time.h>
#include <linux/gpio.h>
Expand All @@ -42,7 +41,6 @@

#include <mach/irqs.h>

#include "iomap.h"
#include "common.h"
#include "prm2xxx_3xxx.h"
#include "prm-regbits-24xx.h"
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/arm/mach-omap2/sleep34xx.S
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

#include <asm/assembler.h>

#include <plat/hardware.h>
#include <plat/sram.h>

#include "iomap.h"
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/arm/plat-omap/counter_32k.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

#include <asm/sched_clock.h>

#include <plat/hardware.h>
#include <plat/common.h>
#include <plat/board.h>

Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/arm/plat-omap/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ static inline void set_gdma_dev(int req, int dev)
}
#else
#define set_gdma_dev(req, dev) do {} while (0)
#define omap_readl(reg) 0
#define omap_writel(val, reg) do {} while (0)
#endif

void omap_set_dma_priority(int lch, int dst_port, int priority)
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/arm/plat-omap/dmtimer.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@

#include <plat/dmtimer.h>

#include <mach/hardware.h>

static LIST_HEAD(omap_timer_list);
static DEFINE_SPINLOCK(dm_timer_lock);

Expand Down
6 changes: 6 additions & 0 deletions trunk/arch/arm/plat-omap/include/plat/hardware.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@
#endif
#include <plat/serial.h>

#ifdef __ASSEMBLER__
#define IOMEM(x) (x)
#else
#define IOMEM(x) ((void __force __iomem *)(x))
#endif

/*
* ---------------------------------------------------------------------------
* Common definitions for all OMAP processors
Expand Down
Loading

0 comments on commit b9d7705

Please sign in to comment.